Bug 429522 - Powerdevil does not updates all settings when AC adapter is reconnected
Summary: Powerdevil does not updates all settings when AC adapter is reconnected
Status: RESOLVED WORKSFORME
Alias: None
Product: Powerdevil
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: 5.20.4
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-22 20:40 UTC by Om
Modified: 2024-06-12 03:46 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Om 2020-11-22 20:40:30 UTC
SUMMARY
There is an awesome setting in KDE to automatically switch between either `suspend` or `suspend-then-hibernate` based on whether the laptop is on AC power or in battery mode. This is configured in **System settings > Power Management > Energy Saving > On AC power/On Battery/On Low Battery > While asleep, hibernate after a period of inactivity**.

For example, one could configure sleep to be `suspend` when AC power is on and `suspend-then-hibernate` when in battery mode. Although this setting works the first time when adapter is disconnected, i.e., battery mode setting gets enabled, but the AC power mode option is not picked up upon reconnecting the adapter.


STEPS TO REPRODUCE
1. Keep the laptop running in AC power while making sure battery charge is more than the "low" percentage (usually >10%).
2. **Disable** "System settings > Power Management > Energy Saving > On AC power > While asleep, hibernate after a period of inactivity".
3. **Enable** "System settings > Power Management > Energy Saving > On Battery > While asleep, hibernate after a period of inactivity".
4. [Optional] Make sure lid close action in both profiles is set to sleep.
5. Apply to save the settings.
6. Put the laptop to sleep (or if step#4 is set, close lid to sleep).
7. Resume from sleep and verify journal logs that system indeed called `suspend.target`.
8. Disconnect AC adapter.
9. Put the laptop to sleep (or if step#4 is set, close lid to sleep).
10. Resume from sleep and verify journal logs that system indeed called `suspend-then-hibernate.target`.
11. Reconnect AC adapter.
12. Put the laptop to sleep (or if step#4 is set, close lid to sleep).
13. Resume from sleep and check in journal logs if `suspend` or `suspend-then-hibernate` was called.


OBSERVED RESULT
Step#13 shows that `suspend-then-hibernate` was called even after AC adapter was reconnected.


EXPECTED RESULT
When AC adapter is reconnected, step#13 should put the system to `suspend` instead of `suspend-then-hibernate` state.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon 5.20
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.1


ADDITIONAL INFORMATION
Comment 1 Om 2020-12-03 07:57:53 UTC
I would like to further add that this works as expected ONLY when automatic suspend is enabled in all the energy profiles.

In case I do not want the system to automatically suspend when in AC power (i.e. when System settings > Power Management > Energy Saving > On AC power > Suspend session is disabled), the problem remains.
Comment 2 TraceyC 2024-05-13 20:22:34 UTC
Thank you for the bug report. Unfortunately we were not able to get to it yet. Can we ask you to please check if this is still an issue with either Plasma 5.27 (the current LTS version) or Plasma 6.0.4 (the latest released version)?
Comment 3 Bug Janitor Service 2024-05-28 03:45:28 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2024-06-12 03:46:50 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!