Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Fix battery percentage error causing crash #142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jongarbe
Copy link

Changing the battery device_path from BAT0 to BAT1 now solves null value on /config/awesome/modules/UPower/init.lua, that caused the entire setup to crash.

Changing the battery device_path from BAT0 to BAT1 now solves null value on /config/awesome/modules/UPower/init.lua, that caused the entire setup to crash.
@xrhstosmour
Copy link

When using the above configuration inside a VM, the setup fails again.
On the other hand using use_display_device = true instead of device_path = "/org/freedesktop/UPower/devices/battery_BAT0" at the .config/awesome/signal/baterry.lua file, does not crash the entire setup.
The widget shows 0% all the time, but I am not sure how is the behavior on a device with a battery present.

@jongarbe
Copy link
Author

@xrhstosmour I hadn't tested VMs before but what you mentioned is true and works, I guess my fix only works when the battery is present. Thanks for your comment.

@xrhstosmour
Copy link

xrhstosmour commented Sep 18, 2022

@jgarciaehu No need to thank me, happy to help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants