Black Screen After Wake From Sleep

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
Scy
Level 1
Level 1
Posts: 12
Joined: Mon Mar 28, 2022 11:27 am

Black Screen After Wake From Sleep

Post by Scy »

Monitors Won't Turn On / Black Screen After Wake From Sleep

Symptom: When attempting to wake system from sleep or hibernate, neither monitors wake up or display the environment/login screen, even though the system itself appears to wake up: my keyboard lights up as if the system woke up. I end up having to hold down the power button to force a shut down. Even if I specified that clicking once on the power button should make Linux perform the shut down process (so I am not damaging the file system/services or whatever every time I hard reset). Generally when this problem happens, I've pressed the sleep/hibernate button on my keyboard, and I'll find later in the night that the GPU's RGB is still lit up blue inside the case if it glitches out, otherwise it's off (and properly slept?).

History: I used to have this issue on 20.3. I don't remember how I resolved it, but it didn't return when upgrading through to 21.3. However, after a BIOS update (to get my monitor's audio to work) and fresh reinstall of 21.3 (my root partition was getting full and had to reformat so it wasn't separated from /home). I vaguely recall I did something with hibernate or sleep, disabling either of them, and possibly something with the swap file, but don't remember exactly.

I've tried modifying the etc/default/grub file (and running update-grub) to have amd_iommu=off in kernel boot settings. I also found an 'NB' setting in the BIOS that had 'iommu' settings in there that I set to 'disabled'. From my search about it, these seem like they have something to do with my APU having integrated graphics while using a dedicated GPU.

I also disabled screensaver entirely, as my search on this issue said that it could have been an issue of the system going to screensaver -after- it sleeps/hibernates, and then being unable to wake.

I do not know if it is related, but my old install was not UEFI (unlike current), and it had the ACPI errors when initially booting from powered off that I still get with this fresh install.

Code: Select all

System:
  Host: scy-System-Product-Name Kernel: 5.15.0-97-generic x86_64 bits: 64
    compiler: gcc v: 11.4.0 Desktop: Cinnamon 6.0.4
    Distro: Linux Mint 21.3 Virginia base: Ubuntu 22.04 jammy
Machine:
  Type: Desktop Mobo: ASUSTeK model: ROG STRIX B450-I GAMING v: Rev 1.xx
    serial: <superuser required> UEFI: American Megatrends v: 4007
    date: 12/08/2020
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 3
    charge: 100% (should be ignored) status: Discharging
CPU:
  Info: quad core model: AMD Ryzen 5 2400G with Radeon Vega Graphics bits: 64
    type: MT MCP arch: Zen rev: 0 cache: L1: 384 KiB L2: 2 MiB L3: 4 MiB
  Speed (MHz): avg: 1460 high: 1596 min/max: 1600/3600 boost: enabled
    cores: 1: 1392 2: 1531 3: 1596 4: 1367 5: 1424 6: 1517 7: 1389 8: 1464
    bogomips: 57485
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
    vendor: Sapphire Nitro+ driver: amdgpu v: kernel bus-ID: 01:00.0
  Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: amdgpu,ati
    unloaded: fbdev,modesetting,vesa gpu: amdgpu resolution: 1: 1920x1080~60Hz
    2: 1920x1080~60Hz
  OpenGL: renderer: AMD Radeon RX 570 Series (polaris10 LLVM 15.0.7 DRM
    3.42 5.15.0-97-generic)
    v: 4.6 Mesa 23.2.1-1ubuntu3.1~22.04.2 direct render: Yes
Audio:
  Device-1: AMD Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]
    vendor: Sapphire driver: snd_hda_intel v: kernel bus-ID: 01:00.1
  Device-2: AMD Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel
    v: kernel bus-ID: 08:00.6
  Device-3: JBL Quantum 800 type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-3:2
  Sound Server-1: ALSA v: k5.15.0-97-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: kernel
    port: d000 bus-ID: 04:00.0
  IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: 04:d4:c4:49:2a:36
  Device-2: Realtek RTL8822BE 802.11a/b/g/n/ac WiFi adapter vendor: ASUSTeK
    driver: rtw_8822be v: N/A port: c000 bus-ID: 05:00.0
  IF: wlp5s0 state: down mac: dc:f5:05:56:75:3b
  IF-ID-1: docker0 state: down mac: 02:42:a8:5e:57:df
