I want to share a small discovery on creating a battery threshold within Qubes OS for ThinkPad users and possible for other laptop brands. I searched on the Qubes forum and found nothing on a workaround for battery threshold, so perhaps this will be useful for others. This finding works in both ThinkPad X230 and T430, running Coreboot via Skulls and working in Qubes 4.0.4 and 4.1. Maybe this is a fluke, but I would like other users to try to see if they can replicate it.
When I first started to set up Qubes OS as my daily driver, I researched online and couldn’t find a way to install TLP to set the battery threshold without installing TLP in dom0. As I could not find any solution apart from installing in dom0, I gave up the search as I didn’t want to install anything in dom0.
The solution came when I wanted to have a backup OS in the laptops just for Zoom calls as Zoom is still a hit and miss with Qubes. I outfitted an mSATA drive on both computers and installed Linux Mint, Zoom and TLP. I have noticed that after setting the battery threshold via TLP on Mint, it carried over to Qubes. The battery threshold would only break if I were to remove the laptop’s battery physically. I would then have to restart in Mint, and then it would carry over again in Qubes.
In addition to an Ubuntu variation, I tried Fedora 35 KDE to replace Mint. It seems to have built-in battery management (perhaps from gnome?) that does not require TLP, which can be found under Advanced Power Management. Like Mint, Fedora 35’s battery threshold appears to carry over to Qubes.
I know that ThinkPads have some chip that controls the batteries. Perhaps after setting the threshold over TLP, this threshold is stored within the battery itself that carries over to Qubes? In my case, this has worked on both original and 3rd party batteries. Since TLP’s threshold is only specifically for ThinkPads, perhaps the Fedora 35’s threshold will work on other brands.
It would be interesting if any users could test this and see if this finding is correct.