Summary: | After login, automatic dimming does not work until the dim time is changed in the KCM once | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | reg.mail.clash869 |
Component: | Power management & brightness | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | jpetso, natalie_clarius, nate |
Priority: | NOR | Keywords: | regression |
Version: | 6.2.3 | ||
Target Milestone: | 1.0 | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
reg.mail.clash869
2024-11-20 21:05:23 UTC
Can reproduce exactly as described. Updating the title slightly. Git commit b6b563f732056b59d9ae83e5327039db22cad806 by Jakob Petsovits. Committed on 15/12/2024 at 19:28. Pushed by jpetso into branch 'master'. daemon: Introduce proper dimming API for ScreenBrightnessController This allows us to correctly restore brightness for displays that were disconnected when they were dimmed, and are reconnected later. It doesn't quite fix restoring dimmed displays across reboots yet, this will be an extension requiring Wayland protocol updates. `ScreenBrightnessController` now keeps track of more data for each connected display, enough to recognize the display after it appears again later (possibly with a different display ID) and restore some runtime state. This allows us to store and restore values for a display's nominal brightness, minimum brightness, and dimming ratio. The dimming ratio is multiplied with the nominal brightness and capped by the minimum brightness to produce a display's desired actual brightness. Several callers can set a dimming ratio, the lowest one will be used. For now, the DimDisplay action is the only user; however, other dimming methods are anticipated in the future. Importantly, by being able to restore these values separately from just a single hardware brightness value, we can tell if the display is still in the expected state from before the disconnect. If it is, we can continue using the earlier nominal brightness but update the dimming ratio to the current runtime setting. Unrecognized or changed displays can remain untouched, they can be assumed with a 1.0 dimming ratio from their current brightness level. Note that this API is meant only for temporary dimming from the baseline of the current nominal brightness. It isn't meant for profile-dependent brightness changes or for ambient light sensors driving gradual, automatic brightness adjustments. We can have dedicated APIs later for these use cases. Related: bug 452492 M +20 -77 daemon/actions/bundled/dimdisplay.cpp M +1 -2 daemon/actions/bundled/dimdisplay.h A +38 -0 daemon/controllers/displaymatch.h [License: LGPL(v2.0+)] M +90 -7 daemon/controllers/screenbrightnesscontroller.cpp M +40 -0 daemon/controllers/screenbrightnesscontroller.h https://invent.kde.org/plasma/powerdevil/-/commit/b6b563f732056b59d9ae83e5327039db22cad806 |