20

I sadly do not have the choice of starting a Gnome with Wayland session when logging in (no gear icon showing).

Using a Thinkpad with integrated Intel GPU, WaylandEnable option in /etc/gdm3/custom.conf is commented.

No idea what to do, maybe someone can help?

TY

Thilo
  • 313
  • 1
    Commenting it will disable the Enable/Disable configuration I would of thought, have you tried setting it to True (whilst uncommented (no #))? – Wilf May 18 '20 at 03:48
  • The way it is described in the config itself is that uncommenting is forcing x11 to be used in the first place (Uncomment the line below to force the login screen to use Xorg). Either way, of course I have also tried the uncomment and true combination, but it doesn't work for me :'D – Thilo May 18 '20 at 11:16
  • 1
    Which drivers are you using? Also, how to you know Wayland isn't enabled (I know it used to be the case that some nice animations/gestures did not work). And are you using Gnome Desktop Manager (the login screen gdm), also check for packages say gnome-session-wayland is installed. This question talks about a /usr/share/wayland-sessions/ubuntu.desktop which sounds similar to the also used /usr/share/xsessions folder, might be worth a look at the contents. – Wilf May 18 '20 at 18:50
  • I was indeed missing the gnome-session-wayland package. Now I can switch between Gnome on Xorg and Ubuntu (both X11 according to Settings > About ) but am still missing the wayland option. Maybe it really is the graphics drivers, Settings > About > Graphics tells me I'm using llvmpipe (LLVM 9.0.1, 256 bits)..

    Edit: It seems I can only choose the sessions from share/xsessions, not really sure what to do about those desktop files

    – Thilo May 18 '20 at 21:16
  • 1
    llvmpipe sounds like it is software rendering..,, (I havent tried 20.04 on intel platforms) unless it just shows the rasteriser not the the driver. The question I mentioned above mentions 'lspci -nnk | grep VGA -A1' for the hardware driver. ( https://askubuntu.com/q/31618/178596 ). If it is software rendering (not using a GPU at all) that would explain possible lack of performance. – Wilf Jun 04 '20 at 18:32
  • 1
    Yeah it is software rendering so you need it to use the intle driver if the GPU works at all. Command may work better as 'lspci -nnk | grep VGA -A2' - it may be worth asking about fixing that first! – Wilf Jun 04 '20 at 18:57
  • 1
    Thanks mate! I finally resolved all problems, llvm showing that intel gpu was not used at all, gave the final clue. It all came down to the "nomodeset" parameter i set in the etc/default/grub to get to the login screen after updating to 20.04. Feel a little dumb now, but nonetheless it's all fine now.. even not working brightness controls came back to life cuz of that.

    for anyone wondering this https://askubuntu.com/a/1240633/39261 was the solution

    – Thilo Jun 07 '20 at 16:07
  • @Thilo this worked for my GTX 1060 which was already working but I couldnt change resolution (black screen when I tried). Now I did change resolution. However for my GT 750 it wont work – PPP Jun 10 '20 at 01:50

2 Answers2

28

After doing much searching of the internet I have come up with this solution. This solution will enable Wayland even if you have proprietary NVIDIA drivers on Ubuntu 20.04.

  1. Execute sudo apt install gnome-session-wayland.
  2. Open /etc/gdm3/custom.conf and ensure WaylandEnable=false is commented.
  3. Open /usr/lib/udev/rules.d/61-gdm.rules and comment all lines.
  4. Execute sudo systemctl restart gdm3.
  5. Click on the cogwheel and select GNOME or Ubuntu on Wayland.
  6. Execute echo $XDG_SESSION_TYPE in order to confirm you are running Wayland (output should be "wayland").

This solution can be a bit buggy, for example the Ubuntu environment took a long time to fully load in my case. In my case I am running a GTX 1050 Ti on proprietary drivers.

EDIT: Performance in games is terrible if running this solution. Would not recommend for gaming.

Filbuntu
  • 13,021
  • 37
  • 88
  • 112
austanss
  • 380
  • confirmed - this is the solution. On ubuntu 20.04, with GTX 1650, also had to change a setting in BIOS which used discrete/hybrid graphics. It was set to wrong discrete, turned to hybrid and for my grub, added acpi_osi=Linux (only that). Now everything perfect - intel graphics used and nvidia card I turn on with prime-select nvidia. Perfect, thank you! – c-o-d Aug 06 '20 at 14:02
  • Thanks! Tested, works! – aserww106 Sep 21 '20 at 17:31
  • 2
    in my case I had to reboot (sudo systemctl restart gdm3 wasn't sufficient), other than that - worked! – alexisrozhkov Sep 25 '20 at 09:47
  • Hmm - this didn't work for me on Ubuntu 20.04.1 on a desktop with nvidia GeForce GT 1030 (so quite a modest GPU) with latest nvidia drivers (455.23.05) and CUDA 11.1. I've tried setting acpi_osi=Linux but that didn't help :(. I also tried with nvidia driver 450. Any ideas? – Jack Kelly Oct 16 '20 at 11:59
  • It "works" insofar as you can then see why Wayland is not yet ready. A big delay for the Favourites bar to populate. Show Applications button will not display all apps on clicking. That alone makes you wonder what else may be in store for Gnome-on-Wayland users. No way is it ready for desktop use let alone on a remote server. – Trunk Mar 03 '21 at 12:44
  • @JackKelly On a laptop with PRIME, PRIME is adding DRM. On a single GPU, such as common desktop setup you also need to add nvidia-drm.modeset=1 to the vmlinuz line in the bootloader. – Tamir Daniely Apr 29 '21 at 22:49
  • worked, but only after rebooting. – kksagar Feb 25 '22 at 10:48
  • confirming, works with prime-select nvidia, drivers 515. However, I needed a reboot in order for all of this to work – Ufos Sep 14 '22 at 14:31
8

In my case:

  1. I'm running Ubuntu 20.04.1 with NVIDIA driver metapackage from nvidia-driver-455 (open source).

  2. I did not have to install the gnome-session-wayland package.

  3. I commented out all lines in the /lib/udev/rules.d/61-gdm.rules file (file /usr/lib/udev/rules.d/61-gdm.rules didn't exist).

  4. Rebooted the system just in case.

That fixed the problem for me.

  • Just FYI, you may not have had to install the gnome-session-wayland package because you probably told Ubuntu at install not to install proprietary packages, therefore it installed the Nouveau driver, which in turn allowed Ubuntu to use Wayland. Either way, the driver you installed was Nouveau. My answer documents the process for people who use the proprietary drivers and actively need them for their performance. – austanss Oct 16 '20 at 16:15
  • Hi @ryzenup, I had been running Wayland, on the same laptop, since Ubuntu 18.10, 19.04, 19.10 and for a while with 20.04. After an "apt-get dist-upgrade", the Wayland option disappeared. I tried reinstalling a whole bunch of packages, different NVidia proprietary drivers, and the Nouveau driver as well. Nothing worked. Your post pointed me to the 61-gdm.rules file (although in a different directory), and that alone fixed the problem. Now, I might be mistaken, but I don't believe the 'nvidia-driver-455 (open source)' to be the same as the 'Nouveau (open source)' driver. Thanks for your help. – Bucephalus Oct 17 '20 at 13:00
  • Please note that if you are enabling Wayland by commenting out /usr/lib/udev/rules.d/61-gdm.rules, this might break your proprietary nvidia drivers. In my case nvidia-settings was showing the Prime Profiles option only. This seems like a bug for Wayland. I guess that's why its disabled in /usr/lib/udev/rules.d/61-gdm.rules – Kamal Pandey Dec 02 '21 at 00:34