Control max battery charge level for better battery health

Hello,

is there any other method for the Framework 16 than changing the maximum charge level via the bios?
I found a Gnome extension, but it only talks about FW13.

The extension you mentioned required this extra kernel module

It mentions that FW16 is supported

You can also try this extension

(Disclaimer: I am the author)
I tested it only with FW13 but it uses a library (GitHub - FrameworkComputer/framework-system: Rust libraries and tools to interact with the Framework Computer systems) from Framework

Thank you, I’ll have to see how I can do that with fedora silverblue

I am using it myself with Fedora Silverblue, just updated the Readme with installation instructions for Fedora Atomic Desktops (aka Silverblue)

do I also have to install the framework-system library or is it included?

no, this library is included

These commands should be enough:

# Fedora Atomic Desktop
$ rpm-ostree install frameworkd-0.2.0-1.x86_64.rpm

# Gnome Shell extension
mkdir -p ~/.local/share/gnome-shell/extensions/frameworkctl@stefanhoelzl
unzip frameworkctl@stefanhoelzl.shell-extension-zip -d ~/.local/share/gnome-shell/extensions/frameworkctl@stefanhoelzl
gnome-extensions enable frameworkctl@stefanhoelzl
# restart gnome-shell
#  Wayland
#   logout and login again
#   or start a new session to test the extension: `dbus-run-session -- gnome-shell --nested --wayland`
#  X11: press Alt+F2 and enter `restart`

I was able to install both the rpm and the extension, but the control does not work.
When I run it from the console I get the following message:

busctl call org.stefanhoelzl.frameworkd /battery org.stefanhoelzl.framework.Battery GetChargeLimit
Call failed: Could not activate remote peer 'org.stefanhoelzl.frameworkd': unit failed

can you run systemctl --type=service and look for something like dbus-:1.3-org.stefanhoelzl.frameworkd@0.service

and then run journalctl -u dbus-:1.3-org.stefanhoelzl.frameworkd@0.service and post the output here?

Did you disable secure boot in the BIOS? like mentioned in the readme. This is required until the EC driver lands in kernel (should land in 6.10)

cant finde this

journalctl -u dbus-:1.3-org.stefanhoelzl.frameworkd@0.service
Jun 01 12:13:25 tealks-frame-work systemd[1]: Started dbus-:1.3-org.stefanhoelzl.frameworkd@0.service.
Jun 01 12:13:25 tealks-frame-work frameworkd[6607]: Failed to open /dev/cros_ec. Because: Os { code: 2, kind: NotFound, message: ">
Jun 01 12:13:25 tealks-frame-work frameworkd[6607]: thread 'main' panicked at /home/runner/.cargo/git/checkouts/framework-system-c>
Jun 01 12:13:25 tealks-frame-work frameworkd[6607]: called `Option::unwrap()` on a `None` value
Jun 01 12:13:25 tealks-frame-work frameworkd[6607]: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Jun 01 12:13:25 tealks-frame-work frameworkd[6607]: thread 'main' panicked at src/main.rs:61:21:
Jun 01 12:13:25 tealks-frame-work frameworkd[6607]: driver error
Jun 01 12:13:25 tealks-frame-work frameworkd[6607]: Error: "no driver found"
Jun 01 12:13:25 tealks-frame-work systemd[1]: dbus-:1.3-org.stefanhoelzl.frameworkd@0.service: Main process exited, code=exited, s>
Jun 01 12:13:25 tealks-frame-work systemd[1]: dbus-:1.3-org.stefanhoelzl.frameworkd@0.service: Failed with result 'exit-code'.
-- Boot f4b01487111f4be0bd13ebdf78db94b9 --
Jun 01 13:17:40 tealks-frame-work systemd[1]: Started dbus-:1.3-org.stefanhoelzl.frameworkd@0.service.
Jun 01 13:17:40 tealks-frame-work frameworkd[5256]: Failed to open /dev/cros_ec. Because: Os { code: 2, kind: NotFound, message: ">
Jun 01 13:17:40 tealks-frame-work frameworkd[5256]: thread 'main' panicked at /home/runner/.cargo/git/checkouts/framework-system-c>
Jun 01 13:17:40 tealks-frame-work frameworkd[5256]: called `Option::unwrap()` on a `None` value
Jun 01 13:17:40 tealks-frame-work frameworkd[5256]: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Jun 01 13:17:40 tealks-frame-work systemd[1]: dbus-:1.3-org.stefanhoelzl.frameworkd@0.service: Main process exited, code=exited, s>
Jun 01 13:17:40 tealks-frame-work frameworkd[5256]: thread 'main' panicked at src/main.rs:61:21:
Jun 01 13:17:40 tealks-frame-work frameworkd[5256]: driver error
Jun 01 13:17:40 tealks-frame-work frameworkd[5256]: Error: "no driver found"
Jun 01 13:17:40 tealks-frame-work systemd[1]: dbus-:1.3-org.stefanhoelzl.frameworkd@0.service: Failed with result 'exit-code'.

oh I overlooked that

This also indicates, that the reason is because secure boot is still enabled.

Hope it works after you disable secure boot.

You could also try the charge control driver from Request: Testing of Linux drivers on all laptop models

It exposes the standard UAPI, so all standards compliant tools should support it out of the box.

Disclaimer: I’m the author.

Cant find a Option in Bios to disable secure boot.

Ok i relly dont understand the https://lore.kernel.org side

Cant find a Option in Bios to disable secure boot.

Does this work to disable secure boot?

now i can execute the commands without the error message.

KeybLight doesn’t work

busctl call org.stefanhoelzl.frameworkd /kblight org.stefanhoelzl.framework.KeybLight GetBrightness
Call failed: Connection timed out

FprintLed and Battery work

but :frowning: