99

So, when I suspend my laptop, then wake it up later, my laptop does turn on, I'm able to, for example, turn up and down the volume with audio confirmation using the kepboard, but my screen remains black and doesn't show anything until after I restart my laptop.

9
  • 2
    i updated the kernal to v4.17 and it solve this issue. Jul 4, 2018 at 11:21
  • Related? askubuntu.com/questions/1029405/… Jul 3, 2019 at 7:24
  • 1
    Using Nvidia driver fixed the problem for me
    – M at
    Apr 28, 2020 at 14:34
  • 5
    I can confirm issue still persist on ubuntu 20.04 + hp probook
    – Sisir
    Aug 8, 2020 at 4:43
  • 1
    It seems that this problem happens since the last week in QEMU guests with ubuntu 20.04 and some weeks before started to happen in 21.10
    – yucer
    Jan 23 at 17:10

16 Answers 16

35

It is the buggy nouveau driver again. That's what solved the issue for me. Edit the file /etc/default/grub (using Vi editor -- some users have not been able to save after editing in Vi and have had to use the alternate "Ex" editing mode, which substitutes sudo edit below, then Alt+:w and :x for the save and exit commands).

$ sudoedit /etc/default/grub 

Add nouveau.modeset=0 to the line that says GRUB_CMDLINE_LINUX then press CtrlO then Enter to save the file and CtrlX to leave Editor.

Run

$ sudo update-grub

Now reboot.

10
  • 7
    It didn't work for me - using GTX 970 with nvidia-390 driver. Aug 10, 2018 at 20:51
  • 7
    I have a NVIDIA GTX1050 Ti on 18.04. For me this solution screwed my display resolution without the option to fix it after a reboot. Went to "Software and Updates" (it's in the application list), in "Additional Drivers" I found it was using "X.Org X Server Nouveau Display Driver" and not the NVIDIA provided driver. I selected NVIDIA driver and removed the nouveau.modeset=0 (suggested above) did update-grub and rebooted. Now suspend/resume seems to work well. Hope this helps someone.
    – Ravi
    Jul 25, 2019 at 12:09
  • 1
    What about AMD users? This sounds awfully familiar...
    – AER
    Apr 19, 2020 at 8:20
  • 1
    @Ravi followed your suggestion and it was still happening. Turns out my screensaver was enabled (was a black screen). This can be turned off in Screensaver preferences
    – lasec0203
    Oct 2, 2020 at 2:53
  • 2
    How will the edited file look?? I don't quite understand. May 11, 2021 at 2:08
27

That seems graphics card driver problem.
Try Ctrl + Alt + F3 then Ctrl + Alt + F2 (might be F7) this might turn on display.
But it's temporary solution.

You may want to persistent solution then you can try to upgrade or change your graphics driver or try @cascagrossa's grub settings solution.

5
  • 2
    This solutions works for my setup. 2 monitors connected via DP to an nvidia 1080. When my power settings turn off my monitor 9/10 when resuming my secondary monitor receives the "No display signal" message and remains off. Using these key combinations has worked every time. thanks!
    – John
    Jan 6, 2019 at 22:08
  • This used to work for me, but with some recent upgrade it has stopped working. On an MSI GP62/6QE.
    – talonx
    Feb 8, 2020 at 15:22
  • I am glad this works for me But is any permanent fix to this? I have already updated the nvidia driver to the latest. Nov 3, 2021 at 23:19
  • Hello I didn't found any persistent solution. Did you tried other answers? Nov 9, 2021 at 9:37
  • 1
    I logged in only to give u +1 thank you
    – NieMaszNic
    Jun 23 at 7:37
7

for me switching from gdm3 to lightdm display manager did the trick

1
  • For this, I did apt remove gdm3 & it auto-switched to ligthdm (I think). Works like a charm, but I'd rather have gdm3 back if possible :( Apr 22, 2019 at 14:50
4

Here is what fixed this issue for me on Kubuntu 20.04 Intel NUC PC (NUC8i7HVK), which has Intel HD graphics + embedded Radeon RX Vega M GH:

I went into UEFI BIOS settings and enabled PCIe ASPM (Active State Power Management). I left some other settings such as "Native ACPI OS PCIe" disabled

Enable ASPM in UEFI BIOS

This is very easy to test so give it a shot and see if it helps.

1
  • Saved me, thanks. I had a few options - Off / L0 / L1 / L0 and L1. I chose the last one and it fixed it.
    – homebrand
    Dec 14, 2020 at 6:43
4

Ubuntu 21.10/22.04 NVIDIA 470/510 nv_restore_user_channels bug

This started happening to me as soon as I moved to Ubuntu 21.10 on my Lenovo ThinkPad P51 NVIDIA Quadro M1200, and based on kernel traces, it is this exact bug: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-510/+bug/1946303 My duplicated investigation: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-510/+bug/1953674

To reproduce the problem easily, I had to disconnect the power cable from my laptop and be on battery only. Otherwise, the problem would only happen sometimes, and more commonly after suspending for a few hours.

Workarounds:

  • (tested for several days now, seems to be working) the bug report links to https://forums.developer.nvidia.com/t/fixed-suspend-resume-issues-with-the-driver-version-470/187150/3 from heroic user humblebee which has workaround:

    sudo systemctl stop nvidia-suspend.service
    sudo systemctl stop nvidia-hibernate.service
    sudo systemctl stop nvidia-resume.service
    
    sudo systemctl disable nvidia-suspend.service
    sudo systemctl disable nvidia-hibernate.service
    sudo systemctl disable nvidia-resume.service
    
    sudo mv /lib/systemd/system-sleep/nvidia ~/nvidia.bak
    

    and reboot.

    In case you nuke it, the contents of nvidia.bak are:

    #!/bin/sh
    
    case "$1" in
        post)
            /usr/bin/nvidia-sleep.sh "resume"
            ;;
    esac
    

    That post gives their root cause:

    the 470 driver migrated to systemd method while previous versions relied on Kernel Driver Callback. Apparently this is broken on some setups and kernels.

  • PURGE EVERYTHING FROM NVIDIA: uninstall all nvidia packages (dpkg -l | grep -i nvidia, sudo apt uninstall), and purge their configs as well (sudo apt purge ...). But then you have no acceleration.

    Note that even non graphic stuff like NVIDIA's CUDA/OpenCL package was still breaking things, notably I couldn't suspend after removing the graphics but keeping them, related: Ubuntu 18.04.2 immediately wakes up from suspend

It is easy to know if you've hit the same bug or not, just look for the following stack traces on your dmesg.

Because you are likely shutting down the computer and restarting, you have to look for them in the dmesg of the previous boot as per How to find previous boot log after Ubuntu 16.04+ restarts? :

journalctl -b-1

The traces are:

WARNING: CPU: 0 PID: 18016 at /var/lib/dkms/nvidia/510.47.03/build/nvidia/nv.c:3935 nv_restore_user_channels+0xce/0xe0 [nvidia]

Call Trace:
<TASK>
nv_set_system_power_state+0x22b/0x3e0 [nvidia]
nv_procfs_write_suspend+0xe9/0x140 [nvidia]
proc_reg_write+0x5a/0x90
? __cond_resched+0x1a/0x50
vfs_write+0xc3/0x250
ksys_write+0x67/0xe0
__x64_sys_write+0x19/0x20
do_syscall_64+0x61/0xb0
? exit_to_user_mode_prepare+0x37/0xb0
? syscall_exit_to_user_mode+0x27/0x50
? __x64_sys_newfstatat+0x1c/0x20
? do_syscall_64+0x6e/0xb0
? syscall_exit_to_user_mode+0x27/0x50
? do_syscall_64+0x6e/0xb0
? asm_exc_page_fault+0x8/0x30
entry_SYSCALL_64_after_hwframe+0x44/0xae
WARNING: CPU: 0 PID: 18016 at /var/lib/dkms/nvidia/510.47.03/build/nvidia/nv.c:4152 nv_set_system_power_state+0x2d0/0x3e0 [nvidia]

