sharma / enforce-dpms

Systemd user service to work around a long-running amdgpu bug that breaks DPMS sleep mode

Home Page:https://gitlab.freedesktop.org/drm/amd/-/issues/662

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

enforce-dpms

The enforce-dpms systemd service is GNOME/Mutter solution for working around a long-standing bug in the amdgpu Linux driver that breaks DPMS monitor sleep mode:

It does so by monitoring when the D-Bus property for DPMS is changed from 0 ("On") to 3 ("Off") every 2 seconds. When that happens, it will start forcing DPMS "Off" mode every 0.1 seconds for 15 seconds. This effectively suppresses the consequences of the "input changed" event sent back to the computer by the monitor whenever it actually goes into sleep mode, which would otherwise trigger a DPMS state change to "On", which in turn wakes the monitor back up. This script causes the monitor to "miss" the brief DPMS "On" state, and stay asleep.

NOTE: There is currently a better work-around available, which consists of adding amdgpu.runpm=0 to your kernel parameters. This does not cause any lag when trying to reactivate the display the way that enforce-dpms does. An actual fix to the kernel is also in the works, which should remove the need for any work-around in the near future.

Installation

sudo sh install.sh
systemctl --user daemon-reload

Enable service

systemctl --user enable enforce-dpms
systemctl --user start enforce-dpms

Disable service

systemctl --user stop enforce-dpms
systemctl --user disable enforce-dpms

About

Systemd user service to work around a long-running amdgpu bug that breaks DPMS sleep mode

https://gitlab.freedesktop.org/drm/amd/-/issues/662

License:GNU General Public License v3.0


Languages

Language:Shell 100.0%