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

[BUG] battery magic var does not detect battery without capacity #1243

Open
3 tasks done
classabbyamp opened this issue Dec 10, 2024 · 0 comments
Open
3 tasks done

[BUG] battery magic var does not detect battery without capacity #1243

classabbyamp opened this issue Dec 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@classabbyamp
Copy link

classabbyamp commented Dec 10, 2024

Checklist before submitting an issue

  • I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
  • I have specifically verified that this bug is not a common user error
  • I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)

Description of the bug

On the Lenovo X13s, the battery does not provide a capacity file in /sys/class/power_supply. According to the kernel docs, this is valid when the firmware does not provide the information and shouldn't be calculated by the kernel.

Can eww calculate this value when not available from the kernel?

Reproducing the issue

  1. Have a computer with a battery that does not provide capacity
  2. read EWW_BATTERY

Expected behaviour

EWW_BATTERY contains a value for the battery

Additional context

$ ls -l /sys/class/power_supply/qcom-battmgr-bat/     
total 0
-r--r--r-- 1 root root 4096 Dec 10 17:26 charge_empty
-r--r--r-- 1 root root 4096 Dec 10 17:26 charge_full
-r--r--r-- 1 root root 4096 Dec 10 17:26 charge_full_design
-r--r--r-- 1 root root 4096 Dec 10 17:26 charge_now
-r--r--r-- 1 root root 4096 Dec 10 17:26 cycle_count
lrwxrwxrwx 1 root root    0 Dec 10 17:26 device -> ../../../pmic_glink.power-supply.0
-r--r--r-- 1 root root 4096 Dec 10 17:26 energy_empty
-r--r--r-- 1 root root 4096 Dec 10 17:26 energy_full
-r--r--r-- 1 root root 4096 Dec 10 17:26 energy_full_design
-r--r--r-- 1 root root 4096 Dec 10 17:26 energy_now
drwxr-xr-x 3 root root    0 Dec 10 17:26 hwmon0
-r--r--r-- 1 root root 4096 Dec 10 17:26 manufacture_day
-r--r--r-- 1 root root 4096 Dec 10 17:26 manufacture_month
-r--r--r-- 1 root root 4096 Dec 10 17:26 manufacture_year
-r--r--r-- 1 root root 4096 Dec 10 17:26 manufacturer
-r--r--r-- 1 root root 4096 Dec 10 17:26 model_name
lrwxrwxrwx 1 root root    0 Dec 10 17:26 of_node -> ../../../../../../firmware/devicetree/base/pmic-glink
drwxr-xr-x 2 root root    0 Dec 10 17:26 power
-r--r--r-- 1 root root 4096 Dec 10 17:26 power_now
-r--r--r-- 1 root root 4096 Dec 10 17:26 present
-r--r--r-- 1 root root 4096 Dec 10 17:26 serial_number
-r--r--r-- 1 root root 4096 Dec 10 17:26 status
lrwxrwxrwx 1 root root    0 Dec 10 17:26 subsystem -> ../../../../../../class/power_supply
-r--r--r-- 1 root root 4096 Dec 10 17:26 technology
-r--r--r-- 1 root root 4096 Dec 10 17:26 temp
-r--r--r-- 1 root root 4096 Dec 10 17:26 type
-rw-r--r-- 1 root root 4096 Dec 10 17:26 uevent
-r--r--r-- 1 root root 4096 Dec 10 17:26 voltage_max_design
-r--r--r-- 1 root root 4096 Dec 10 17:26 voltage_now
drwxr-xr-x 2 root root    0 Dec 10 17:26 wakeup2

Platform and environment

Void Linux, eww 0.6.0, X11

Linux 6.12.1_1 #1 SMP PREEMPT_DYNAMIC Sun Nov 24 23:14:58 UTC 2024 aarch64 GNU/Linux
@classabbyamp classabbyamp added the bug Something isn't working label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant