Problem w/ Offloading and w/ External Displays on Lenovo P53, Linux 5.5-rc


I’ve spent the last weeks trying to get Offloading and/or the external HDMI ports of my P53 to work.

First regarding Offloading:
I’ve managed to get the xrandr (and Xorg.0.log) output for Offloading I’m supposed to, and running glxinfo with the offloading envvars gives me the correct provider and extension list, but trying Offloading on glxgears makes it get stuck in what looks to me like an invalid poll() syscall before the first frame is even rendered (at least I don’t see anything, the glxgears window stays black) - here’s the end of strace and the backtrace as reported by gdb (I can provide the full logs if that’s any more insightful):

===== strace | tail -18
lseek(17, 0, SEEK_SET) = 0
read(17, “CDVN\0\0\3\0\31\321\204\320\310\302\363\271\262\372\372k\206T\253T\272\257\232\35\373\355\221\274”…, 1522) = 1522
write(17, “\235\241F\230\0\0\0\0\0\0\0\0\232\210\261\235\301+\266\370P\264\310J\207n\207\256\1\2\0\0”…, 545) = 545
write(16, “\0\0\0\0\0\0\0\0\232\210\261\235\301+\266\370\362\5\0\0\1\2\0\0”, 24) = 24
ioctl(5, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0x4a, 0xc0), 0x7ffead3ade80) = 0
ioctl(5, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0x2a, 0x20), 0x7ffead3adbf0) = 0
openat(AT_FDCWD, “/dev/nvidiactl”, O_RDWR) = 18
fcntl(18, F_SETFD, FD_CLOEXEC) = 0
ioctl(5, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0x4e, 0x38), 0x7ffead3adcd0) = 0
mmap(NULL, 524288, PROT_READ|PROT_WRITE, MAP_SHARED, 18, 0) = 0x7f337f706000
close(18) = 0
ioctl(5, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0x57, 0x38), 0x7ffead3add50) = 0
getpid() = 21127
getpid() = 21127
getpid() = 21127
getpid() = 21127
sched_yield() = 0
poll([{fd=-1}], 1, -1) =

===== gdb
#0 0x00007ffff78aece4 in __GI___poll (fds=0x7fffffffd830, nfds=1, timeout=-1) at …/sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007ffff6e11618 in ?? () from /lib/x86_64-linux-gnu/
#2 0x00007ffff5d41211 in ?? () from /lib/x86_64-linux-gnu/
#3 0x00007ffff5d416e8 in ?? () from /lib/x86_64-linux-gnu/
#4 0x00007ffff6e14067 in ?? () from /lib/x86_64-linux-gnu/
#5 0x00007ffff6de9071 in glXSwapBuffers () from /lib/x86_64-linux-gnu/
#6 0x0000555555556a06 in ?? ()
#7 0x00007ffff77e5bbb in __libc_start_main (main=0x555555556410, argc=1, argv=0x7fffffffe478, init=, fini=, rtld_fini=, stack_end=0x7fffffffe468) at …/csu/libc-start.c:308
#8 0x0000555555556f0a in ?? ()

This is a Debian Unstable with a 5.5-rc3 kernel and NVidia 440.44 (with the 5.5 compatibility patches for the drm/drmP.h removal applied that are floating around) with i3 as window manager, if that should matter.

Finally regarding the external displays:
How am I supposed to get those working on this machine? In the Offloading setup, I don’t see any external displays at all in xrandr (even though Xorg.0.log indicates that the NVIDIA card does know about them and even correctly detects link state on Xorg startup). If I do a split setup instead (two screens, each driven by the respective GPU), I see the outputs I expect to see in xrandr (the eDP on the i915 at :0.0 and the externals on the NV at :0.1), but I cannot figure out how to correctly talk GL/GLX to the NV card. The environment variables for Offloading don’t work for that setup…

I’d be happy for any pointers what to try next.
nvidia-bug-report.log.gz (1.46 MB)