13

I updated to Ubuntu 22.04 and there is something wrong when I suspend my computer: I have that screen:

enter image description here

I'm using NVIDIA driver (nvidia-driver-470) and I'm on X11 and since the update I can't switch to Wayland anymore from the login session.

enter image description here

edit (23/04/2022):

$ sudo dmidecode -s bios-version
X751LN.302

$ free -h
               total        used        free      shared  buff/cache   available
Mem:            11Gi       1,7Gi       8,1Gi       270Mi       1,8Gi       9,4Gi
Swap:          2,0Gi          0B       2,0Gi


$ sysctl vm.swappiness 
vm.swappiness = 60

$ swapon -s
Filename                Type        Size        Used        Priority
/swapfile                               file        2097148     0       -2



$ sudo lshw -C memory
  *-firmware                
       description: BIOS
       vendor: American Megatrends Inc.
       physical id: 0
       version: X751LN.302
       date: 01/30/2015
       size: 64KiB
       capacity: 6MiB
       capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer acpi usb smartbattery biosbootspecification uefi
  *-cache:0
       description: L2 cache
       physical id: 9
       slot: CPU Internal L2
       size: 512KiB
       capacity: 512KiB
       capabilities: internal write-back unified
       configuration: level=2
  *-cache:1
       description: L1 cache
       physical id: a
       slot: CPU Internal L1
       size: 128KiB
       capacity: 128KiB
       capabilities: internal write-back
       configuration: level=1
  *-cache:2
       description: L3 cache
       physical id: b
       slot: CPU Internal L3
       size: 4MiB
       capacity: 4MiB
       capabilities: internal write-back unified
       configuration: level=3
  *-memory
       description: System Memory
       physical id: c
       slot: System board or motherboard
       size: 12GiB
     *-bank:0
          description: SODIMM DDR3 Synchronous 1600 MHz (0,6 ns)
          vendor: Micron
          physical id: 0
          serial: 00000000
          slot: ChannelA-DIMM0
          size: 4GiB
          width: 64 bits
          clock: 1600MHz (0.6ns)
     *-bank:1
          description: DIMM [empty]
          product: [Empty]
          vendor: [Empty]
          physical id: 1
          serial: [Empty]
          slot: ChannelA-DIMM1
     *-bank:2
          description: SODIMM DDR3 Synchronous 1600 MHz (0,6 ns)
          vendor: 0000
          physical id: 2
          serial: 0104AB19
          slot: ChannelB-DIMM0
          size: 8GiB
          width: 64 bits
          clock: 1600MHz (0.6ns)
     *-bank:3
          description: DIMM [empty]
          product: [Empty]
          vendor: [Empty]
          physical id: 3
          serial: [Empty]
          slot: ChannelB-DIMM1

I think i don't have ram issues according to memtest :

memtest enter image description here

I manage to get Wayland back by editing

/usr/lib/udev/rules.d/61-gdm.rules

as @ManOnTheMoon suggested in comments.

Willi Mentzel
  • 638
  • 1
  • 7
  • 20
GuillaumeF93
  • 455
  • 1
  • 2
  • 11
  • 1
    Edit your question and show me `sudo dmidecode -s bios-version` and `free -h` and `sysctl vm.swappiness` and `swapon -s` and `sudo lshw -C memory`. You may wish to try the newer Nvidia software. Also go to https://www.memtest86.com/ and download/run their free `memtest` to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take a few hours to complete. Report back. Start comments to me with @heynnema or I'll miss them. – heynnema Apr 22 '22 at 17:20
  • 2
    there is a bug report regarding wayland option not available [link](https://askubuntu.com/questions/1403854/cant-use-wayland-with-nvidia-510-drivers-on-ubuntu-22-04-lts#comment2438039_1403854) and mentioned here [link](https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1969254). In the bug log, there is a mentioning about the suspend issue which you might want to have a look – ManOnTheMoon Apr 23 '22 at 10:48
  • @heynnema I did the memory check and i think i don't have issue. I also tried some other nvidia driver but i have a blank message box when i try to change it with additional drivers ... – GuillaumeF93 Apr 23 '22 at 17:15
  • @ManOnTheMoon thanks to help me get wayland option back! I did not find the the bug log you mentioned. – GuillaumeF93 Apr 23 '22 at 17:17
  • I think I should do a fresh install of Ubuntu 22.04 because i have an other issue: transmission does not want to start ... – GuillaumeF93 Apr 23 '22 at 17:19

5 Answers5

20

After a few days of searching for a solution, I finally found one of the solutions I tried yesterday, and it finally worked! But I haven't found out any further whether the impact on my laptop in the future, at least this solution can help me first for now. Who knows this can help other friends too..

From the following reference (in comment #2 from dhenry), I tried disabling nvidia-resume and nvidia-suspend services using this command :

systemctl disable nvidia-hibernate.service nvidia-resume.service nvidia-suspend.service

Source : https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-510/+bug/1970088

Equinox
  • 366
  • 1
  • 7
  • 1
    worked on X11 GeForce GTX 1050 Mobile, driver NVIDIA 510, Ubuntu 22.04 thank you!! – Christians May 08 '22 at 12:04
  • Didn't work for me, with NVIDIA geforce rtx 3070 with driver 510.73.05 – fccoelho May 31 '22 at 19:34
  • 3
    problem resurfaced after some update within 22.04 – Christians May 31 '22 at 23:48
  • Didn't work for me either. Nvidia GTX 970 with driver 515.65.01. – holocronweaver Aug 19 '22 at 19:08
  • Seemed to work for me with thinkpad x1 w/ nvidia – monkut Aug 20 '22 at 01:56
  • Worked for mee too, 22.04 with rtx 3090. – florestan Oct 03 '22 at 15:30
  • This answer didn't work for my thinkpad E14. However, the comment of *bmharper* in this github issue https://gist.github.com/bmcbm/375f14eaa17f88756b4bdbbebbcfd029 worked like a charm – ibilgen Oct 05 '22 at 22:35
  • This works, but gives some really strange graphics artefacts when resuming. Notably teams and steam show blank parts of the screen instead of images (or who is calling in case of teams). It seems to me that nvidia-suspend ought to have committed some memory to disk which now no longer happens when removing those services. – user114676 Oct 26 '22 at 06:41
  • Worked for me, too. Ubuntu 22.10 on Wayland with Nvidia GeForce GT 1030. – Sasha MaximAL Mar 31 '23 at 09:41
  • How do you 1) verify the systemctl states _before_ and _after_ running those commands? And 2) undo this change? – Gabriel Staples Jun 12 '23 at 05:01
  • For me it gave `Unit /etc/systemd/system/nvidia-hibernate.service is masked, ignoring. Unit /etc/systemd/system/nvidia-resume.service is masked, ignoring. Unit /etc/systemd/system/nvidia-suspend.service is masked, ignoring. ` – desmond13 Jul 30 '23 at 13:03
4

For others who have the same bug, but integrated card - it seems like new bug in Ubuntu 22.04.

littleguga
  • 470
  • 1
  • 3
  • 9
  • 1
    Disabling Waylang in file `etc/gdm3/custom.conf` worked for me. section of the change file: `[daemon] # Uncomment the line below to force the login screen to use Xorg WaylandEnable=false` – Bauna Jun 03 '22 at 00:24
4

I have a Dell XPS 7590 (GeForce GTX 1650) and had the same problem.

For me it was resolved when I changed the used driver from X.Org X Server to NVIDIA driver metapackage from nvidia-driver-515.

enter image description here

Willi Mentzel
  • 638
  • 1
  • 7
  • 20
3

For me, the NVidia driver 510 that came with the Ubuntu 20.04 allows the system to suspend correctly but after installing Cuda 11.7 it updates the driver to 515 which does not suspend/hibernate. Now when I try to suspend, it just goes back to the lock screen but doesn't power-down.

The fix for this can be found at.. https://forums.developer.nvidia.com/t/ubuntu-20-04-installing-cuda-changes-nvidia-drivers-and-breaks-suspend/196220. It's requires a few steps to implement but after doing so my system now suspends and wakes up correctly.

Basically, the 515 driver (or at least what's in the cuda 11.7 install package) is not installing/linking the following files...

/lib/systemd/system/nvidia-*(hibernate, resume, suspend)
/lib/systemd/system-sleep/nvidia
/usr/bin/nvidia-sleep.sh

These need to be manually installed and then correctly linked into the systemd file structure for suspend to work. The script in the above link automates this once you've gathered the above files into a single directory. I copied these files from my 20.04 system to use in 22.04, though he did also post text versions of the files in the link.

bivouac0
  • 451
  • 3
  • 12
  • At least in Ubuntu 22.04 with nvidia 515 driver, these files should already be present. At any rate they can be added via `systemctl enable nvidia-hibernate.service nvidia-resume.service nvidia-suspend.service` which will add the appropriate symlinks. Does not solve the issue for me. – holocronweaver Aug 19 '22 at 20:23
1

Everything is working now using Xorg (ubuntu on xorg from gdm) with nvidia-driver-510 (from additional drivers).

GuillaumeF93
  • 455
  • 1
  • 2
  • 11
  • 1
    for me the problem persists, please see the screenshot, Is the same driver?. I activated Xorg from GDM following the recommendations of ManOnTheMoon [driver nvidia](https://i.stack.imgur.com/l0zOj.png) – rianmz Apr 27 '22 at 05:02
  • @rianmz, I think GuillaumeF93 gotten back the wayland option from the link. As for the suspend issue, you might want to manually downgrade your driver using the GUI; Software & Updates and go to the Additional Drivers tab (remember to reboot before testing the suspend option). I'm using 390 to fix the suspend problem on my machine. But everybody's hardware is different, hence, it'd be best to try till you find one. You can read more about it here [link](https://askubuntu.com/questions/1345073/suspend-not-working-properly-cannot-wake-up-on-ubuntu-20-04-with-nvidia/) – ManOnTheMoon Apr 27 '22 at 07:22
  • Just to add, my machine is running kernel 5.15.0-27-generic, GeForce 940MX, Wayland on Ubuntu 22.04 with the downgraded Nvidia 390 driver. – ManOnTheMoon Apr 27 '22 at 07:39