Set Battery thresholds x230

21 views
Skip to first unread message

Franz

unread,
Mar 18, 2020, 10:56:46 AM3/18/20
to qubes-users
When a laptop is always connected to power, e very good behavior to strongly prolong battery life is to avoid charging it to 100% and limiting it to lower threshold, perhaps 80%.

Thinkpads have this facility on linux. But the Fedora command for that is:
to first install tlp package which works with
sudo qubes-dom0-update tlp

then, it is required to install packages that are not availble from the official Fedora repositories, instead you need RPM Fusion and TLP repositories in a root shell.

The Fedora command is the following:
dnf install kernel-devel akmod-acpi_call

Is there a way to get this working without compromising security?
Best

dhorf-hfre...@hashmail.org

unread,
Mar 18, 2020, 12:08:17 PM3/18/20
to Franz, qubes-users
On Wed, Mar 18, 2020 at 11:56:31AM -0300, Franz wrote:
> When a laptop is always connected to power, e very good behavior to
> strongly prolong battery life is to avoid charging it to 100% and limiting
> it to lower threshold, perhaps 80%.

i am using a (perl) script for doing this on my qubes chromebooks.
trivial if you have ways to a) get the current battery level and
b) control the charger (charge/idle/discharge).


> The Fedora command is the following:
> dnf install kernel-devel akmod-acpi_call

mixing random custom kernel modules with a qubes kernel is unlikely
to work. at all. even if you figure out how to install the pkgs.

depending on whats in these pkgs (does it have a Kconfig and can be
built out of tree?) and what parts of it you actualy need rolling
your own kernel-latest pkg may work.

and even if you have a working kernel+module combo it simply may not
work under xen. (depends on what kind of interfaces it is using)


> Is there a way to get this working without compromising security?

depends on what you mean by "security" there.
did you review the code already?



Franz

unread,
Mar 18, 2020, 5:15:16 PM3/18/20
to dhorf-hfre...@hashmail.org, qubes-users
On Wed, Mar 18, 2020 at 1:08 PM <dhorf-hfre...@hashmail.org> wrote:
On Wed, Mar 18, 2020 at 11:56:31AM -0300, Franz wrote:
> When a laptop is always connected to power, e very good behavior to
> strongly prolong battery life is to avoid charging it to 100% and limiting
> it to lower threshold, perhaps 80%.

i am using a (perl) script for doing this on my qubes chromebooks.
trivial if you have ways to a) get the current battery level and
b) control the charger (charge/idle/discharge).


> The Fedora command is the following:
> dnf install kernel-devel akmod-acpi_call

mixing random custom kernel modules with a qubes kernel is unlikely
to work. at all. even if you figure out how to install the pkgs.

Thanks for replying, now I understand it is too difficult for me. I have another x230 with arch and it worked immediately, so supposed Qubes only required some trick, but now understand it is far beyond my capabilities.

Many thanks


Reply all
Reply to author
Forward
0 new messages