nv_procfs_write_suspend+0xe9/0x140 [nvidia]
proc_reg_write+0x5a/0x90
? __cond_resched+0x1a/0x50
vfs_write+0xc3/0x250
ksys_write+0x67/0xe0
__x64_sys_write+0x19/0x20
do_syscall_64+0x61/0xb0
? exit_to_user_mode_prepare+0x37/0xb0
? syscall_exit_to_user_mode+0x27/0x50
? __x64_sys_newfstatat+0x1c/0x20
? do_syscall_64+0x6e/0xb0
? syscall_exit_to_user_mode+0x27/0x50
? do_syscall_64+0x6e/0xb0
? asm_exc_page_fault+0x8/0x30
entry_SYSCALL_64_after_hwframe+0x44/0xae

I was also seeing the following ACPI error:

ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.LPCB.EC.HKEY.DEVT.PEGS], AE_NOT_FOUND (20210331/psargs-330)

No Local Variables are initialized for Method [DEVT]

Initialized Arguments for Method [DEVT]:  (1 arguments defined for method invocation)
  Arg0:   00000000fe968048 <Obj>           Integer 00000000000000D3

ACPI Error: Aborting method \_SB.PCI0.LPCB.EC.HKEY.DEVT due to previous error (AE_NOT_FOUND) (20210331/psparse-529)

Related:

2

i fixed it by changing Graphics BIOS configuration: Advanced -> Built-In Device Options -> Graphics, then switched from Hybrid Graphics to UMA Graphics. (on an HP laptop)

1
  • Thanks, worked for ZBook G5 Studio. Graphics setting seems to be problematic for HP's using Linux 18.04 or 19.04. I changed it from Hybrid to Discrete to make the Linux Installer work. Changing to UMA fixed this issue, but does disable the HDMI port. Aug 25, 2019 at 15:24
2

I don't know how to really solve the problem, but remember: before you hold down the power button to hard reboot, you can always soft reboot with this funky sequence:

Hold down Ctrl + Alt + PrScr, then press the following keys one-at-a-time while holding those first 3 keys down the whole time: R, E, I, S, U, B.

Note that on some (many?) laptops/keyboards,the PrScr button may require your Function key, Fn, to activate it, so you may have to hold down Ctrl + Alt + PrScr + Fn instead, while typing the REISUB reboot key sequence.

I don't remember where I learned this, but I read it from someone else years ago on Ask Ubuntu or SuperUser somewhere. The last key, "B", stands for 'B'oot. So, when you press that key your computer will restart.

Keep this in mind for any Linux problem. Only do a hard reboot if this soft reboot sequence first fails.


A few final thoughts:

  1. If you have a Yubikey plugged in, unplug it! It enumerates itself as a USB keyboard to your computer and may have a "jammed key" or otherwise interfere with your computer's normal operation. I make a USB keyboard device called the "Computa Pranksta" and sometimes have a similar problem.
  2. You may have a hardware problem, as I once had on my computer here. To test this, boot into your BIOS/UEFI boot menu and choose to run a full hardware diagnostics test suite, assuming your computer has such an option from the factory. It may reveal bad RAM, a bad motherboard, or something else.
  3. This answer by @Vijay Prema looks promising, but unfortunately I don't have the BIOS password on the computer I'm having problems on, so I can't change the BIOS settings to find out.
1
  • 1
    Regarding the key-sequence for rescue, this link has more detail explanation. (including REISUB; like as Reboot Even If System Utterly Broken).
    – agfe2
    Aug 6, 2021 at 10:25
1

Sorry if what I'm saying is weird (I'm using the google translator). In my case, I am using an Asus Vivobook S15. After desperately searching, I accidentally gave the solution (in my case) and I wanted to share it. What I did was install the Unity Desktop:

$ sudo apt install ubuntu-unity-desktop

And although it seems absurd, it began to work, almost magically. I hope this information is useful for someone. A greeting!

1

For me worked:

sudo nano /etc/default/grub

And edit:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="persistent"
0

I've found that simply pressing the function ("Fn") key wakes the screen up when all else fails. All else being other random key-resses.

0

I tried all the answers given in this post, none of them helped me(changed drivers, updated drivers, edited /etc/default/grub, changed display manager, made more swap, spent some hours, prayed to laptop).

I then finally gave up & thought to enable hibernate mode, while enabling that I ran

cat /sys/power/state

Which gave me

disabled

Then I felt it is due to UEFI boot mode in BIOS. Made that option to legacy support which enabled another option Boot priority, let this be default as UEFI First.

After this I am able to resume the system after suspend.

cat /sys/power/state

now gives more options which has suspend.

This was done on Legion Y540 (GTX 1650 with Nvidia drivers - 418 (no IGPU) /Ubuntu 20 LTS/ Kernel 5.4/ latest BIOS as of date)

P.S. Windows never had any problem resuming from sleep.

0

For KDE / Kubuntu:

Along with changing volume, I could also see the mouse cursor and was able to move it around in the black background(screen). Because of the black "screen", I was not able to login/logout or perform a graceful shutdown or restart.

Previously, killing plasmashell or Xorg from tty, would fix the issue, however this resulted in loss of open applications/windows and unsaved buffer data (like text in Kate etc.)

I finally figured out that I could kill kscreenlocker instead. To do the same.
  1. ctrl + alt + f2
  2. pkill -9 kscreenlocker_g or pkill -9 kscreenlocker_greet
  3. ctrl + alt + f1

Now, the kscreenlocker_greet should have restarted, allowing user login!

Note: This solution is restricted to KDE users only, however it doesn't require changing drivers/display settings, as suggested by above answers.

Cheers!

0

Probably the equivalent of someone pressing buttons to see if it fixes their problems, but looks like adding the persistent keyword to the GRUB_CMDLINE_LINUX_DEFAULT line did the trick for me.

What used to happen is every time I would lock my screen, it turned off my monitor.

After adding the persistent keyword to the GRUB_CMDLINE_LINUX_DEFAULT line of the /etc/default/grub file and running sudo update-grub, my screen no longer turns off after locking. Nowadays, I can come back and enter my password to login and continue my work like a pro without having to do the ALT + F1, F2, F3 key combination that some of you may have gotten used to!

THANKS persistent KEYWORD IN MY GRUB_CMDLINE_LINUX_DEFAULT LINE! (and also megashake)

Here's a sample of my /etc/default/grub file.

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="vga=0 rdblacklist=nouveau nouveau.modeset=0 acpi_osi=Linux persistent"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=1024x768

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
GRUB_INIT_TUNE="480 440 1"
#GRUB_DISABLE_OS_PROBER=false
1
  • Spoke too soon - this really fkn sucks. How hard is it to solve this problem? What I did different was install xscreensaver and fired up the daemon. After messing around with it a couple of times, I removed it. guess it didn't remove it all completely. I just did an apt-get autoremove just then... probably removed some other setting. Idk... Frustrating.
    – Aries VII
    Mar 13 at 11:38
-2
  • Bring pointer[ arrow ] to the bottom of screen
  • Hold down left click bar which locate below touchpad of laptop then push arrow toward to center of screen which move the screen up and you will see the blank bar on the bottom of screen then click it .... It works for me every time....Good luck...
-2
  • Just try to change the boot mode to UEFI in bios.
  • I too encountered the same problem in my lenovo laptop.
  • Just changed the boot mode and i am running it flawlessly
3
  • 6
    Uh. "changed boot mode"? From what? To what?
    – zrajm
    Apr 8, 2019 at 21:11
  • 2
    Wow: this is the epidemy of a bad answer...
    – Jaxian
    Nov 14, 2019 at 12:20
  • SO: How bad do you want this answer to be? SO Answerer: Yes.
    – Aries VII
    Mar 10 at 16:55
-2

This seems to work for me (as a temporary solution).

Device: HP 245 G5

OS: Xubuntu 18.04

When your screen is blank, this sequence of actions seems to do the trick:

  • (wait 5 seconds)

  • CTRL + ALT + F2 (wait a second)

  • CTRL + ALT + F3 (wait a second)

  • CTRL + ALT + F7 (wait a second)

  • ESC (wait a second)

  • ENTER (3 times XD)

  • Close your laptop (wait 5 seconds).

  • Open back your laptop.

  • And the terrific blank screen is gone.

2
  • 14
    Then you do the hokey pokey and you turn yourself around...
    – Cosmo
    Apr 15, 2020 at 13:22
  • I suspended my Ubuntu 18.04 laptop. Normally it wakes up, but about every 3 to 5 suspends it doesn't. This didn't work for me. :( Oct 24, 2020 at 5:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.