[PATCH] modesetting: fail PreInit() if the device has zero connectors
Hans de Goede
hdegoede at redhat.com
Mon Oct 23 14:00:11 UTC 2017
Hi,
On 20-10-17 19:08, tobias.jakobi1 at uni-bielefeld.de wrote:
> On laptop systems with a dedicated (powerful) GPU A, you usually
> have all connectors routed to another (less-powerful) GPU B.
>
> With my setup (GPU A = Nvidia, GPU B = Intel) I keep GPU A switched
> off by not loading the nouveau kernel driver during boot.
>
> Loading nouveau while X is running then crashes the server:
> [ 540.775] (EE) 0: /usr/bin/X (xorg_backtrace+0x41) [0x57fa31]
> [ 540.775] (EE) 1: /usr/bin/X (0x400000+0x183429) [0x583429]
> [ 540.775] (EE) 2: /lib64/libpthread.so.0 (0x7ff02d508000+0x10ec0) [0x7ff02d518ec0]
> [ 540.775] (EE) 3: /lib64/libc.so.6 (gsignal+0x38) [0x7ff02d1a2178]
> [ 540.775] (EE) 4: /lib64/libc.so.6 (abort+0x16a) [0x7ff02d1a35fa]
> [ 540.775] (EE) 5: /lib64/libc.so.6 (0x7ff02d16f000+0x2c0b7) [0x7ff02d19b0b7]
> [ 540.775] (EE) 6: /lib64/libc.so.6 (0x7ff02d16f000+0x2c162) [0x7ff02d19b162]
> [ 540.775] (EE) 7: /usr/bin/X (dixRegisterPrivateKey+0x247) [0x452197]
> [ 540.775] (EE) 8: /usr/lib64/xorg/modules/libglamoregl.so (glamor_init+0x160) [0x7ff00ee564d0]
> [ 540.775] (EE) 9: /usr/lib64/xorg/modules/drivers/modesetting_drv.so (0x7ff01c19a000+0x83e1) [0x7ff01c1a23e1]
> [ 540.775] (EE) 10: /usr/bin/X (AddGPUScreen+0xf3) [0x4348b3]
> [ 540.775] (EE) 11: /usr/bin/X (0x400000+0x90271) [0x490271]
> [ 540.775] (EE) 12: /usr/bin/X (0x400000+0x9547b) [0x49547b]
> [ 540.775] (EE) 13: /usr/bin/X (0x400000+0x905d7) [0x4905d7]
> [ 540.775] (EE) 14: /usr/bin/X (xf86VTEnter+0x1bb) [0x47399b]
> [ 540.775] (EE) 15: /usr/bin/X (WakeupHandler+0xda) [0x438e3a]
> [ 540.775] (EE) 16: /usr/bin/X (WaitForSomething+0x1ce) [0x57d6fe]
> [ 540.775] (EE) 17: /usr/bin/X (0x400000+0x34221) [0x434221]
> [ 540.775] (EE) 18: /usr/bin/X (0x400000+0x382f8) [0x4382f8]
> [ 540.775] (EE) 19: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7ff02d18f670]
> [ 540.776] (EE) 20: /usr/bin/X (_start+0x29) [0x4235b9]
>
> In particular note that GLAMOR is initialized for GPU A, which
> makes no sense since it has no connectors.
>
> Fix this by bailing out early in the modesetting DDX when a setup
> with zero connectors is detected.
>
> Signed-off-by: Tobias Jakobi <tjakobi at math.uni-bielefeld.de>
Sorry, but NACK. The modesetting driver actually had such a check before
and I removed it because not having a driver breaks rendering on
the dedicated GPU with "DRI_PRIME=1" for dri2 clients.
I guess that there is some sort of assumption in the code for dealing
with glamor failure that it only happens on coldplug, if you really
want to be able to modprobe nouveau later you should figure out what
is exactly going wrong and fix that.
Note BTW that nouveau should runtime suspend the GPU, even with Xorg
running and there really is no need to not load nouveau.
Regards,
Hans
More information about the xorg-devel
mailing list