https://bugs.kde.org/show_bug.cgi?id=429522

            Bug ID: 429522
           Summary: Powerdevil does not updates all settings when AC
                    adapter is reconnected
           Product: Powerdevil
           Version: 5.20.3
          Platform: Neon Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: plasma-b...@kde.org
          Reporter: ombroph...@outlook.com
  Target Milestone: ---

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

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to