-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
No such device error #33
Comments
Interesting, usually I'd say that it is the controller misbehaving in some way, but who knows? Do you have any way of testing on another OS (i.e. not Linux)? |
I have switched from Arch to Ubuntu in the meantime so not sure if it still is an issue but will try to run it on my University's Windows PC. Although I don't understand why I should run it on Windows. |
I get the same error on my |
@kivattt It would be great if you could do what I mentioned in the previous comment. Maybe then I'll be able to get an idea on how to fix this, as I have never encountered it myself. |
$ /bin/ls -l /sys/class/power_supply/BAT1/
/bin/ls: cannot access '/sys/class/power_supply/BAT1/': No such file or directory $ /bin/ls -l /sys/class/power_supply/
total 0
lrwxrwxrwx 1 root root 0 Jul 19 19:07 AC -> ../../devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/AC
lrwxrwxrwx 1 root root 0 Jul 19 19:07 BAT0 -> ../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0 |
Thanks! OK, so you don't have a |
My bad, $ /bin/ls -l /sys/class/power_supply/BAT0/
total 0
-rw-r--r-- 1 root root 4096 Jul 26 00:09 alarm
-r--r--r-- 1 root root 4096 Jul 19 19:07 capacity
-r--r--r-- 1 root root 4096 Jul 26 00:09 capacity_level
-r--r--r-- 1 root root 4096 Jul 19 19:07 charge_full
-r--r--r-- 1 root root 4096 Jul 19 19:07 charge_full_design
-r--r--r-- 1 root root 4096 Jul 19 19:07 charge_now
-r--r--r-- 1 root root 4096 Jul 19 19:07 current_now
-r--r--r-- 1 root root 4096 Jul 19 19:07 cycle_count
lrwxrwxrwx 1 root root 0 Jul 19 19:07 device -> ../../../PNP0C0A:00
drwxr-xr-x 3 root root 0 Jul 19 19:07 hwmon2
-r--r--r-- 1 root root 4096 Jul 19 19:07 manufacturer
-r--r--r-- 1 root root 4096 Jul 19 19:07 model_name
drwxr-xr-x 2 root root 0 Jul 26 00:09 power
-r--r--r-- 1 root root 4096 Jul 19 19:07 present
-r--r--r-- 1 root root 4096 Jul 19 19:07 serial_number
-r--r--r-- 1 root root 4096 Jul 19 19:07 status
lrwxrwxrwx 1 root root 0 Jul 19 19:07 subsystem -> ../../../../../../class/power_supply
-r--r--r-- 1 root root 4096 Jul 19 19:07 technology
-r--r--r-- 1 root root 4096 Jul 19 19:07 type
-rw-r--r-- 1 root root 4096 Jul 19 19:07 uevent
-r--r--r-- 1 root root 4096 Jul 19 19:07 voltage_min_design
-r--r--r-- 1 root root 4096 Jul 19 19:07 voltage_now |
When I run the
battery.GetAll()
function, it gives me the following error:While I was tinkering, I found out that the
ls
command did show a file namedpower_now
but opening it withcat
gives the same error as above. On the other hand, I found out that there is another file calledcapacity
which gives the battery level.I am on Arch Linux and using
go 1.21.6
.The text was updated successfully, but these errors were encountered: