17

I installed the NVIDIA 510 drivers from the Additional Drivers app on Ubuntu 22.04. I also edited /etc/default/grub and added GRUB_CMDLINE_LINUX="nvidia-drm.modeset=1". Unfortunately, it didn't work. I can't see the little gear icon when I login.

Funnily enough I had 21.10 running before this install and it was working in Wayland after editing /etc/default/grub.

Here is my setup. It's a very recent Dell Laptop with Secure Boot enabled:

laptop specifications

  • You're probably facing this bug. I guess you need to compromise with X11 until it gets fixed. I also suggest that you subscribe to the bug and to notifications about it so you get immediately informed when the fix is ready. – BeastOfCaerbannog Apr 22 '22 at 20:01
  • Sane problem here Ci5 10 + nVidia GTX 1650 + driver 510.

    In the login screen I can't see the gear, add line to the grub same issue. looks like it's a confirmed bug: https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1969243

    – mlacunza Apr 23 '22 at 00:07
  • 1
    i thought 22.04 shipped wayland as default and didn't check whether it is running wayland till i saw this post. And i too am having the same issue of not having wayland as a login option. the latest log said it's fixed, however, don't seems to be reflected in the updates. – ManOnTheMoon Apr 23 '22 at 06:50

4 Answers4

14

In the file /usr/lib/udev/rules.d/61-gdm.rules in my case, I just commented the last two one here

LABEL="gdm_prefer_xorg"
#RUN+="/usr/lib/gdm-runtime-config set daemon PreferredDisplayServer xorg"
GOTO="gdm_end"

LABEL="gdm_disable_wayland" #RUN+="/usr/lib/gdm-runtime-config set daemon WaylandEnable false" GOTO="gdm_end"

It did work on Ubuntu 22.04 or if still does not work, you can comment something that is related to it.

Pablo Bianchi
  • 15,657
  • 1
    The udev file has logic to enable wayland on 510 according to the comments just a few lines above. If its being disabled there is probably a reason. Is commenting out these lines the only way to make 510 work with wayland? This feels like we're using a hammer to turn off the stereo. – gnomed Apr 27 '22 at 03:07
  • This answer and the answer below (https://askubuntu.com/a/1403999/4928) fixed my problem. Thanks! – lapega Jun 01 '22 at 18:34
  • I have a desktop computer with the NVIDIA GeForce GT 720 with NVIDIA's proprietary 470 driver. This and Rovano's solutions didn't work for me. Still, my only options after clicking the gear icon are "Ubuntu" or "Gnome Classic". – John Sep 03 '22 at 14:33
7

Two possible solutions:

  1. Enable unreleased updates [ Alberto Milone ]

    • Default to Wayland for hybrid systems with Nvidia graphics drivers.
    • Default to Xorg but offer Wayland with the gear button on the login screen for non-hybrid systems with Nvidia graphics drivers. (LP: #1968929)
  2. Workaround Create a file in /etc/modprobe.d/nvidia-power-management.conf containing the text:

    options nvidia NVreg_PreserveVideoMemoryAllocations=1
    

Otherwise, follow these bug reports:

Zanna
  • 70,465
Rovano
  • 81
2

Because /tmp is a tmpfs on my system, i need to set

options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp

in /etc/modprobe.d/nvidia-power-management.conf. After rebuilding initramfs with update-initramfs -u and a reboot, Wayland is working for me.

Pilot6
  • 90,100
  • 91
  • 213
  • 324
  • I could confirm this method makes the Wayland option re-appear after a fresh 22.04 install. I chose this approach because I use system hibernation often in my desktop machine and "preserve memory allocations" is required in order to avoid video glitches after resume. I'll report here if I find problems over time. – Ari May 07 '22 at 18:07
0

From this article:

sudo nano /etc/gdm3/custom.conf

Within this file, look for the line that says #WaylandEnable=false. You can uncomment this line and either set it to true or false, depending on whether you want Wayland enabled or not.

WaylandEnable=true
muru
  • 197,895
  • 55
  • 485
  • 740