Nvidia + Optimus; why does 22.11 work and 23.11 not?

My configuration has branches 22.11 and 23.11. As far as I can tell, there are no material differences between them – just a few things like the version of PHP and the structure of users.users.
I have two apparently identical Lenovo W520 laptops and that running 22.11 works inasmuch as it drives the laptop display and two external displays all at full resolution whereas the 23.11 laptop has this coredump in the journalctl logs:

Jan 17 17:30:06 ida systemd[1]: Started Process Core Dump (PID 1366/UID 0).
β–‘β–‘ Subject: A start job for unit systemd-coredump@2-1366-0.service has finished successfully
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
β–‘β–‘ 
β–‘β–‘ A start job for unit systemd-coredump@2-1366-0.service has finished successfully.
β–‘β–‘ 
β–‘β–‘ The job identifier is 884.
Jan 17 17:30:06 ida systemd-coredump[1367]: [πŸ‘•] Process 1350 (X) of user 0 dumped core.
                                            
                                            Module libshadow.so without build-id.
                                            Module libwfb.so without build-id.
                                            Module modesetting_drv.so without build-id.
                                            Module nvidia_drv.so without build-id.
                                            Module libnvidia-glcore.so.390.157 without build-id.
                                            Module libnvidia-tls.so.390.157 without build-id.
                                            Module libglx.so without build-id.
                                            Module libbrotlicommon.so.1 without build-id.
                                            Module libbrotlidec.so.1 without build-id.
                                            Module libpng16.so.16 without build-id.
                                            Module libbz2.so.1 without build-id.
                                            Module libz.so.1 without build-id.
                                            Module libfreetype.so.6 without build-id.
                                            Module libfontenc.so.1 without build-id.
                                            Module liblzma.so.5 without build-id.
                                            Module libgcc_s.so.1 without build-id.
                                            Module libcap.so.2 without build-id.
                                            Module libXdmcp.so.6 without build-id.
                                            Module libxshmfence.so.1 without build-id.
                                            Module libsystemd.so.0 without build-id.
                                            Module libXau.so.6 without build-id.
                                            Module libXfont2.so.2 without build-id.
                                            Module libdrm.so.2 without build-id.
                                            Module libpciaccess.so.0 without build-id.
                                            Module libxcvt.so.0 without build-id.
                                            Module libunwind.so.8 without build-id.
                                            Module libudev.so.1 without build-id.
                                            Module libdbus-1.so.3 without build-id.
                                            Module Xorg without build-id.
                                            Stack trace of thread 1350:
                                            #0  0x00007fcef7bd8e6c __printf_fp_l_buffer (libc.so.6 + 0x57e6c)
                                            #1  0x00007fcef7bdf94d __printf_buffer (libc.so.6 + 0x5e94d)
                                            #2  0x00007fcef7be06c1 __vfprintf_internal (libc.so.6 + 0x5f6c1)
                                            #3  0x00007fcef7c9c8a3 __fprintf_chk (libc.so.6 + 0x11b8a3)
                                            #4  0x00000000005bfc55 LogSWrite (Xorg + 0x1bfc55)
                                            #5  0x00000000005bf419 LogVMessageVerbSigSafe (Xorg + 0x1bf419)
                                            #6  0x00000000005be849 ErrorFSigSafe (Xorg + 0x1be849)
                                            #7  0x00000000005b2786 xorg_backtrace (Xorg + 0x1b2786)
                                            #8  0x00000000005b65f9 OsSigHandler (Xorg + 0x1b65f9)
                                            #9  0x00007fcef7bbea70 __restore_rt (libc.so.6 + 0x3da70)
                                            #10 0x00007fcef7bd8e6c __printf_fp_l_buffer (libc.so.6 + 0x57e6c)
                                            #11 0x00007fcef7bdf94d __printf_buffer (libc.so.6 + 0x5e94d)
                                            #12 0x00007fcef7be06c1 __vfprintf_internal (libc.so.6 + 0x5f6c1)
                                            #13 0x00007fcef7c9c8a3 __fprintf_chk (libc.so.6 + 0x11b8a3)
                                            #14 0x00000000005bfc55 LogSWrite (Xorg + 0x1bfc55)
                                            #15 0x00000000005c0044 LogVMessageVerb (Xorg + 0x1c0044)
                                            #16 0x00000000005c057f LogMessageVerb (Xorg + 0x1c057f)
                                            #17 0x00000000004b7248 InitExtensions (Xorg + 0xb7248)
                                            #18 0x00000000004495ec dix_main (Xorg + 0x495ec)
                                            #19 0x00007fcef7ba8fce __libc_start_call_main (libc.so.6 + 0x27fce)
                                            #20 0x00007fcef7ba9089 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x28089)
                                            #21 0x0000000000432835 _start (Xorg + 0x32835)
                                            ELF object binary architecture: AMD x86-64
β–‘β–‘ Subject: Process 1350 (X) dumped core
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
β–‘β–‘ Documentation: man:core(5)
β–‘β–‘ 
β–‘β–‘ Process 1350 (X) crashed and dumped core.
β–‘β–‘ 
β–‘β–‘ This usually indicates a programming error in the crashing program and
β–‘β–‘ should be reported to its vendor as a bug.
Jan 17 17:30:06 ida systemd[1]: systemd-coredump@2-1366-0.service: Deactivated successfully.

I don’t understand this as the two machines are running pretty well the same versions of both kernel and nvidia-drivers:
22.11: kernel=5.15.85 nvidia=390.151
23.11: kernel=5.15.146 nvidia=390.157

This question follows-on from this one because it is really now a different question.

I did notice some compilation during nixos-rebuild switch --upgrade on the 23.11 so I wonder if the version of gcc is significant. Any ideas anyone?

1 Like

23.11’s glibc is 3.38 whereas 22.11’s is 2.35. This may be an incompatibility.

Another thing I’d investigate is a hardware issue. They’re quite old now and, while identical in specs, may not both be entirely in working order. Try it on the other too.

You might also simply be SOL here though. You’re using drivers that Nvidia does not want to support anymore; there’s a reason they’re called β€œlegacy”.
I’d probably spend more time on getting nouveau working somehow because it should work rather okay on this kind of GPU.

I may very well be SoL but Nouveau does not yet drive the external displays at full resolution. I was rather hoping to keep the Nvidia drivers going until Nouveau is ready to take over but this might not be possible.
The 22.11 is my WFH laptop and is too precious to change. I could try 22.11 on the machine that’s currently on 23.11 and will probably do so unless anyone else offers a more attractive solution.
As I recall, with Nouveau the laptop display and the two external displays all were driven, but both externals (natively 2560 x 1440 and 1920 x 1080) at less than full resolution. Also, any attempt to correct the physical layout of the displays in settings / displays led to blanks screens.

1 Like