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

XFCE battery indicator keeps switching charge state when fully charged #1217

Open
wessel-novacustom opened this issue Jan 23, 2025 · 14 comments
Labels
bug Something isn't working firmware needs review novacustom_v54_mtl NovaCustom V54 Series novacustom_v56_mtl NovaCustom V56 Series

Comments

@wessel-novacustom
Copy link

Component

Dasharo firmware

Device

NovaCustom V56 14th Gen, NovaCustom V54 14th Gen

Dasharo version

v0.9.0

Dasharo Tools Suite version

No response

Test case ID

No response

Brief summary

When the laptop is fully charged, it keeps switching from Charging to Fully charged.

How reproducible

100% reproducible.

How to reproduce

  1. Install an operating system that uses XFCE, like Qubes OS.
  2. Make sure that the battery is fully charged.
  3. Observe the battery indicator for about 10 minutes.

Expected behavior

When the battery is fully charged, it says Fully charged and doesn't change.

Actual behavior

It keeps switching from Charging to Fully charged.

Screenshots

No response

Additional context

It seems to happen with both USB-C charging and regular DC jack charging.

I'm not sure if this can be fixed by firmware?

Does anyone know how to stop these annoying popups?

Solutions you've tried

No response

@wessel-novacustom wessel-novacustom added bug Something isn't working needs review labels Jan 23, 2025
@github-actions github-actions bot added firmware novacustom_v54_mtl NovaCustom V54 Series novacustom_v56_mtl NovaCustom V56 Series labels Jan 23, 2025
@mkopec
Copy link
Member

mkopec commented Jan 23, 2025

Does it happen with the default battery thresholds of 95-98?

@wessel-novacustom
Copy link
Author

@mkopec Yes. So far only tested for Dasharo coreboot+UEFI.

@wessel-novacustom
Copy link
Author

Adding screenshots:

Image
Image

This happens while the power adaptor is plugged in and the battery is fully charged, it keeps switching between both messages around every 5 minutes (sometimes even more often).

Also confirmed under Heads (rc5).

@lfinbob
Copy link

lfinbob commented Jan 26, 2025

I see the same behavior on my NovaCustom NV54 laptop with Qubes 4.2.3 using XFCE.
It happens default thresholds and custom thresholds (70-98 in my case) and regardless of charging method (USB-C PD or normal PSU).
Running Dasharo (coreboot+UEFI) v0.9.0.

@PerAstraAdDeum
Copy link

This is happening to me as well on Arch Linux with KDE Plasma 6.2.5.

I get constantly changing indicators for charging, also, for some reason, the battery seems to loose power even when the laptop is plugged in the whole time. Battery thresholds are on default.

@filipleple
Copy link
Member

So far, I haven't managed to reproduce this on V540TU, Dasharo v0.9.0 and Qubes 4.2.3 kernel-latest. I've waited for ~10min on both DC barrel jack and USB-C, Qubes remained at Fully charged as expected, using both the default and custom thresholds. I will also try on V56.

@wessel-novacustom
Copy link
Author

So far, I haven't managed to reproduce this on V540TU, Dasharo v0.9.0 and Qubes 4.2.3 kernel-latest. I've waited for ~10min on both DC barrel jack and USB-C, Qubes remained at Fully charged as expected, using both the default and custom thresholds. I will also try on V56.

@filipleple I'm not 100% sure about the V54, it happens on the V56 Series for sure. You might need longer than 10 minutes.

@marmarek Maybe you have seen this in Qubes OS, too?

@PerAstraAdDeum
Copy link

I can confirm this is ocuring on the V54 (Intel-only model). However, I don't know hot to reproduce it. I've been seeing this error for quite some time now, I always thought it'd probably be a KDE issue though.

Maybe it is tied to a certain battery load percentage.

@lfinbob
Copy link

lfinbob commented Feb 8, 2025

I haven't managed to reproduce this on V540TU, Dasharo v0.9.0 and Qubes 4.2.3 kernel-latest.

I run a very similar configuration and confirm the problem:
V54x_6x_TU/V54x_6x_TU, BIOS Dasharo (coreboot+UEFI) v0.9.0 07/17/2024

I think you need to spend around 2 hours on the machine to notice it, roughly

@filipleple
Copy link
Member

filipleple commented Feb 11, 2025

I've finally managed to reproduce this on V56 with DC jack plugged in. I did a fresh install of Qubes 4.2.3 kernel-latest, and while it didn't happen for a few hours of leaving the platform completely idle, it started to occur when I started applying some stress testing.

It seems to be directly correlated with how much power is being drawn/required by the platform while it's within the thresholds. When I ran the stress test, the "charging" popup appeared. When I turned it off, after a while it went back to "fully charged".

@wessel-novacustom
Copy link
Author

@marmarek
Copy link

When it happens under load, isn't that a side effect of using battery to help delivering more power, on top of what power supply provides?

@mkopec
Copy link
Member

mkopec commented Feb 24, 2025

When it happens under load, isn't that a side effect of using battery to help delivering more power, on top of what power supply provides?

Exactly, it's because of battery power boost. The issue is that the charge and discharge current values are reported in the same current_now sysfs field and it's always positive.

XFCE sees that AC is in and current_now != 0, therefore battery is charging: https://github.com/xfce-mirror/xfce4-battery-plugin/blob/0399ebdbfcca60bf8262ac43617d758deb0b2635/panel-plugin/battery.c#L162-L166

Not sure where the bug is. On my chromebook the current_now value is negative when discharging. On a thinkpad, there is no current_now at all 🤔 Both are using different drivers than the standard acpi battery driver though.

@wiktormowinski
Copy link

wiktormowinski commented Mar 3, 2025

After applying a proper fix, the issue is no longer reproducible. Dasharo/coreboot#623

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working firmware needs review novacustom_v54_mtl NovaCustom V54 Series novacustom_v56_mtl NovaCustom V56 Series
Projects
None yet
Development

No branches or pull requests

8 participants