Bug 494722 - Screen brightness remains dimmed across restarts
Summary: Screen brightness remains dimmed across restarts
Status: CONFIRMED
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 6.2.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 496954 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-10-14 08:18 UTC by Volker
Modified: 2024-12-03 00:02 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker 2024-10-14 08:18:08 UTC
SUMMARY
If the PC shuts down with reduced brightness it will be stuck that way until it's manually increased.

STEPS TO REPRODUCE
1. Set the PC to automatically darken the screen
2. "sudo shutdown +30" for example, anything above whatever the time for reducing brightness is set
3. Boot the PC again

OBSERVED RESULT
On boot, screen stuck at low brightness

EXPECTED RESULT
On boot, screen at 100% brightness, like it was before Plasma 6.2

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 6.2.0 
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.3
Comment 1 Jakob Petsovits 2024-11-27 21:08:31 UTC
The PowerDevil service does not store screen brightness across restarts. It starts up with whatever the current screen brightness is, and other mechanisms will usually remember brightness upon shutdown (e.g. systemd for laptop screen backlight brightness, monitors with their own memory and firmware).

On Wayland, the direction (as of Plasma 6.2) is for KWin to store all brightness values and call PowerDevil to restore them for any monitors that are detected. Communication between KWin and PowerDevil happens via Wayland protocols.

On X11, there are no plans currently to introduce storage of brightness values across sessions. This is what you're hitting.

There is an ongoing effort - hopefully landing soon via https://invent.kde.org/plasma/powerdevil/-/merge_requests/466 - to make PowerDevil's screen brightness controller aware of the difference between nominal (configured) brightness and dimmed brightness.

Once we have this, we *could* try to detect when the service is shut down, delay shutdown and set the brightness back to un-dimmed brightness, and quit only afterwards. That seems like a whole bunch of work, however, and given the many other tasks that I've somehow ended up with, I'm not sure I can spare the time to implement this.

You write this:

> On boot, screen at 100% brightness, like it was before Plasma 6.2

That makes me assume you're using a laptop with built-in screen, plus an external monitor. Because the same issue was present long before Plasma 6.2, before 6.0 even, for people that used *only* a laptop screen or *only* an external monitor. The difference with 6.2 is that Plasma now controls more than one display, so it will *also* dim your external monitor in addition to the laptop screen (and then also leave that in a dimmed brightness level across restarts). That's our regression. I've been trying to come up with plans & some code in this issue: https://invent.kde.org/plasma/powerdevil/-/issues/38

But this particular issue won't be solved by my plans & code so far. One thing we could do on X11 across reboots, to make at least the regression go away, would be to avoid dimming external monitors for users with a built-in laptop display. On KWin, with brightness storage and hopefully soon a Wayland protocol for dimming, we can continue to dim. Does that sound reasonable?

For the remaining users, on X11 sessions with *only* a laptop screen or *only* external monitors attached to a desktop PC, this is a WONTFIX from my point of view unless someone else decides to step up and provide some patches to reset brightness on exit.
Comment 2 Zamundaaa 2024-12-03 00:02:24 UTC
*** Bug 496954 has been marked as a duplicate of this bug. ***