SUMMARY The unplug events don't seem to be taking place when my laptop is unplugged from AC power. The behavior appears to have started in 5.19 on Tumbleweed and persists to now. However, I believe I have narrowed it down to something to do with linux kernels < 5.7 For reference, I have a Lenovo X1 Carbon 6 and am using rolling distros. STEPS TO REPRODUCE 1. Start laptop with power plugged in 2. Log in, use the computer as normal 3. Unplug the laptop OBSERVED RESULT A few things (don't) happen: - The unplug sound doesn't play - The battery icon moves from hidden to visible on the system tray - However, despite moving, the indicator still shows a "Plugged in" icon - The calculated time-remaining until full charge may be the time to discharge (uncertain here) EXPECTED RESULT The laptop correctly identifies that it is no longer plugged in and changes modes accordingly. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch latest linux (5.9.1), OpenSUSE Tumbleweed (5.8.16) KDE Plasma Version: 5.19.* to 5.20.2 KDE Frameworks Version: 5.75.0 Qt Version: 5.15.1 ADDITIONAL INFORMATION As I mentioned above, I have determined that the kernel version seems to play an indicator in this bug. Arch latest (5.9.1) has this bug; however, if I boot the system to linux-lts, the bug goes away. I cannot test this theory under OpenSUSE as they do not maintain LTS releases. Furthermore, I am able to forcefully make KDE recognize it has been unplugged while closing the laptop lid after unplugging the battery. If I wait for the computer to suspend, then open the lid, the battery unplugged noise is played and the system tray indicator works correctly (and keeps working for subsequent unpluggings). Conversely, if the laptop is suspended with the power plugged in, the incorrect behavior will resume on the next Resume. Finally, I have not been able to confirm the presence of this bug under Solus KDE and they are currently using Linux 5.6.16. Between it functioning in 5.4 and 5.6 but broken by 5.8, I then hypothesize that this bug is a result of changes in 5.7 or newer kernels. I would run some debugging or grab logs, but I'm afraid I don't know what to do that would be useful.
I can't seem to reproduce this issue in it's entirety. KDE Neon User Edition - I didn't get an unplug sound. - Icon does change back to a discharging icon for me - My icon stays visible while plugged in or discharging, never vanishes - My charge/discharge time definitely changes in the tooltip I'm on kernel 5.4.0 from Ubuntu.
As I noted in my report, I can't reproduce the issue on linux-lts in arch (5.4.72) or under Solus with 5.6.19, so this may not be visible in Neon since it looks like 5.4 is the only option right now. The issue may present itself if you were willing to try a 5.8 or 5.9 kernel from the mainline kernel builds ppa.
I tried 5.8 through the linux-generic-hwe-20.04-edge stack. I actually get the unplug sound now. Discharge/Charge tooltip also show properly still.
Curious. I'll grab a neon iso to see if I get my results or if I get yours. Are you testing on a Lenovo laptop as well or something else? (In the event this is some specific hardware issue)
Dell Inspiron 7391.
*** This bug has been marked as a duplicate of bug 428327 ***