Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Power management regression with 2.4 (compared to 2.1): battery charge thresholds can't be set anymore #35

Open
12 of 50 tasks
UndeadDevel opened this issue Jan 11, 2024 · 6 comments

Comments

@UndeadDevel
Copy link

Please identify some basic details to help process the report

After upgrading to NK Heads 2.4 from 2.1 the system files /sys/class/power_supply/BAT0/charge_control_end_threshold and /sys/class/power_supply/BAT0/charge_control_start_threshold are gone (no OS updates were conducted simultaneously, so is definitely cause by the new firmware). This means limiting the charging process of the battery doesn't work anymore and the battery will always charge to 100%, which is a problem for those who mostly use the laptop in a stationary fashion for longer periods of time, in which case A/C would be connected.

To improve battery life it's important not to keep the battery charged at 100% for extended periods, but for that to work one either needs to cycle (by disconnecting and reconnecting the A/C, which is easily forgotten and is also worse for battery life than keeping it at e.g. 60% constantly) or set charging limits (by far the most convenient method). The latter method is now impossible.

A. Provide Hardware Details

1. What board are you using (see list of boards here)?
Nitropad NV41

2. Does your computer have a dGPU or is it iGPU-only?

  • dGPU
  • iGPU-only

3. Who installed Heads on this computer?

  • Insurgo
  • Nitrokey (original 2.1)
  • Purism
  • Other provider
  • Self-installed (2.4 via internal GUI upgrade function)

4. What PGP key is being used?

  • Librem Key
  • Nitrokey Pro 2
  • Nitrokey Storage
  • Yubikey
  • Other (Nitrokey 3A Mini)

5. Are you using the PGP key to provide HOTP verification?

  • Yes
  • No
  • I don't know

B. Identify how the board was flashed

1. Is this problem related to updating heads or flashing it for the first time?

  • First-time flash
  • Updating heads
  • Neither, separate issue with the new firmware

2. If the problem is related to an update, how did you attempt to apply the update?

  • Using the Heads GUI
  • Flashrom via the Recovery Shell
  • External flashing

3. How was Heads initially flashed

  • External flashing (presumably...NitroKey did it)
  • Internal-only / 1vyrain
  • Don't know

4. Was the board flashed with a maximized or non-maximized/legacy rom?

  • Maximized (presumably)
  • Non-maximized / legacy
  • I don't know

5. If Heads was externally flashed, was IFD unlocked?

  • Yes (presumably)
  • No
  • Don't know

C. Identify the rom related to this bug report

NK Heads 2.4
1. Did you download or build the rom at issue in this bug report?

  • I downloaded it
  • I built it

2. If you downloaded your rom, where did you get it from?

  • Heads CircleCi
  • Purism
  • Nitrokey (this GitHub repo)
  • Somewhere else (please identify)

Please provide the release number or otherwise identify the rom downloaded

3. If you built your rom, which repository:branch did you use?

  • Heads:Master
  • Other (please identify)

4. What version of coreboot did you use in building?

  • 4.8.1 (current default in heads:master)
  • 4.13
  • 4.14
  • 4.15
  • Other (please specify)
  • I don't know

5. In building the rom where did you get the blobs?

  • No blobs required
  • Provided by the company that installed Heads on the device
  • Extracted from a backup rom taken from this device
  • Extracted from another backup rom taken from another device (please identify the board model)
  • Extracted from the online bios using the automated tools provided in Heads
  • I don't know

Please describe the problem

Describe the bug
Under 2.1 with QubesOS 4.2 one could easily set charging thresholds by echoing values into the relevant system files; after upgrading to 2.4 this is not possible anymore, because the relevant files (see below) are gone.

To Reproduce
Steps to reproduce the behavior:

  1. Upgrade NV41 to NK Heads 2.4
  2. Observe that unlike under 2.1 the files /sys/class/power_supply/BAT0/charge_control_end_threshold and /sys/class/power_supply/BAT0/charge_control_start_threshold are gone and no "replacements" under different names are to be found.

Expected behavior
Ability to limit charging by setting thresholds is retained.

@daringer
Copy link
Collaborator

no idea from the top of my head, needs investigations - we try to reproduce

@UndeadDevel
Copy link
Author

Another NV41 user on the QubesOS forum reports that for her, using coreboot 1.7.1 with QubesOS 4.2 the charging limitation is possible; so either this was broken in coreboot 1.7.2 or it's the NK Heads build that messes things up.

@daringer
Copy link
Collaborator

daringer commented Jan 17, 2024

ah ok, that's a good hint - if it's configurable within the "bios" (edk2) then this it's likely something we lose due to HEADS and its current inability to init/configure some of the coreboot-level parameters (idle level, fan curve, ...).

@tlaurion
Copy link

tlaurion commented Apr 22, 2024

linuxboot#1647 (comment)

@daringer EC firmware regression?

@daringer
Copy link
Collaborator

hard to tell, afaik there was no EC update in between - I would still guess something within dasharo coreboot that changed...

@tlaurion
Copy link

That's Dasharo/dasharo-issues#820

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants