Nvidia driver not working on Fedora 36 (Dell m7540)

Hi

The Nvidia driver (515.57 and also previous versions) fails to work on a DELL precision m7540, under Fedora 36. Without any extra kernel parameters it results in a blank screen as soon as the graphics manager starts (the problem is apparently well known).
Setting nvidia-drm.modeset=1 on the boot line as suggested on the Fedora bugzilla forum, puts the laptop into a stuck mode, complaining that CPU#0 is stuck in an endless loop, and only the power button allows to recover.

Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

I’ll try

But:

a) If I boot without nvidia-drm.modeset=1, all the screen will turn black, no access to any virtual console (they are black as well), hence it is hard to run anything;
b) If I boot with nvidia-drm.modeset=1, the laptop get stuck with CPU#0 in an infinite loop → no chance to run whichever script, only the power-off button works in that case.

I can try to run nvidia-bug-report.sh for situation a) if I manage to connect from another computer, for situation b) I am fraid it is impossible

Hi

I managed to run nvidia-bug-report.sh for situation a), that is without nvidia-drm.modeset=1 in the kernel command line (see log file enclosed).

As I wrote, in that case after the graphics login everything goes black (with the exception of the mouse pointer) and also all virtual consoles are black). I managed to run the script by connecting from another computer, indeed in this case the laptop is up ad running ok, but the screen is hopelessly black, and even going back to runlevel 3 does not restore it.

For case b), using nvidia-drm.modeset=1 in the kernel command line as suggested by redhat bugzilla 2071209 and other Fedora resources (it is apparently a well known problem), results in a hang computer with no possibility of running diagnostics, only the power button works.
nvidia-bug-report.log.gz (285.3 KB)

Please delete all config files you created in /etc/X11/xorg.conf.d

Already tried. I deleted all of them and generated an xorg.conf with nvidia-config, same result

Did it happen to go flaky after the kernel update to 5.18.13? That’s what happened to me on an Alienware 51m r2. 515.57 works great with 5.18.11.

Yes

After going to 5.18.13 and upgrading to Fedora 36. 5.18.13 as distributed with Fedora 35 does not have the problem

Looks like you’re using GDM to log in to a xfce session? Maybe your user profile is somehow damaged, did you try with an empty profile?

Yes

I tried with a brand new account, same problem.

Also I tried entering a gnome session instead of a Xfce one, same problem.

To be clear, if I add nvidia-drm.modeset=1 on the boot line I do not even arrive at the gdm screen, the laptop hangs and hence I cannot login with any account or any window manager.

Without nvidia-drm.modeset=1, the gdm login screen works ok, but as soon as I login (as myself or a new account, Xfce or gnome), everything goes black, including the virtual consoles if I try to switch back to them.

If I boot on a Fedora 35 kernel (same version 5.18.13, all the rest of the system is Fedora 36) everything works fine, which I believe points to the issue with the framebuffer that the Fedora documentation attributes to the Nvidia driver.

The F36 kernel uses simpledrm, with it active not having vts is expected but not the behaviour after login. AFAIK, setting nvidia-drm.modeset=1 should disable simpledrm thus returning to the F35 behaviour.
It’s very unclear to me why exactly this is happening in your case, the xorg logs show normal operation before and after login.

As I wrote, using nvidia-drm.modeset=1 hangs the Laptop without even arriving to the gdm screen. While without, gdm works normally but as soon as a user connects everything turns black.

Are there plans to adapt the Nvidia driver to simpledrm and make it again compatible with fedora (and other distributions which are going along the same route)? We have a few computers (including a couple of servers) running Fedora + Nvidia and we are scared to bring them to Fedora 36 because of this issue.

I can’t speak for nvidia but the first prerequisite to “being compatible” with simpledrm is implementing a drm fbdev emulation which nvidia devs always declined.

I am not very expert, when I wrote “compatible with simpledrm” I meant “compatible with the way Fedora and other distributions are moving forward”. I personally do not like the way things change all the time in Linux, however it would be surely be a major plus from the user perspective to have a combination Fedora (or other) + Nvidia working flawlessly out of the box as it was for so many years. If you have any suggestion on other tests I could do, please let me know.

Thanks for your help!

Please try getting an nvidia-bug-report.log with nvidia-drm.modeset=1 set, possibly by ssh’ing in from another system.

Thanks again.

I’ll try and see if I manage to connect through ssh despite the hanging, and let you know.

It was suggesting in the Ask Fedora forum to add nomodeset to GRUB_CMDLINE_LINUX= line.

It worked for me.

With nvidia-drm.modeset=1, if I remove “rhgb” from the kernel arguments (that is the semi-graphical fedora boot), the laptop proceeds further, until gdm appears (with rhgb it hangs well before).
At this point, whichever user, old or “virgin”, whichever window manager, xfce or gnome, is used, a black screen appears, the fans go full power and, connecting from another laptop through ssh I could get the bug report, nvidia-bug-report.norhgb.nvidia-drm.modeset1.log.gz.
The machine is hang at that point, see lockup.txt, lockup.png, even though through ssh it is still responsive, shutdown does not work, and only the power button allows to switch it off.
If you have any further suggestion let me know! Thanks again.
nvidia-bug-report.norhgb.nomodeset.log.gz (287.2 KB)

… 2nd attachment
nvidia-bug-report.norhgb.nvidia-drm.modeset1.log.gz (275.9 KB)

… 3rd attachment