470.xx driver and above fails to enable internal display on a Thinkpad P53 properly after boot or suspend

Several similar problems in this forum, I’d like to add mine.

System: Thinkpad P53 with a Quadro RTX 4000. OS: Ubuntu 20.04 (upgraded from 18.04) with latest HWE kernels and Xorg.

This all started with the 470.xx driver, 460.xx and below has been fine, 470.xx and above (495.xx too) have been a disaster. However, I’ve failed to notice for some time, since I’m docked to two external displays via Thinkpad Thunderbolt 3 Workstation Dock most of the time. One day, I needed to work from the train and couldn’t get the laptop to a proper working state. Currently, the problem looks like this:

  1. As far as I could check, everything works fine with Windows 10, so I think it’s not a hardware problem.

  2. Booting the laptop without an external display, I can see output (UEFI, Grub, console output, LUKS prompt) up to the point where GDM3 should appear and it probably does, but I can’t see it on the internal display. Wayland in GDM3 is disabled, so that’s probably not it.

  3. Attaching an external display (mostly via the docking connector to the Thunderbolt port) sometimes enables the external display at this stage.

  4. Booting up docked enabled both external displays. Opening the lid and reconfiguring the displays to use the internal display seems to work, i.e. the system seems to use both the internal and the external display (e.g. virtual desktops), but the laptop actually fails to show anything (i.e. is still black/blank).

  5. After working with docked laptop, I pull out the docking connector and open the lid. At this point the internal display activates and can be used. Closing the lid now would suspend the machine. In suspended mode, plugging in the docking connector resumes the machine and activates the external displays.

  6. In suspend mode, plugging in a simple Thunderbolt connector + power supply (without the dock) wakes the machine and enabled the external display. Pulling these two connectors does not enable the internal display.

  7. When waking the machine without external connectors, very briefly some console output can be seen on the internal display. After that, the display stays blank/black.

I’ve attached the output of nvidia-bug-report.sh, however I couldn’t find anything suspicious. Please ignore the installer.log for 440.xx, it’s been a long time since I’ve tried that, it seems the logs are still there. I’ve experimented quite a bit today with different kernels, versions and module parameters, the logs should be showing that. The last relevant experiment has started at about 18:50 local time, I’ve been connecting to the DELL P2715Q external display repeatedly.

(PS: now that I’ve written all that, I notice xrandr is showing my internal display as running at 4k with 29.98Hz while the panel should be running at 60Hz at all times AFAIK. This might as well be the culprit, I think it fits the symptoms. Gotta reboot to Windows and re-check the item 0 above. Still, would appreciate any pointers in this and any other direction It seems to be the external display that’s running at 30 Hz. That’s a different problem, since it’s supposed to run at 60Hz, but I’ll take care of that one later)

(Update 1: This is interesting. I’ve rebooted to Windows, verified that my external display indeed works with 4K@60Hz, rebooted back, confirmed 4K@60Hz under Linux (apparently, there is a certain chance that the refresh rate can differ based on when the cable has been attached) and suddenly my internal display went on without a hitch. Tried suspend/resume, it worked too! That’s pretty wild, will have to experiment more)

nvidia-bug-report.log.gz (743.1 KB)