Bug 350258

Summary: Screen brightness is not remembered
Product: [Plasma] Powerdevil Reporter: Tom Chiverton <bugs.kde.org>
Component: generalAssignee: Plasma Development Mailing List <plasma-devel>
Status: RESOLVED DUPLICATE    
Severity: normal CC: afiestas, kde, markg85, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Tom Chiverton 2015-07-15 20:16:24 UTC
Kubuntu 5.04. Everytime I log in I have to turn the brightness back down on my laptop.

Reproducible: Always

Steps to Reproduce:
1. login

Actual Results:  
screen brightness at 50%

Expected Results:  
screen brightness where I left it, 10%
Comment 1 Kai Uwe Broulik 2015-07-15 21:20:13 UTC
Thanks for your report! 
PowerDevil (KDE's Power Management System) does not restore the last set brightness but only the one configured in System Settings. Given I hate that it messes with brightness settings In the first place, and turned that off for me, having it remember the last brightness is probably more desirable. I'll add an option for that, possibly enabled by default, even.
Comment 2 Alex Fiestas 2015-07-15 22:03:02 UTC
Iirc systemd remembers these kinds of things, at least for xrandr based brightness.
Comment 3 Kai Uwe Broulik 2015-07-15 22:04:26 UTC
That doesn't stop PowerDevil from overriding it on login :)
Also, I hate that systemd messes with brighrness. Yet another service that thinks it knows better. Any way to inhibit that?
Comment 4 Mark 2015-07-16 12:09:46 UTC
(In reply to Kai Uwe Broulik from comment #3)
> That doesn't stop PowerDevil from overriding it on login :)
> Also, I hate that systemd messes with brighrness. Yet another service that
> thinks it knows better. Any way to inhibit that?

Ohh brightness.. And the systems that "know better"... sigh.
This apparently is a never ending story in the linux world.

Anyhow, when systemd remembers the brightness and restores it, Why not just show a message in PowerDevil that SystemD is managing brightness by default thus managing through PowerDevil is disabled. Then obviously an option to override that and let PowerDevil decide. However, overriding it in PowerDevil would mean 2 systems both setting a brightness level which is asking for stuff to go wrong.

Much more information on this can be found in the quite good archlinux wiki page for this: https://wiki.archlinux.org/index.php/Backlight Specifically the section about the systemd-backlight service contains this interesting bit of information:

systemd-backlight understands the following kernel command line parameter: systemd.restore_state= (0 or 1)

Defaults to "1".
If "0", does not restore the backlight settings on boot. However, settings will still be stored on shutdown.
Comment 5 Kai Uwe Broulik 2015-07-16 12:12:30 UTC
> Anyhow, when systemd remembers the brightness and restores it, Why not just show a message in PowerDevil that SystemD is managing brightness by default thus managing through PowerDevil is disabled.

A user should not need to know what "systemd" is and why it keeps him from changing the brightness through System Settings.

Is there a way to tell systemd-backlight to stop what it's doing? Every sane service, like logind, has a way to tell it not to do stuff but I don't see that option for the backlight service. When I plug in my AC, it also raises brightness and it's definitely not PowerDevil doing that.
Comment 6 Mark 2015-07-16 12:18:57 UTC
I really hate the annoying behavior of the systemd developers to introduce services that you can't simply shut down! There really is something wrong in their logic.

But yes, it can be disabled.
systemctl mask systemd-backlight@.service

Should prevent it from auto starting.
Comment 7 Kai Uwe Broulik 2015-07-16 12:26:39 UTC
That's not a solution. It has to be something PowerDevil can do, like it tells Logind on DBus not to auto-suspend because we're handling that. I'll ask on the systemd mailing list then ...
Comment 8 Nate Graham 2018-03-11 21:32:56 UTC
Just uncheck the "Brightness" checkboxes and then Powerdevil won't override your brightness settings on login. This works flawlessly for me in 5.12.3.

*** This bug has been marked as a duplicate of bug 306425 ***