[SOLVED] Battery Low: 0% Warning
Official kiosk documentation can be find here: http://porteus-kiosk.org/documentation.html
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
[SOLVED] Battery Low: 0% Warning
Post#1 by Fry » 08 Mar 2019, 01:30
Just installed Porteus Kiosk (4.8.0) on one of our Intel NUC machines and am getting a Battery low: 0%, please connect to a power source.
All good and well ... except these units do not run of battery so the system has obviously detected it as a latop.
Does anyone know if there is any way to disable these warnings?
Thanks
Fry
Fry
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Battery Low: 0% Warning
Post#2 by fanthom » 08 Mar 2019, 04:10
Please try this parameter which should kill the battery check process:
Code: Select all
run_command=killall battery_polling
fanthom
Battery Low: 0% Warning
Post#3 by Fry » 08 Mar 2019, 04:30
No dice I'm afraid it still keeps on showing.
I connected to the console and ran the command manually and received a No Processed Killed response
Perhapse the service has a different name now? I'm not great with linux so I've got no idea here.
Thanks
Fry
Fry
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Battery Low: 0% Warning
Post#4 by fanthom » 08 Mar 2019, 05:02
This one should do:
Code: Select all
kill -9 $(ps | grep battery_polling | tr -s ' ' | sed -e 's/^ //g' | cut -d' ' -f1)
fanthom
Battery Low: 0% Warning
Post#5 by Fry » 11 Mar 2019, 22:11
Thanks again for your response. Unfortunately this also does not seem to be working.
Perhaps we are talking about different things. This is the battery warning I am getting:

I have also added the following line to my config file:
run_command=kill -9 $(ps | grep battery_polling | tr -s ' ' | sed -e 's/^ //g' | cut -d' ' -f1)
I should probably add that this previously read:
run_command=killall battery_polling
All other items in the config file are working.
Is there something here that I'm missing?
Thanks
Fry
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Battery Low: 0% Warning
Post#6 by fanthom » 12 Mar 2019, 08:11
Please login to your kiosk over SSH and show me an output of following command:
Code: Select all
ps | grep battery_polling
fanthom
Battery Low: 0% Warning
Post#7 by Fry » 13 Mar 2019, 00:10
Code: Select all
10010 root 0:00 grep battery_polling
Fry
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Battery Low: 0% Warning
Post#8 by fanthom » 13 Mar 2019, 08:40
You should not receive the 'low battery' notification anymore.
If this is not the case then please contact with support@porteus-kiosk.org and i'll ask you for associating your kiosk with my PK Server so i could debug this problem over SSH and VNC.
Thanks
fanthom
Battery Low: 0% Warning
Post#9 by Fry » 14 Mar 2019, 03:27
After some further investigations this morning building on what you have suggested I managed to work out my failings and get a solution:
The battery polling can be terminated with your kill command:
Code: Select all
run_command=kill $(ps | grep battery_polling | tr -s ' ' | sed -e 's/^ //g' | cut -d' ' -f1)
I took a look at the battery_polling script and noticed it was calling dunstify to create the notification and was wonderfully programmed with a ID which I could target to close.
The resulting run command is used to disable the battery_polling script and close the notification:
Code: Select all
run_command=kill $(ps | grep battery_polling | tr -s ' ' | sed -e 's/^ //g' | cut -d' ' -f1); dunstify -C 333
On a side note, I did play around with using the following code:
Code: Select all
pkill -f battery_polling; dunstify -C 333
Thanks again
Fry
Fry
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
SOLVED: Battery Low: 0% Warning
Post#10 by fanthom » 14 Mar 2019, 08:15
Thanks for sharing.
fanthom