Bit of an odd one - resume from suspend = black screen

But if I issue a swaymsg reload it works, but kills firefox (not a problem).

I use a keybind to run swaymsg reload it works. Baffled.

Running on the AMD iGPU not the nVidia dGPU.

System:
  Kernel: 5.19.8-AMD arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    Desktop: sway v: 1.8-dev-07bfeb2a Distro: EndeavourOS base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82JY v: Legion 5 17ACH6H
    serial: <filter>
  Mobo: LENOVO model: LNVNB161216 v: SDK0R32862 WIN serial: <filter>
    UEFI: LENOVO v: GKCN57WW date: 06/16/2022
Battery:
  ID-1: BAT0 charge: 84.5 Wh (100.0%) condition: 84.5/80.0 Wh (105.7%)
    volts: 16.7 min: 15.4 model: Celxpert L20C4PC2 status: full
Memory:
  RAM: total: 13.52 GiB used: 6.15 GiB (45.5%)
  Array-1: capacity: 32 GiB slots: 2 EC: None max-module-size: 16 GiB
    note: est.
  Device-1: DIMM 0 type: DDR4 size: 8 GiB speed: 3200 MT/s
  Device-2: DIMM 0 type: DDR4 size: 8 GiB speed: 3200 MT/s
CPU:
  Info: 8-core model: AMD Ryzen 7 5800H with Radeon Graphics bits: 64
    type: MT MCP arch: Zen 3 rev: 0 cache: L1: 512 KiB L2: 4 MiB L3: 16 MiB
  Speed (MHz): avg: 1154 high: 2605 min/max: 400/4463 boost: enabled cores:
    1: 400 2: 400 3: 400 4: 400 5: 2329 6: 400 7: 2523 8: 400 9: 2078 10: 400
    11: 2394 12: 400 13: 2535 14: 400 15: 2605 16: 400 bogomips: 102254
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: NVIDIA GA104M [GeForce RTX 3070 Mobile / Max-Q] vendor: Lenovo
    driver: nvidia v: 515.65.01 arch: Ampere bus-ID: 01:00.0
  Device-2: AMD Cezanne vendor: Lenovo driver: amdgpu v: kernel
    arch: GCN-5.1 bus-ID: 06:00.0
  Device-3: Acer Integrated Camera type: USB driver: uvcvideo bus-ID: 1-3:3
  Display: server: X.org v: 1.21.1.4 with: Xwayland v: 22.1.3 driver: X:
    loaded: amdgpu,nvidia unloaded: modesetting gpu: amdgpu
    resolution: 1920x1080
  Message: GL data unavailable for root.
Audio:
  Device-1: NVIDIA GA104 High Definition Audio driver: snd_hda_intel
    v: kernel bus-ID: 01:00.1
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo
    driver: N/A bus-ID: 06:00.5
  Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel bus-ID: 06:00.6
  Sound Server-1: ALSA v: k5.19.8-AMD running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: PulseAudio v: 16.1 running: no
  Sound Server-4: PipeWire v: 0.3.57 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: N/A port: 3000 bus-ID: 03:00.0
  Device-2: Realtek RTL8852AE 802.11ax PCIe Wireless Network Adapter
    vendor: Lenovo driver: rtw89_8852ae v: kernel port: 2000 bus-ID: 04:00.0
  IF: wlan0 state: up mac: <filter>
Bluetooth:
  Device-1: Realtek Bluetooth Radio type: USB driver: btusb v: 0.8
    bus-ID: 3-4:3
  Report: rfkill ID: hci0 rfk-id: 20 state: up address: see --recommends
Drives:
  Local Storage: total: 2.29 TiB used: 100.62 GiB (4.3%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZALQ512HBLU-00BL2
    size: 476.94 GiB
  ID-2: /dev/nvme1n1 vendor: Crucial model: CT2000P2SSD8 size: 1.82 TiB
Partition:
  ID-1: / size: 1.81 TiB used: 99.35 GiB (5.4%) fs: xfs dev: /dev/nvme1n1p2
  ID-2: /boot/efi size: 299.4 MiB used: 2.7 MiB (0.9%) fs: vfat
    dev: /dev/nvme1n1p1
Swap:
  ID-1: swap-1 type: partition size: 8.8 GiB used: 1.26 GiB (14.4%)
    dev: /dev/nvme1n1p3
Sensors:
  System Temperatures: cpu: 45.5 C mobo: N/A gpu: amdgpu temp: 40.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 358 Uptime: 16h 1m Init: systemd Compilers: gcc: 12.2.0
  clang: 14.0.6 Packages: 1443 Shell: Zsh v: 5.9 inxi: 3.3.21

Are you using an external monitor?

In case you do then I can confirm that I have the same issue. For me it is a random monitor, i.e. sometimes the external monitor, sometimes the laptop screen. It does not occur very often and I so far wasn’t able to replicate this bug on purpose.

For some time I thought that it was only occurring when the laptop wasn’t connected to a charger, but I occasionally had this happening while charging…

No, just the laptop screen and reproducible 100% of the time. Have seen multiple reports on Reddit. Tried to run a systemd service on resume, but can’t get it to work.

Might be related to https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Preserve_video_memory_after_suspend

Unless I gave it a proper “man look” :smiley:

Hi TheRaOct,
I am facing the same problem! If the external monitor is connected, the display is blank on resume from suspend, but without external monitor it works fine. I’m on Arch Linux (Ryzen 5700U, amdgpu graphics) on Sway+Wayland. The problem does not arise on Plasma+XOrg.
Did you find a solution to the problem?

I just reload the config and it “fixes it” (mod+shift+c).

Reloading sway sometimes messes up my running browser sessions, so Id’ like to avoid that. I can get the screens back after pressing Ctrl-Alt+F1/F2 etc., but I want to avoid that inconvenience.

Yes, it kills Firefox, but mine is set to restore tabs, so it becomes a minor inconvenience. Interesting though, will try the swapping tty trick next to see if it works for me.

I found that if I use wdisplay it shows the black monitors as disabled. Setting them to enabled activates them, but for some reason it will in most cases only allow the low resolutions. But it is usually enough to save my work and just restart :smiley:
Other than that I usually just execute kanshi (which I use to automatically apply my monitor layout anyway; so in the end it might not be a sway problem in my case but rather a kanshi problem) again and it will just reset my monitor layout. But this also doesn’t seem to work 100% of the time, so I can’t give you a solution that will work all the time :frowning: