You are not logged in.
Hello,
Is somebody using pm-utils together with a script in /etc/pm/power.d to control screen brightness of his laptop depending on the AC state and could provide me with a working example?
There is the following one from askubuntu which raises the error Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SettingsDaemon was not provided by any .service files:
export DISPLAY=:0
user=chris
bat_bright=50
ac_bright=90
. /home/$user/.dbus/session-bus/*
case $1 in
true)
echo "Enable screen power saving"
sudo -u $user -g $user dbus-send --session --print-reply --dest="org.gnome.SettingsDaemon" \
/org/gnome/SettingsDaemon/Power org.gnome.SettingsDaemon.Power.Screen.SetPercentage uint32:$bat_bright
;;
false)
echo "Disable screen power saving"
sudo -u $user -g $user dbus-send --session --print-reply --dest="org.gnome.SettingsDaemon" \
/org/gnome/SettingsDaemon/Power org.gnome.SettingsDaemon.Power.Screen.SetPercentage uint32:$ac_bright
;;
esacSource: http://askubuntu.com/questions/93601/ch … connection
Thank you
Robert
Last edited by orschiro (2012-11-23 05:42:40)
Offline
Have you considered laptop mode tools?
Or reading the wiki?
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Hi cfr,
It was a long time ago that I used pm-powersaving and since using Gnome I thought the new way of dealing this is through Gnome settings daemon. Anyway, I ended up the conventional way straight writing the value into /sys.
I added a working script to the wiki page
Regards
Offline