Hello everyone.
New to Manjaro and Linux in general. I just installed the latest KDE edition and after the third reboot the battery icon vanished. Can anyone help me?
Hello everyone.
New to Manjaro and Linux in general. I just installed the latest KDE edition and after the third reboot the battery icon vanished. Can anyone help me?
hello Dario,
Here are some things that you can try:
If it is not:
add widgets
battery
and drag it to the panelBest Regards, Julius
I may have this same issue. I am currently running KDE Manjaro with kernel 5.9 (fully updated as of this post 22/10/2020). I had the same issue when running kernel 5.8, have not yet played around with any others. Occasionally, when powering on the laptop, the battery icon is gone. Re-adding the plasma widget then tells me I have no battery (I do!). Simply logging out and then logging back in reproducibly brings the battery back to Manjaro after this error (restart also works). ālsusbā doesnāt show the battery even when working correctly (I assume I should be able to see it here, but maybe not?). I havenāt really looked in to it in much detail, as I canāt reproducibly force the error and I only use the laptop at home so not such an issue. When it next happens I will trawl my logs and see if I can get a bit more info about and see if there is a simple solution. Iāve only just started with an Arch based distribution and KDE so I may not be much help but will give it a go!
Hello Summrum,
lsusb
doesnāt show the battery information indeed but you can access that info by typing inxi -B
into a terminal.
I donāt know why the os wouldnāt recognize that there is a battery connected, but it might be a loose connection from the battery to the motherboard.
It may be helpful to provide the output of journalctl -b | grep battery
.
Best regards, Julius
Hi julius-gu, thanks for the confirmation. Unfortunately I didnāt check the battery the odd times it has disappeared, but can currently see the battery and status with your command and
upower -i `upower -e | grep 'BAT1'`
or
sudo tlp-stat --battery
Iām not too familiar with systemd but, as far as I can tell on my system as itās currently set up, the journalctl log only gives information since last boot. Running
journalctl -b | grep battery
shows that the battery has been detected - the only log that appears to show some form of issue is:
Oct 25 15:16:15 llaptopnix plasmashell[1042]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/PopupDialog.qml:79:17: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
which I guess indicates an issue with the plasmoid battery widget? I do not notice any issues with the widget itself, and believe that my issue is rather with battery detection than the plasma widget. This is because I lose the ability to sleep, and re-adding the disappeared battery icon I am told I have no battery. Itās a very intermittent issue, so Iāll try to make sure I investigate properly if/when it next happens.
Thanks again for your reply.
Ok, so it has just happened to me again, with the battery plasma widget gone from my panel. Adding a new one tells me that there are āno batteries availableā on hover. Running
journalctl -b | grep battery
gives the following:
Oct 26 12:55:06 llaptopnix kernel: battery: ACPI: Battery Slot [BAT1] (battery present)
Oct 26 12:55:09 llaptopnix tlp[580]: Setting battery charge thresholds...done.
Oct 26 12:55:21 llaptopnix org_kde_powerdevil[1250]: powerdevil: Battery with UDI "/org/freedesktop/UPower/devices/battery_BAT1" was detected
Oct 26 12:56:53 llaptopnix plasmashell[1060]: --------> load applet: "org.kde.plasma.battery" relpath: "plasma/plasmoids/org.kde.plasma.battery"
Oct 26 12:56:53 llaptopnix plasmashell[1060]: .. pathes: ("/usr/share/plasma/plasmoids/org.kde.plasma.battery")
Oct 26 12:56:53 llaptopnix plasmashell[1060]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:54:17: Unable to assign [undefined] to int
Oct 26 12:56:53 llaptopnix plasmashell[1060]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:44:13: Unable to assign [undefined] to bool
This does lead me to think that perhaps there is actually an issue with the plasmoid. I have no experience at all of Qt so any pointers here would be greatly appreciated! Running
upower -i `upower -e | grep 'BAT1'`
also shows that I have a Panasonic battery model AS16A5k that is currently discharging.
So, the battery has been definitely been detected by the operating system in this instance. Iāll have a dig around into this, but if anyone has any hints as to where I should be looking that would be great. Thanks!
P.S.
Edit here just for completeness, after a reboot and the battery icon successfully reappearing, running
journalctl -b | grep battery
gives the following:
Oct 26 13:08:52 llaptopnix kernel: battery: ACPI: Battery Slot [BAT1] (battery present)
Oct 26 13:08:55 llaptopnix tlp[575]: Setting battery charge thresholds...done.
Oct 26 13:09:06 llaptopnix org_kde_powerdevil[1281]: powerdevil: Battery with UDI "/org/freedesktop/UPower/devices/battery_BAT1" was detected
Oct 26 13:09:11 llaptopnix plasmashell[1091]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/PopupDialog.qml:100:17: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Oct 26 13:09:11 llaptopnix plasmashell[1091]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/PopupDialog.qml:79:17: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Just another update, it would appear my āsleepā option sometimes disappears without my battery plasmoid stopping working. So, the two are not necessarily connected! journalctl shows the following:
kernel: ahci 0000:00:17.0: port does not support device sleep
Hello summrum,
thank you for all the provided info!
Iām afraid, I donāt see a fix so far, but if you are so kind, please see what the output of ls /sys/class/power_supply/
shows and whether the is a dc-charger
there. If so, check if cat /sys/class/power_supply/dc-charger/online
outputs 1
whilst de computer isnāt connected.
They seemed to experience a similar issue on this thread there
https://forum.kde.org/viewtopic.php?t=121040
Iām very much not an expert there, but I could imagine that kde somehow confuses the laptop with a pc when the issue arises.
About that, I looked at the files
/usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation
and the file linked to, but I didnāt gain any knowledge from that, unfortunately.
This is very likely an issue with plasmoid though.
Best Regards, Julius
Hi Julius, thanks again for your reply.
ls /sys/class/power_supply/
shows that I have the following:
ACAD BAT1
In case of use, the ACAD correctly shows AC power connected/disconnected when entering
cat /sys/class/power_supply/ACAD/online
The BAT1 also correctly shows e.g. charging status. For the moment, I have switched to another battery plasmoid and disabled the default one. The issue has not yet returned with this replacement, but it is very intermittent anyway. I guess, to be scientific about it, I should probably have both this and the default widget enabled - but if it doesnāt happen within a week Iāll assume itās ok with the replacement.
I have the very same problem!
I noticed that it presents itself 90% of the time I power on the computer while itās attached to charger. On the other hand, it almost never happens if I power on the PC on battery and than plug in the power.
I did all sort of testing to find out how to at least mitigate this problem and this is the only āsolutionā that I found.
This is on kernel 5.4 LTS.
Interestingly enough, when I was on 5.7 kernel it was all backwards!XD
Seems reasonable, best of luck with that!
the same thing happens to me every now and then ā¦randomly. It is very annoying. i have seen at such instances the keyboard shortcut for that battery icon also doesnāt work
rebooting solves the problemā¦ but that is not convenient at all
it can be solved by $ plasmashell --replace & on terminal
however the cure is not permanent. Make sure to put the & to send it to background, or otherwise you will be presented with a black screen on closing the terminal (ctrl+alt+t for rescue).
i havenāt heard of a permanent solutionā¦ i have heard someone say that the problem disappears on kernel 5.9 (i am at 5.8). ā¦but it seems more of a kde problem rather than kernel.
i had this same problem previously on linux mint debian (kernel 5.7) cinnamon also. so not a exclusive kde problem.
maybe next kde update can solve it
Thanks all for the replies. I am currently on kernel 5.9, so the problem is not fixed with that for me. It is interesting to hear from you Platonio that it may be linked to whether or not AC power is connected - I will re-enable the default battery plasmoid and see if I can replicate.
I re-enabled the default battery and brightness plasmoid, and tried various combinations of powering on with and without the AC plugged in and at different levels of battery charge. There possibly is a link with having the AC connected, as in all the times I tried it was only when connected to AC on startup that the issue presented (one time out of many boots). However, I would not take this as fact, as it could just have been by pure chance that that was when it happened as it is really intermittent for me. I believe that the issue may be fixed with the latest plasma update - I switched to testing, and installed plasma 5.20.2. All the Unable to assign [undefined] to int
and Unable to assign [undefined] to bool
references have not reappeared in my log and I cannot seem to find any problems with the icon now.
Hello everybody,
I also have the same problem with the battery icon.
For me it happened since Iāve done the stable update from ā2020-11-18ā and I was with the kernel 5.8.18-1.
I switched my kernel to 5.9.11-2 yesterday but the problem is still here.
Iām still a noob on linux but I tried what @summrum did with starting the computer with or without AC on. For me it has no impact and being connected or not before starting up doesnāt change if the battery will pop or not.
Hi Wdaax, I think the bug was in plasma as for me the battery was still detected, just not in KDE plasma itself. I havenāt had the issue reappear since I switched to testing a few weeks back - looking through the branch compare page it looks like the stable and testing branches are on the same version of plasma packages as of now. So, if youāve recently updated, you should have the same plasma packages as I do. Have you checked that searching for battery errors in your log (journalctl -b | grep battery
in terminal) shows similar to in my older post? If so, maybe itās worth contacting the upstream plasma team about your issue with your hardware details?
Yeah I just got a new update today and it seems to be ok now. Even after some restarts the battery is always here.
Great, glad to hear itās working for you too now.
I have this issue as well (running Plasma 5.20.4 on a Thinkpad X1 Carbon Gen 5)
Previously, a restart would fix it however lately that doesnāt seem to be working either. Once my laptop finished rebooting, I had to run plasmashell --replace
and then it came back.
This has been happening for a little while now and Iām wondering if itās just not detecting the battery before KDE loads on startup?
I am also seeing the same issue. Everything reports the battery information correctly but the icon is missing from the system tray. Adding the widget, the widget says āNo battery availableā. Output from upower:
TI:21:33:51 Acquired inhibitor lock (7)
TI:21:33:51 up_kbd_backlight_brightness_read: assertion āfd >= 0ā failed
TI:21:33:51 cannot find a keyboard backlight
TI:21:33:51 cannot open ā/dev/input/event0ā: Permission denied
TI:21:33:51 not a switch [/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input1/ā¦/capabilities/sw]
TI:21:33:51 failed to coldplug unifying device: cannot open device file /dev/hidraw1
TI:21:33:51 failed to coldplug /sys/devices/pci0000:00/0000:00:14.0/usb2/2-6/2-6:1.1/0003:046D:C52F.0002
TI:21:33:51 failed to set data: Failed to create file ā/var/lib/upower/history-rate-45N1147-47-1808.dat.WR0MY0ā: Permission denied
TI:21:33:51 culled 0 of 5
TI:21:33:51 failed to set data: Failed to create file ā/var/lib/upower/history-rate-M305-101f-77-ab-cd-68.dat.DY0MY0ā: Permission denied
TI:21:33:51 Released inhibitor lock
Running journalctl -b | grep upower I see this but not sure if itās my wireless mouse.
Feb 16 21:08:14 upowerd[706]: failed to coldplug unifying device: Unable to read response from device: Resource temporarily unavailable