Skip to content

Conversation

@ONykyf
Copy link
Contributor

@ONykyf ONykyf commented Dec 10, 2025

This PR is an enhanced version of #1564 (+2 commits) and will be rebased once the latter is merged. Its goal is to show the complete picture how GPU assignment and initialization process should (IMO) look to a user - verbose enough, with no need for GDB debugging if something goes wrong.

Only after this have I found a bug that could not be noticed otherwise. It turned out that multiseat (several layouts working simultaneously) was possible just because of a bug, and, if it is corrected, multiseat gets inoperable.

Here is a snippet of Xorg.0.log (on a single-seat machine, everything is OK) cut off right now:

...
[2025-12-10 09:01:05] (==) Matched radeon as autoconfigured driver 0
[2025-12-10 09:01:05] (==) Matched ati as autoconfigured driver 1
[2025-12-10 09:01:05] (==) Matched modesetting as autoconfigured driver 2
[2025-12-10 09:01:05] (==) Matched fbdev as autoconfigured driver 3
[2025-12-10 09:01:05] (==) Matched vesa as autoconfigured driver 4
[2025-12-10 09:01:05] (==) Assigned the driver to the xf86ConfigLayout
[2025-12-10 09:01:05] (II) LoadModule: "radeon"
[2025-12-10 09:01:05] (II) Loading /usr/lib64/xorg/modules/xlibre-25/drivers/radeon_drv.so
[2025-12-10 09:01:05] (II) Module radeon: vendor="X.Org Foundation"
[2025-12-10 09:01:05]   compiled for 1.25.0, module version = 22.0.0
[2025-12-10 09:01:05]   Module class: X.Org Video Driver
[2025-12-10 09:01:05]   ABI class: X.Org Video Driver, version 28.1
[2025-12-10 09:01:05] (II) LoadModule: "ati"
[2025-12-10 09:01:05] (II) Loading /usr/lib64/xorg/modules/xlibre-25/drivers/ati_drv.so
[2025-12-10 09:01:05] (II) Module ati: vendor="X.Org Foundation"
[2025-12-10 09:01:05]   compiled for 1.25.0, module version = 22.0.0
[2025-12-10 09:01:05]   Module class: X.Org Video Driver
[2025-12-10 09:01:05]   ABI class: X.Org Video Driver, version 28.1
[2025-12-10 09:01:05] (II) LoadModule: "modesetting"
[2025-12-10 09:01:05] (II) Loading /usr/lib64/xorg/modules/xlibre-25/drivers/modesetting_drv.so
[2025-12-10 09:01:05] (II) Module modesetting: vendor="X.Org Foundation"
[2025-12-10 09:01:05]   compiled for 1.25.0, module version = 1.25.0
[2025-12-10 09:01:05]   Module class: X.Org Video Driver
[2025-12-10 09:01:05]   ABI class: X.Org Video Driver, version 28.1
[2025-12-10 09:01:05] (II) LoadModule: "fbdev"
[2025-12-10 09:01:05] (WW) Warning, couldn't open module fbdev
[2025-12-10 09:01:05] (EE) Failed to load module "fbdev" (module does not exist, 0)
[2025-12-10 09:01:05] (II) LoadModule: "vesa"
[2025-12-10 09:01:05] (II) Loading /usr/lib64/xorg/modules/xlibre-25/drivers/vesa_drv.so
[2025-12-10 09:01:05] (II) Module vesa: vendor="X.Org Foundation"
[2025-12-10 09:01:05]   compiled for 1.25.0, module version = 2.6.0
[2025-12-10 09:01:05]   Module class: X.Org Video Driver
[2025-12-10 09:01:05]   ABI class: X.Org Video Driver, version 28.1
[2025-12-10 09:01:05] (II) RADEON: Driver for ATI/AMD Radeon chipsets:
        ATI Radeon Mobility X600 (M24), ATI FireMV 2400,
...
[2025-12-10 09:01:05] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[2025-12-10 09:01:05] (II) VESA: driver for VESA chipsets: vesa
[2025-12-10 09:01:05] (--) using VT number 7

