dwagelaar / enforce-dpms

Systemd user service to work around a long-standing amdgpu bug that breaks DPMS sleep mode
https://gitlab.freedesktop.org/drm/amd/-/issues/662
GNU General Public License v3.0
13 stars 2 forks source link

Include all possible DRM device paths #4

Closed Socob closed 3 years ago

Socob commented 3 years ago

Currently, DRM_DEVICE_PATH=/sys/class/graphics/fb0/device/drm/card0 is hard-coded. However, on some systems, this specific path may not exist (for example, I have /sys/class/graphics/fb0/device/drm/card1 and /sys/class/graphics/fb1/device/drm/card0), causing the entire script to fail. To prevent this, replace the hard-coded “0”s by globs.