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

Does Macchina support two batteries? #295

Open
mohabmetwalli opened this issue Oct 4, 2023 · 3 comments
Open

Does Macchina support two batteries? #295

mohabmetwalli opened this issue Oct 4, 2023 · 3 comments
Labels
area/fetching Has something to do with the fetched information. other/help-wanted Your help is needed. type/feature Request a new feature.

Comments

@mohabmetwalli
Copy link

I wasn't sure if I should open this issue as a bug or a feature request, so I thought I should ask this question first.

My laptop has two batteries, and I suspect this is the reason macchina cannot read battery percentage.

macchina --doctor output:

Let's check your system for errors... Here's a summary:

We've collected 9 readouts, including 1 failed read(s) and 0 read(s) which resulted in a warning.
Readout "Battery" failed with message: No such file or directory (os error 2)

ls /sys/class/power_supply --all output:

.  ..  AC  BAT0  BAT1  ucsi-source-psy-USBC000:001  ucsi-source-psy-USBC000:002
@grtcdr grtcdr added area/fetching Has something to do with the fetched information. type/feature Request a new feature. other/help-wanted Your help is needed. labels Oct 4, 2023
@grtcdr
Copy link
Member

grtcdr commented Oct 4, 2023

Hi.

It can't. I don't really know how to tackle this problem, either. I also don't have the hardware to try and write an implementation. It would be very appreciated if you or others alike could give us a hand with this problem.

@FantasyTeddy
Copy link
Contributor

Even if multiple batteries are present, shouldn't macchina just report the status of the first one?

@mohabmetwalli: Can you show the directory listing of /sys/class/power_supply/BAT0?

@grtcdr
Copy link
Member

grtcdr commented May 13, 2024

Even if multiple batteries are present, shouldn't macchina just report the status of the first one?

Yes, indeed. I'll see what I can do to fix this. Adding support for this could prove to be a lot of work in libmacchina — dual-battery friends, if you really want to see support for multi-battery reports, please contribute your patches to libmacchina seeing as I don't have the hardware to do any meaningful tests.

@grtcdr grtcdr changed the title [Question] Does Macchina support two batteries? Does Macchina support two batteries? May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/fetching Has something to do with the fetched information. other/help-wanted Your help is needed. type/feature Request a new feature.
Development

No branches or pull requests

3 participants