Bluetooth:
  Device-1: ASUSTek Bluetooth Radio type: USB driver: btusb v: 0.8
    bus-ID: 1-8:5
  Report: hciconfig ID: hci0 rfk-id: 0 state: up address: DC:F5:05:56:75:3A
    bt-v: 2.1 lmp-v: 4.2
Drives:
  Local Storage: total: 6.37 TiB used: 1.65 TiB (25.8%)
  ID-1: /dev/nvme0n1 vendor: Western Digital model: WD BLACK SN750 2TB
    size: 1.82 TiB temp: 37.9 C
  ID-2: /dev/sda vendor: Crucial model: CT1000MX500SSD1 size: 931.51 GiB
  ID-3: /dev/sdb type: USB vendor: Western Digital model: WD My Book 25EE
    size: 3.64 TiB
Partition:
  ID-1: / size: 1.77 TiB used: 172.73 GiB (9.5%) fs: ext4 dev: /dev/nvme0n1p3
  ID-2: /boot/efi size: 487 MiB used: 6.1 MiB (1.2%) fs: vfat
    dev: /dev/nvme0n1p2
Swap:
  ID-1: swap-1 type: partition size: 15.26 GiB used: 0 KiB (0.0%)
    dev: /dev/nvme0n1p1
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: amdgpu temp: 42.0 C
  Fan Speeds (RPM): N/A gpu: amdgpu fan: 1636
Info:
  Processes: 350 Uptime: 18m Memory: 31.26 GiB used: 3.38 GiB (10.8%)
  Init: systemd runlevel: 5 Compilers: gcc: 11.4.0 Packages: 2511 Shell: Bash
  v: 5.1.16 inxi: 3.3.13
I'm going nuts about this thing, I dislike losing the whole machine state by shutting down every night and heard hard shutdowns cause corruption of the OS.
Last edited by SMG on Sun Feb 25, 2024 3:17 pm, edited 2 times in total.
Reason: Moved from Installation & Boot to Other Topics becauses there is no problem installing or booting Linux Mint. You are not "booting" when resuming from sleep.
User avatar
sebastjava
Level 5
Level 5
Posts: 714
Joined: Wed Jun 28, 2017 8:01 pm
Location: Montréal, Québec, Canada
Contact:

Re: Black Screen After Wake From Sleep

Post by sebastjava »

First, I would recommend you avoid going into the hibernate state. Disable this if you can. The sleep state is less likely to be bugged, compared to the hibernate state.

Next, your story kind of reminds me of some old weird adventures on my old little netbook. That's just some old distant memories. I am sure your machine does not compare with my old one, but there was a little trick I had back then, and it saved my life, so to speak. Just take a look at my old How To Switch On Your Black Screen: Shortcut & Script. Just try my simple keyboard shortcut. Does that help?

It is essential that you find the exact name for your monitor. For example, mine is currently HDMI-2. I am now on a very different machine and system: HP EliteDesk 800 G2 SFF with LM Cinnamon 21.3. I tested this old trick and it still works! Once the GPU is turned off, nothing else can turn it back on...
The future Linux Mint Forums is here.
Self-Appointed Benevolent Designer on Linux Mint Cinnamon.
Image
Scy
Level 1
Level 1
Posts: 12
Joined: Mon Mar 28, 2022 11:27 am

Re: Black Screen After Wake From Sleep

Post by Scy »

sebastjava wrote: Sun Feb 25, 2024 10:27 pm First, I would recommend you avoid going into the hibernate state. Disable this if you can. The sleep state is less likely to be bugged, compared to the hibernate state.

Next, your story kind of reminds me of some old weird adventures on my old little netbook. That's just some old distant memories. I am sure your machine does not compare with my old one, but there was a little trick I had back then, and it saved my life, so to speak. Just take a look at my old How To Switch On Your Black Screen: Shortcut & Script. Just try my simple keyboard shortcut. Does that help?

It is essential that you find the exact name for your monitor. For example, mine is currently HDMI-2. I am now on a very different machine and system: HP EliteDesk 800 G2 SFF with LM Cinnamon 21.3. I tested this old trick and it still works! Once the GPU is turned off, nothing else can turn it back on...
Maybe as a last resort, thank you. Right now I couldn't find any 'wake on USB' options in BIOS, but my USB setup was rearranged to possibly fix (if that was the issue). Before relenting that there's some Cinnamon resetting button requiring a bind. I haven't even tried Ctrl+Alt+Esc yet (reset Cinnamon).

I've done more research about whether it is possibly Hibernate, Sleep or Hybrid Sleep. I don't believe Hibernate is enabled by default, so I would never have enabled it. I must be using sleep or hybrid sleep, but I don't now to test one/the other in isolation to see if it makes a difference. I saw an option to disable my 'IGFX' (Internal Graphics?), likely the APU Graphics Processor. I couldn't bring myself to risk that though.

My biggest thought right now is that it is because I installed Linux Mint as UEFI and Secure Boot is enabled - where on my previous installation it wasn't. However, I have no options in my BIOS to turn off Secure Boot... It is grayed out. As well, I have a 2TB nvme and 4 TB external drive, so I don't need partitions above 2 TB yet, but if I ever do, then it seems a UEFI install is necessary.

Too much going on, though, in my personal life RN looking for a job. Maybe I'll just reinstall again non-UEFI when I have stable employment and can afford some upgrades, do it all at once again.
User avatar
sebastjava
Level 5
Level 5
Posts: 714
Joined: Wed Jun 28, 2017 8:01 pm
Location: Montréal, Québec, Canada
Contact:

Re: Black Screen After Wake From Sleep

Post by sebastjava »

I wasn't asking you to make that script. It probably wouldn't work anymore, because things have changed, and I understand you don't want to mess around.

But you could have tried this little test. I am sure it wouldn't hurt. I've done it yesterday. I am currently on Linux Mint Cinnamon 21.3 and I re-tested and updated these instructions here. That was just to get a possible clue about what is going on. This xrandr is part of your system. I was just asking you to try this:

Get your monitor's name by typing xrandr --listactivemonitors in your terminal. That's not dangerous!

Example:

Code: Select all

xrandr --listactivemonitors
Monitors: 1
 0: +*HDMI-2 1920/527x1080/296+0+0  HDMI-2
So, in this example here, I find my monitor is named HDMI-2.

Next, I was just suggesting you just try to switch it off and then back on. That's not super-complicated. But there is a little problem here... You can hardly use your terminal to enter some command to switch your monitor back on because... You can't see anything! That's were the keyboard shortcut comes very very very handy.