[2025-12-10 09:01:05] (II) radeon: platform device "/dev/dri/card0" screen 0 at 1:0:0 is requested by "Autoconfigured Video Device"
[2025-12-10 09:01:05] (II)  Platform device "/dev/dri/card0" at 0@1:0:0 can be claimed.
[2025-12-10 09:01:05] (II) Adding "/dev/dri/card0" primary screen to "Autoconfigured Video Device"
[2025-12-10 09:01:05] (II) [KMS] Kernel modesetting enabled.
[2025-12-10 09:01:05] (II) radeon: platform device "/dev/dri/card0" screen 0 at 1:0:0 is requested by "Autoconfigured Video Device ati"
[2025-12-10 09:01:05] (II)  Platform device "/dev/dri/card0" skipped because
[2025-12-10 09:01:05] (II)   PCI bus id 0@1:0:0 has already been claimed by "Autoconfigured Video Device".
[2025-12-10 09:01:05] (II) radeon: PCI card screen 0 at 1:0:0 is requested by "Autoconfigured Video Device ati"
[2025-12-10 09:01:05] (II)  PCI device skipped because
[2025-12-10 09:01:05] (II)   PCI bus id 0@1:0:0 has already been claimed by "Autoconfigured Video Device".
[2025-12-10 09:01:05] (II) modesetting: platform device "/dev/dri/card0" screen 0 at 1:0:0 is requested by "Autoconfigured Video Device modesetting"
[2025-12-10 09:01:05] (II)  Platform device "/dev/dri/card0" skipped because
[2025-12-10 09:01:05] (II)   PCI bus id 0@1:0:0 has already been claimed by "Autoconfigured Video Device".
[2025-12-10 09:01:05] (II) modesetting: PCI card screen 0 at 1:0:0 is requested by "Autoconfigured Video Device modesetting"
[2025-12-10 09:01:05] (II)  PCI device skipped because
[2025-12-10 09:01:05] (II)   PCI bus id 0@1:0:0 has already been claimed by "Autoconfigured Video Device".
[2025-12-10 09:01:05] (WW) Falling back to old probe method for modesetting
[2025-12-10 09:01:05] (II)  DRI device "/dev/dri/card0" has already been claimed by "Autoconfigured Video Device".
[2025-12-10 09:01:05] (II) vesa: PCI card screen 0 at 1:0:0 is requested by "Autoconfigured Video Device vesa"
[2025-12-10 09:01:05] (II)  PCI device skipped because
[2025-12-10 09:01:05] (II)   PCI bus id 0@1:0:0 has already been claimed by "Autoconfigured Video Device".
[2025-12-10 09:01:05] (II) radeon: platform GPU device "/dev/dri/card0" screen 0 at 1:0:0 is requested by "Autoconfigured Video Device ati"
[2025-12-10 09:01:05] (II)  Platform device "/dev/dri/card0" skipped because
[2025-12-10 09:01:05] (II)   PCI bus id 0@1:0:0 has already been claimed by "Autoconfigured Video Device".
[2025-12-10 09:01:05] (II) modesetting: platform GPU device "/dev/dri/card0" screen 0 at 1:0:0 is requested by "Autoconfigured Video Device modesetting"
[2025-12-10 09:01:05] (II)  Platform device "/dev/dri/card0" skipped because
[2025-12-10 09:01:05] (II)   PCI bus id 0@1:0:0 has already been claimed by "Autoconfigured Video Device".
[2025-12-10 09:01:05] (II) RADEON(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[2025-12-10 09:01:05] (II) Module "ramdac" already built-in
[2025-12-10 09:01:05] (II) UnloadModule: "modesetting"
[2025-12-10 09:01:05] (II) Unloading modesetting
[2025-12-10 09:01:05] (II) UnloadModule: "vesa"
[2025-12-10 09:01:05] (II) Unloading vesa
...

A few lines of output added to logs give a user some understanding what is going on and why. Apart from increased verbosity, the four commits prevent Xserver from claiming the same device by differrent drivers (the 1st and 2nd commits for platform, PCI, and framebuffer slots) and from claiming the same secondary CRT screen (for multi-CRT cards) more than once and if a primary CRT screen has not been set (this implements a FIXME hanging in the code, the 3rd commit for PCI slots and the 4th one for platform slots). Now I hope that almost all conflicts in claiming devices are impossible, while this does not restrict a user from choosing complex but legal configurations.

This PR is a basis for resolving an issue with multiseat.

@github-actions
Copy link

Merge Conflict found

1 similar comment
@github-actions
Copy link

Merge Conflict found

Checks are added to xf86PciProbe() to be sure that a CRT
is not claimed twice and CRT 0 (primary) is claimed first.

Implements FIXME previously added to the code.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
 devices

Checks are added to doPlatformProbe() to be sure that a CRT
is not claimed twice and CRT 0 (primary) is claimed first.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant