Lakka on laptop and battery status

Hey people!

I’ve installed Lakka on my Laptop, but i have the problem that i can’t see my battery status. so sometimes my laptop just quits because the battery is empty. The Lakka developmentteam is busy enough building Lakka, so i want try to build some code special for laptops and battery powered devices.

What needs to be done:

  • Some code or app to check the battery levels
  • show values in the theme like the date and time
  • a popup when your battery is almost empty
  • when the battery is empty the laptop need to go in hibernate.

Are there any people here who want to help build this add-on for lakka?

Part one is done:

With the following code you can check your power status:

  1. Connect to lakka using SSH.
  2. After logging in type: cd /sys/class/power_supply/BAT0
  3. Type cat status for checking if the battery is charging , full or discharging
  4. Type cat capacity_level to check if the battery is full, normal or low
  5. Type cat capacity to show the battery level percentage

Hello DutchFlow, in the recent nightly build, if you go in the “System Information” menu, you can see some basic informations about the battery.

We could start from here, and display it in the XMB menu in the top bar like on mobiles.

interesting! i didn’t know that. Thanks for the heads up! That would definitely be a good start.

At the moment i am working on a script that puts the laptop in sleep-mode if the battery is almost empty. It looks like the script is working, the problem is when the laptop wakes up. if you had an game open it is messed up. so i need to find a way to run a script on wake up that saves the game state, restarts retroarch and loads the game state…

But well that is something for later, showing the battery status is prio 1. After that is fixed then the more difficult parts will come.

Hello people, sorry for reviving an old thread but is there any progress on this script? Or have any changes happened ever since? Thanks!

A battery status icon has been introduced in RetroArch. It is already present in the 1.4.0 release of RetroArch. Which means that the next time I bump the RetroArch version in Lakka, you’ll have an option to show the battery status.

Thank you, Kivutar! Great that tiny features like these are not forgotten.