Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2795

How to I check the battery level on a Microsoft Surface from a WSL Ubuntu shell?

$
0
0

There are plenty of tutorials online for checking your battery level in a ubuntu terminal. The most common solution seems to be to use upower. However, when I run upower in a WSL Ubuntu shell in Windows 10 on my Surface Pro, I get this:

user@sp4-2637:~/the_thing$ sudo upower(upower:665): UPower-WARNING **: Cannot connect to upowerd: Could not connect: No such file or directory

Running with sudo priviliges yields the same result.

On my laptop running native ubuntu I can query the battery level like this;

cat /sys/class/power_supply/BAT0/capacity

However, this results in the following on my Surface:

user@sp4-2637:~$ cat /sys/class/power_supply/BAT0/capacitycat: /sys/class/power_supply/BAT0/capacity: No such file or directory

How can I query the battery level in a WSL ubuntu shell for a Microsoft Surface?


Viewing all articles
Browse latest Browse all 2795

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>