[opensuse] Setting default backlight level on boot
openSUSE 13.2, KDE4, ThinkPad T540p. I've tried couple of different ways to do it, none of them produced any result. First I've tried setting udev rule. During the boot I see the brightness dropping from 100% to value I've set, but in less than a second it is restored back to 100%. Then I tried systemd-backlight@.service. I don't know if I did it correctly, I symlinked it from /usr/lib/systemd to multiuser wants in etc, renaming to systemd-backlight@backlight:intel_video.service, to force it to use my backlight device. I've tried running the command manually, looks like it saves the level properly into /var/lib/systemd, but then after reboot saved value again appears to be 100%. Maybe on reboot, when KDE session is stopped then backlight is restored back to 100% right before systemd saves it? So, what is the correct way to force default backlight brightness level for openSUSE? -- Regards, Stas -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Sat, 20 Dec 2014 09:15:58 +0100 Stanislav Baiduzhyi <baiduzhyi.devel@gmail.com> пишет:
openSUSE 13.2, KDE4, ThinkPad T540p.
I've tried couple of different ways to do it, none of them produced any result.
First I've tried setting udev rule. During the boot I see the brightness dropping from 100% to value I've set, but in less than a second it is restored back to 100%.
Then I tried systemd-backlight@.service. I don't know if I did it correctly, I symlinked it from /usr/lib/systemd to multiuser wants in etc, renaming to systemd-backlight@backlight:intel_video.service, to force it to use my
backlight service is started automatically by udev rule if backlight device is found. /usr/lib/udev/rules.d/99-systemd.rules:SUBSYSTEM=="backlight", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@backlight:$name.service"
backlight device. I've tried running the command manually, looks like it saves the level properly into /var/lib/systemd, but then after reboot saved value again appears to be 100%. Maybe on reboot, when KDE session is stopped then backlight is restored back to 100% right before systemd saves it?
May be. So boot in run level 3, set desired backlight level, reboot in run level 3 again and check if value is preserved.
So, what is the correct way to force default backlight brightness level for openSUSE?
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Saturday 20 December 2014 18:45:58 Andrei Borzenkov wrote:
В Sat, 20 Dec 2014 09:15:58 +0100
Stanislav Baiduzhyi <baiduzhyi.devel@gmail.com> пишет:
openSUSE 13.2, KDE4, ThinkPad T540p.
I've tried couple of different ways to do it, none of them produced any result.
First I've tried setting udev rule. During the boot I see the brightness dropping from 100% to value I've set, but in less than a second it is restored back to 100%.
Then I tried systemd-backlight@.service. I don't know if I did it correctly, I symlinked it from /usr/lib/systemd to multiuser wants in etc, renaming to systemd-backlight@backlight:intel_video.service, to force it to use my backlight service is started automatically by udev rule if backlight device is found.
/usr/lib/udev/rules.d/99-systemd.rules:SUBSYSTEM=="backlight", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@backlight:$name.service"
backlight device. I've tried running the command manually, looks like it saves the level properly into /var/lib/systemd, but then after reboot saved value again appears to be 100%. Maybe on reboot, when KDE session is stopped then backlight is restored back to 100% right before systemd saves it?
May be. So boot in run level 3, set desired backlight level, reboot in run level 3 again and check if value is preserved.
Thanx, that was a really good idea, it almost worked :) looks like something still switched it to 100% between runlevels, so had to do telinit 1, echo required level both to /sys/class/backlight and directly into /var/lib/systemd/backlight/<longFileName> file and reboot, for the following boot it worked properly. But looks like on every reboot or poweroff something swtiches it back to 100% just before systemd saves it (my KDE works on 15% so that cannot be my level saved). I tried even 'chmod a-w' on systemd backlight level, in hope that it will not be able to save the level on shutdown and will always boot with my level, didn't worked, it still saves the value like it was root. The only thing that looks like working is adding echo commands to /etc/init.d/boot.local, but I hoped there is a better way to do it. -- Regards, Stas -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Andrei Borzenkov
-
Stanislav Baiduzhyi