{"id":1519,"date":"2008-02-13T19:15:00","date_gmt":"2008-02-13T19:15:00","guid":{"rendered":"http:\/\/gleamynode.net\/articles\/1519\/turning-off-radeon-lcd-backlight-when-gnome-screensaver-is-activated"},"modified":"2022-12-28T01:46:20","modified_gmt":"2022-12-27T16:46:20","slug":"turning-off-radeon-lcd-backlight-when-gnome-screensaver-is-activated","status":"publish","type":"post","link":"https:\/\/vault.motd.kr\/wordpress\/posts\/1519\/turning-off-radeon-lcd-backlight-when-gnome-screensaver-is-activated\/","title":{"rendered":"Turning off Radeon LCD backlight when GNOME screensaver is activated"},"content":{"rendered":"
I wrote a quick and dirty script that turns on and off ATI Radeon LCD backlight by monitoring DBUS events to detect the activation and deactivation of GNOME screensaver. It requires the radeontool<\/tt> package to be installed and it needs to be set with suid flag (i.e. chmod u+s \/usr\/sbin\/radeontool<\/tt>). Please feel free to launch the following script when your GNOME session starts:<\/p>\n Please note that I tested this script with my old ThinkPad X31, so you might not need this script if you have the recent laptop or you are using other video chipset.<\/p>\n","protected":false},"excerpt":{"rendered":" I wrote a quick and dirty script that turns on and off ATI Radeon LCD backlight by monitoring DBUS events to detect the activation and deactivation of GNOME screensaver. It requires the radeontool package to be installed and it needs to be set with suid flag (i.e. chmod u+s \/usr\/sbin\/radeontool). Please feel free to launch… Continue reading #!\/bin\/sh
\nif [ \"x`pgrep -of 'radeon-watch'`\" != \"x$$\" ]; then
\n exit 1
\nfi
\nradeontool dac on
\nradeontool light on
\n{
\ndbus-monitor --session --monitor \"type='signal',path='\/org\/gnome\/ScreenSaver',interface='org.gnome.ScreenSaver'\" | while read -r EVT; do
\n echo \"$EVT\" | grep -qi \"SessionIdleChanged\"
\n if [ \"$?\" = '0' ]; then
\n read -r EVT_VAL
\n echo \"$EVT_VAL\" | grep -qi \"true\"
\n if [ \"$?\" = '0' ]; then
\n radeontool dac off
\n radeontool light off
\n else
\n radeontool dac on
\n radeontool light on
\n fi
\n fi
\n
\n echo \"$EVT\" | grep -qi \"AuthenticationRequestBegin\"
\n if [ \"$?\" = '0' ]; then
\n radeontool dac on
\n radeontool light on
\n fi
\n
\n echo \"$EVT\" | grep -qi \"AuthenticationRequestEnd\"
\n if [ \"$?\" = '0' ]; then
\n radeontool dac off
\n radeontool light off
\n fi
\ndone
\n} &
\n<\/pre>\n