ScreenSwitchOn keyboard shortcut
  1. Go to Start Menu > Preferences > Keyboard > Shortcuts
  2. Click "Add custom shortcut"
  3. Name it "ScreenSwitchOn" and enter this command: /usr/bin/xrandr --output YOUR-MONITOR-NAME --auto (Change "YOUR-MONITOR-NAME" to your monitor's name.)
  4. Click "Add"
  5. Click over "unassigned" and enter your custom keyboard shortcut (example: Ctrl+F7)
  6. Close that window
Now, test it. Save all your opened files and close everything, because if it does not work you will have to restart your computer. Ready? Open a terminal and turn off the screen with this command: xrandr --output YOUR-MONITOR-NAME --off. (Change "YOUR-MONITOR-NAME" to your monitor's name.) Now, pressing your keyboard shortcut (example: Ctrl+F7) should get you out of trouble.

Next time you get that blank screen when your computer resumes from sleep, try that keyboard shortcut. Does it gets you out of trouble? Yes, I know, that's not a "professional" solution, but at least you now have a clue about what is going on.

P.S.: IN THE WORST CASE, you would make a mistake in getting your monitor's name, so you wouldn't be able to turn it back on... But that's not a concern, because if you didn't get the right name, you couldn't switch it off either, anyway. And, in the very worst case, you would just end up having to force power off and then power on again, as you probably already had to do many times. This "switch off" is not permanent, it does not cause any "damage". Anyway, I understand you should take care of your job first. That's a good argument. Just think about this later, please... I am not sure you need to buy a new computer...
The future Linux Mint Forums is here.
Self-Appointed Benevolent Designer on Linux Mint Cinnamon.
Image
Scy
Level 1
Level 1
Posts: 12
Joined: Mon Mar 28, 2022 11:27 am

Re: Black Screen After Wake From Sleep

Post by Scy »

Thank you @sebastjava, I will try that if I encounter it again. Right now I haven't re-encountered it because I go into the start menu and press 'Suspend' instead of doing my keyboard shortcut built into the Razer keyboard that has a moon icon. I will probably find out in short order if clicking 'Suspend' from the start menu doesn't address it at all. It's worked two times so far.

My guess - if this fixes it - is that the change I made last time was I reduced or disallowed the use of swap for any sleep/hibernation activity, forcing the keyboard button to trigger a 'Suspend' instead of a 'Hibernate' or 'Hybrid'.
User avatar
sebastjava
Level 5
Level 5
Posts: 714
Joined: Wed Jun 28, 2017 8:01 pm
Location: Montréal, Québec, Canada
Contact:

Re: Black Screen After Wake From Sleep

Post by sebastjava »

Just in case you find you still have a problem when using your keyboard "moon" key, while it works fine with the Menu > Quit > Suspend... Then there is something else I thought you could try... Maybe...

Open Menu > Preferences > Keyboard > Shortcuts

In the System category, select Suspend and make a keyboard binding with your "moon" key...

But first, test it: try to assign your "moon" key to some other action, like "Lock screen", for example. Just to make sure you can really override the internal preset...

This may sound confusing. It is just based on the assumption that your "moon" key triggers some hardware specific "sleep" mode. Something that is not exactly the same as doing a Menu > Quit > Suspend... In that case, I thought maybe you could bind that key to a regular "sleep" mode.
The future Linux Mint Forums is here.
Self-Appointed Benevolent Designer on Linux Mint Cinnamon.
Image
User avatar
sebastjava
Level 5
Level 5
Posts: 714
Joined: Wed Jun 28, 2017 8:01 pm
Location: Montréal, Québec, Canada
Contact:

Re: Black Screen After Wake From Sleep

Post by sebastjava »

Keyboard-Shortcuts.png
The future Linux Mint Forums is here.
Self-Appointed Benevolent Designer on Linux Mint Cinnamon.
Image
Scy
Level 1
Level 1
Posts: 12
Joined: Mon Mar 28, 2022 11:27 am

Re: Black Screen After Wake From Sleep

Post by Scy »

Just coming back to report since using 'Suspend' from the shut down start menu, I haven't encountered the issue. So I'll look into those keyboard shortcuts. Thanks.
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Black Screen After Wake From Sleep

Post by SMG »

Scy wrote: Sun Feb 25, 2024 2:08 pmMachine:
Type: Desktop Mobo: ASUSTeK model: ROG STRIX B450-I GAMING v: Rev 1.xx
serial: <superuser required> UEFI: American Megatrends v: 4007
date: 12/08/2020
If you do run into future issues, you may want to check and see if you are running the most recent BIOS/UEFI. If this is the correct link, the latest is version 5302 and the last several mention "improve system stability".
Image
A woman typing on a laptop with LM20.3 Cinnamon.
CJRoss
Level 1
Level 1
Posts: 30
Joined: Tue Feb 20, 2024 7:42 am

Re: Black Screen After Wake From Sleep

Post by CJRoss »

I'm having the same issue with Hibernate but Suspend works mostly fine. In my case I get a display up until I put in my decryption password and then the display signal drops out. When this happens with suspend, I can manually turn them back on, but that doesn't work with hibernate. I'm running LMDE but I'm not sure if that makes a difference or that it's just a Cinnamon problem.
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Black Screen After Wake From Sleep

Post by SMG »

CJRoss wrote: Sun Mar 10, 2024 2:31 pm I'm having the same issue with Hibernate but Suspend works mostly fine. In my case I get a display up until I put in my decryption password and then the display signal drops out. When this happens with suspend, I can manually turn them back on, but that doesn't work with hibernate. I'm running LMDE but I'm not sure if that makes a difference or that it's just a Cinnamon problem.
OP has already indicated if they use suspend from the menu then they no longer have the problem. You sound like you have a different issue. Please post LMDE issues in the LMDE forums even if you think it is a "Cinnamon" issue.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
Scy
Level 1
Level 1
Posts: 12
Joined: Mon Mar 28, 2022 11:27 am

Re: Black Screen After Wake From Sleep

Post by Scy »

Just giving one final report that this issue hasn't sprang up again ever since I clicked 'Suspend' instead of the keyboard shortcut. In fact, I did re-bind the 'Hibernate' key from the Linux Mint Keyboard Shortcuts settings into the Suspend action, and I am using the 'moon' key on my keyboard to Suspend just fine.
Post Reply

Return to “Other topics”