You are not logged in.

#1 2024-12-05 20:10:45

rharish
Member
Registered: 2018-02-19
Posts: 27

[SOLVED] Turning screen off with DPMS hangs the PC

If I turn off my monitor with

xset dpms force off

then my monitor is turned off, after which it can't come back on. No matter what I press on my keyboard or mouse, the screen remains off. At this point, I simply hold the front panel power button to force my desktop to shut down. I see this issue both on X11 (Xfce 4.18 with i3) and Wayland (Hyprland).

Sleep, however, works fine. The system goes to sleep, the monitor turns off, and when I wiggle my mouse, it comes back from sleep and the monitor wakes up.

I already reported this upstream here: https://gitlab.freedesktop.org/drm/amd/-/issues/3537, but there's been no responses, so I'm not sure if it's actually an upstream issue, or something on my side. Is there a workaround, or some other way to turn off the monitor such that it can be turned back on? I'd like it to turn off (but not go to sleep) after a while, like 2 minutes.

System info:

  • OS: Arch Linux

  • Kernel: linux-zen 6.12.1

  • Display server: X11 (rootless, launched through greetd) 21.1.14

  • X11 driver: xf86-video-amdgpu 23.0.0

  • Desktop environment: Xfce 4.18.4

  • Window manager: i3 4.24

Hardware:

  • CPU: AMD Ryzen 7 7800X3D

  • GPU: Sapphire Pulse RX 7900 XTX

  • Motherboard: MSI MAG B650 Tomahawk WiFi

  • Monitor: Asus TUF Gaming VG34VQL1B, connected over DisplayPort

Journalctl logs:

Last edited by rharish (2024-12-07 15:13:40)

Offline

#2 2024-12-05 21:17:48

xerxes_
Member
Registered: 2018-04-29
Posts: 952

Re: [SOLVED] Turning screen off with DPMS hangs the PC

Try 'xset dpms off 120' or see https://wiki.archlinux.org/title/Displa … _Signaling to set config file.

Offline

#3 2024-12-06 08:12:49

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,500

Re: [SOLVED] Turning screen off with DPMS hangs the PC

At this point, I simply hold the front panel power button to force my desktop to shut down

Don't.
Either frenetically press ctrl+alt+del or use the https://wiki.archlinux.org/title/Keyboa … el_(SysRq)
You're jeopardizing your filesystem integrity w/ hard reboots.

However

Dec 05 20:53:40 artorias systemd-logind[1215]: Power key pressed short.

you're actually just triggering a soft shutdown.

Dec 05 20:53:07 artorias kernel: amdgpu 0000:03:00.0: amdgpu: SMU: I'm not done with your previous command: SMN_C2PMSG_66:0x00000012 SMN_C2PMSG_82:0x00000005
Dec 05 20:53:07 artorias kernel: amdgpu 0000:03:00.0: amdgpu: Failed to export SMU metrics table!
Dec 05 20:53:13 artorias kernel: amdgpu 0000:03:00.0: amdgpu: SMU: I'm not done with your previous command: SMN_C2PMSG_66:0x00000012 SMN_C2PMSG_82:0x00000005
Dec 05 20:53:13 artorias kernel: amdgpu 0000:03:00.0: amdgpu: Failed to export SMU metrics table!
Dec 05 20:53:13 artorias kernel: amdgpu 0000:03:00.0: amdgpu: Failed to get fan speed(PWM)!
Dec 05 20:53:13 artorias kernel: amdgpu 0000:03:00.0: amdgpu: Dumping IP State

Try to add

amdgpu.runpm=0 amdgpu.aspm=0 amdgpu.bapm=0 pcie_aspm=off

https://wiki.archlinux.org/title/Kernel_parameters
I guess with those symptoms switching the VT (ctrl+alt+f3) doesn't work either?

This is a hybrid setup? There's a second amd gpu in the first but not the second journal?
Did you disable the APU?
Do things behave fine when running on the APU (only)?
Do you have a spare monitor to see whether the output is relevant?

X11 driver: xf86-video-amdgpu 23.0.0

Try to remove that and implicitly use the modesetting driver, though that'd be closer to the wayland situation - which apparently causes similar issues.


Sleep, however, works fine. The system goes to sleep, the monitor turns off,

You mean "systemctl sleep"? That doesn't imply a dpms call, but do you have a journal covering such S3 cycle?

Online

#4 2024-12-07 10:09:52

rharish
Member
Registered: 2018-02-19
Posts: 27

Re: [SOLVED] Turning screen off with DPMS hangs the PC

seth wrote:

Try to add

amdgpu.runpm=0 amdgpu.aspm=0 amdgpu.bapm=0 pcie_aspm=off

https://wiki.archlinux.org/title/Kernel_parameters

I tried this with my current setup, and now, whenever I run

xset dpms force off

it either works properly (as in, the screen switches off, and when I press a key or move the mouse, it comes back on), or it blanks the display and instantly brings it back on. However, note that I was setting off this command a few seconds after the display comes back on from the previous attempt. In other words, I was testing it in quick succession. When I space the commands out, then it works flawlessly! Thanks a lot! In any case, here is the journalctl log: dpms-random.log.

seth wrote:

I guess with those symptoms switching the VT (ctrl+alt+f3) doesn't work either?

Yup, the display stays blanked.

seth wrote:

This is a hybrid setup? There's a second amd gpu in the first but not the second journal?
Did you disable the APU?

Yes, my CPU (Ryzen 7 7800X3D) comes with an integrated GPU, but I've disabled it in the UEFI settings of my motherboard.

seth wrote:

Do things behave fine when running on the APU (only)?

Haven't tested it yet, do I need to do it to help diagnose this further?

seth wrote:

Do you have a spare monitor to see whether the output is relevant?

Nope, sorry! I do know that it blanks properly when connected to a Windows laptop (which is not this PC).

seth wrote:
rharish wrote:

Sleep, however, works fine. The system goes to sleep, the monitor turns off,

You mean "systemctl sleep"? That doesn't imply a dpms call, but do you have a journal covering such S3 cycle?

Actually, I just tested it, and seems like it used to work. Right now, when I tested sleep/suspend before I added these kernel params, the system was going to sleep properly, and then waking up from sleep as well, but it froze about 1-2 seconds after waking up from sleep. After that, I started spamming Ctrl+Alt+Del, as you suggested, and the PC rebooted. I got the journalctl logs here: sleep-crash.log. However, after adding these kernel params, this seems to be fixed as well. I have no clue what these kernel params are, but they seem to have (mostly) fixed all my issues. Thanks again!

If you think that the random DPMS behaviour now isn't that big of an issue, then I'll go ahead and add the "[Solved]" prefix to the title.

Last edited by rharish (2024-12-07 10:13:50)

Offline

#5 2024-12-07 10:36:59

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,500

Re: [SOLVED] Turning screen off with DPMS hangs the PC

\o/
The amdgpu errors are gone from the log, you should see which of the paramters you can drop, starting w/ "pcie_aspm=off" because it has the biggest impact (beyond your GPU)

If you think that the random DPMS behaviour now isn't that big of an issue

This could have been a race condition since the outputs can take a moment before they power down or up. If sane™ DPMS invocation works reliably, you can ignore this.

Haven't tested it yet, do I need to do it to help diagnose this further?

There's currently no error indication - so probably not.

Online

#6 2024-12-07 15:13:13

rharish
Member
Registered: 2018-02-19
Posts: 27

Re: [SOLVED] Turning screen off with DPMS hangs the PC

seth wrote:

The amdgpu errors are gone from the log, you should see which of the paramters you can drop, starting w/ "pcie_aspm=off" because it has the biggest impact (beyond your GPU)

Seems like only

amdgpu.aspm=0

is needed after all.

seth wrote:

If you think that the random DPMS behaviour now isn't that big of an issue

This could have been a race condition since the outputs can take a moment before they power down or up. If sane™ DPMS invocation works reliably, you can ignore this.

Thanks a lot, I'll mark this as solved!

Offline

Board footer

Powered by FluxBB