[GH-ISSUE #694] [UPower] UPower module crashes bar on desktop #4449

Closed
opened 2026-05-23 00:53:19 +01:00 by JakeStanger · 8 comments
Owner

Originally created by @GameDungeon on GitHub (Aug 9, 2024).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/694

Describe the bug

A clear and concise description of what the bug is.

If I use the UPower module on a Desktop PC with no battery it crashes the entire bar. I use nix and share my config between my desktop and my laptop, but I currently can't as my laptop's config will crash the bar on the desktop.

To Reproduce
Steps to reproduce the behavior:
Add UPower module to a desktop PC's bar

Expected behavior

A clear and concise description of what you expected to happen.

Not having the bar crash (Adding an option to hide the UPower if there is no battery detected would be great as well)

System information:

 - Distro: NixOS
- Compositor: Hyprland
 - Ironbar version: 0.15.1

Additional context

Add any other context about the problem here.

Screenshots

If applicable, add screenshots to help explain your problem.

Originally created by @GameDungeon on GitHub (Aug 9, 2024). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/694 **Describe the bug** > A clear and concise description of what the bug is. If I use the UPower module on a Desktop PC with no battery it crashes the entire bar. I use nix and share my config between my desktop and my laptop, but I currently can't as my laptop's config will crash the bar on the desktop. **To Reproduce** Steps to reproduce the behavior: Add UPower module to a desktop PC's bar **Expected behavior** > A clear and concise description of what you expected to happen. Not having the bar crash (Adding an option to hide the UPower if there is no battery detected would be great as well) **System information:** ``` - Distro: NixOS - Compositor: Hyprland - Ironbar version: 0.15.1 ``` **Additional context** > Add any other context about the problem here. **Screenshots** > If applicable, add screenshots to help explain your problem.
JakeStanger 2026-05-23 00:53:19 +01:00
  • closed this issue
  • added the
    T:Bug
    label
Author
Owner

@GameDungeon commented on GitHub (Aug 9, 2024):

After further testing it turns out that the UPower module also crashes on my laptop

<!-- gh-comment-id:2277926895 --> @GameDungeon commented on GitHub (Aug 9, 2024): After further testing it turns out that the UPower module also crashes on my laptop
Author
Owner

@JakeStanger commented on GitHub (Aug 9, 2024):

Can you provide logs please?

<!-- gh-comment-id:2277964807 --> @JakeStanger commented on GitHub (Aug 9, 2024): Can you provide logs please?
Author
Owner

@GameDungeon commented on GitHub (Aug 9, 2024):

Here is the log file, if you want I can give the rust backtrace

2024-08-09T03:09:19.490116Z  WARN ironbar::image::provider: Failed to find image: content-loading-symbolic
2024-08-09T03:09:19.560997Z  WARN ironbar::image::provider: Failed to find image: content-loading-symbolic
2024-08-09T03:09:19.566535Z  WARN ironbar::image::provider: Failed to find image: dialog-question-symbolic
2024-08-09T03:09:19.567801Z  WARN ironbar::image::provider: Failed to find image: network-wireless-symbolic
2024-08-09T03:09:19.569863Z  WARN ironbar::image::provider: Failed to find image: network-wireless-symbolic
2024-08-09T03:09:21.022212Z  WARN ironbar::clients::volume: Couldn't find sink: @DEFAULT_SINK@
2024-08-09T03:09:21.599689Z  WARN ironbar::clients::volume: Couldn't find sink: @DEFAULT_SINK@
2024-08-09T03:09:21.725570Z  WARN ironbar::clients::volume: Couldn't find sink: alsa_output.usb-Blue_Microphones_Yeti_Stereo_Microphone_797_2018_07_03_46695-00.pro-output-0
2024-08-09T15:01:29.568429Z  WARN ironbar::image::provider: Failed to find image: content-loading-symbolic
2024-08-09T15:01:29.570633Z ERROR ironbar::logging: The application panicked (crashed).
Message:  failed to get display device for UPowerProxy(Proxy { inner: ProxyInner { inner_without_borrows: ProxyInnerStatic { dest_owner_change_match_rule: OnceCell(Uninit) }, destination: WellKnown(WellKnownName(Str(Static("org.freedesktop.UPower")))), path: ObjectPath("/org/freedesktop/UPower"), interface: InterfaceName(Str(Static("org.freedesktop.UPower"))), property_cache: Some(OnceCell(Uninit)), uncached_properties: {} } })
Location: src/clients/upower.rs:18

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
2024-08-09T15:01:29.577452Z  WARN ironbar::image::provider: Failed to find image: network-wireless-symbolic
<!-- gh-comment-id:2278164839 --> @GameDungeon commented on GitHub (Aug 9, 2024): Here is the log file, if you want I can give the rust backtrace ``` 2024-08-09T03:09:19.490116Z WARN ironbar::image::provider: Failed to find image: content-loading-symbolic 2024-08-09T03:09:19.560997Z WARN ironbar::image::provider: Failed to find image: content-loading-symbolic 2024-08-09T03:09:19.566535Z WARN ironbar::image::provider: Failed to find image: dialog-question-symbolic 2024-08-09T03:09:19.567801Z WARN ironbar::image::provider: Failed to find image: network-wireless-symbolic 2024-08-09T03:09:19.569863Z WARN ironbar::image::provider: Failed to find image: network-wireless-symbolic 2024-08-09T03:09:21.022212Z WARN ironbar::clients::volume: Couldn't find sink: @DEFAULT_SINK@ 2024-08-09T03:09:21.599689Z WARN ironbar::clients::volume: Couldn't find sink: @DEFAULT_SINK@ 2024-08-09T03:09:21.725570Z WARN ironbar::clients::volume: Couldn't find sink: alsa_output.usb-Blue_Microphones_Yeti_Stereo_Microphone_797_2018_07_03_46695-00.pro-output-0 2024-08-09T15:01:29.568429Z WARN ironbar::image::provider: Failed to find image: content-loading-symbolic 2024-08-09T15:01:29.570633Z ERROR ironbar::logging: The application panicked (crashed). Message: failed to get display device for UPowerProxy(Proxy { inner: ProxyInner { inner_without_borrows: ProxyInnerStatic { dest_owner_change_match_rule: OnceCell(Uninit) }, destination: WellKnown(WellKnownName(Str(Static("org.freedesktop.UPower")))), path: ObjectPath("/org/freedesktop/UPower"), interface: InterfaceName(Str(Static("org.freedesktop.UPower"))), property_cache: Some(OnceCell(Uninit)), uncached_properties: {} } }) Location: src/clients/upower.rs:18 Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. Run with RUST_BACKTRACE=full to include source snippets. 2024-08-09T15:01:29.577452Z WARN ironbar::image::provider: Failed to find image: network-wireless-symbolic ```
Author
Owner

@JakeStanger commented on GitHub (Aug 9, 2024):

Okay so I'm not sure why yours is crashing. I'd double check you actually have Upower installed and running on your machine? I just tested on my desktop and it runs there at least, and I know it works on my laptop.

I'm just merging a fix that should avoid it from hard-crashing on error at least.

<!-- gh-comment-id:2278822207 --> @JakeStanger commented on GitHub (Aug 9, 2024): Okay so I'm not sure why yours is crashing. I'd double check you actually have Upower installed and running on your machine? I just tested on my desktop and it runs there at least, and I know it works on my laptop. I'm just merging a fix that should avoid it from hard-crashing on error at least.
Author
Owner

@GameDungeon commented on GitHub (Aug 9, 2024):

Oh, The wiki page for that does not say anything about needing another piece of software so I never thought to check (I thought that was just the name of the widget) Let me try that with the software lol

<!-- gh-comment-id:2278825828 --> @GameDungeon commented on GitHub (Aug 9, 2024): Oh, The wiki page for that does not say anything about needing another piece of software so I never thought to check (I thought that was just the name of the widget) Let me try that with the software lol
Author
Owner

@JakeStanger commented on GitHub (Aug 9, 2024):

I guess that wasn't tremendously clear if you don't know. I've just added a note to the wiki.

<!-- gh-comment-id:2278829644 --> @JakeStanger commented on GitHub (Aug 9, 2024): I guess that wasn't tremendously clear if you don't know. I've just added a note to the wiki.
Author
Owner

@GameDungeon commented on GitHub (Aug 9, 2024):

Well thank you, between the wiki note and that PR I think I can close this now.

<!-- gh-comment-id:2278831078 --> @GameDungeon commented on GitHub (Aug 9, 2024): Well thank you, between the wiki note and that PR I think I can close this now.
Author
Owner

@JakeStanger commented on GitHub (Aug 9, 2024):

Awesome np, cheers for confirming

<!-- gh-comment-id:2278835282 --> @JakeStanger commented on GitHub (Aug 9, 2024): Awesome np, cheers for confirming
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#4449
No description provided.