[GH-ISSUE #642] [Hyprland] Ironbar does not load on monitor connect. #5839

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

Originally created by @ApproachingApathy on GitHub (Jun 17, 2024).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/642

Describe the bug
When I plug in a monitor the bar doesn't appear. ironbar reload returns an error.

To Reproduce
Steps to reproduce the behavior:

  1. Connect external monitors.
  2. Start ironbar.
  3. Bar should appear on all monitors.
  4. Disconnect monitors.
  5. Reconnect
  6. Bar will be on main display but not on externals.
  7. Try ironbar reload.
  8. You get some variation of "error" or
    image

Expected behavior
Bar should spawn on newly connected monitors and not error on ironbar reload.

System information:

  • Distro: Arch Linux
  • Compositor: Hyprland (pkg: extra/hyprland)
Hyprland, built from branch  at commit 9e781040d9067c2711ec2e9f5b47b76ef70762b3  (props: bump version to 0.41.1).
Date: Thu Jun 13 09:54:06 2024
Tag: v0.41.1, commits: 4818

flags: (if any)
  • Ironbar version: ironbar 0.16.0-pre
    • yay -Q reports: v0.15.1.r74.gd0bdf31-1

Configuration

Share your bar configuration and stylesheet as applicable:

Config
position = "top"
height = 4

[[start]]
type = "workspaces"
all_monitors = false
icon_size = 6

[[center]]
type = "focused"
show_icon = true
show_title = true
icon_size = 16
truncate = "end"

[[end]]
name = "recording-indicator"
type = "label"
label = '''{{poll:2000:
if [[ -f /tmp/wl-screenrec.pid ]]; then
echo 󰑊 
else
echo 
fi
}}'''

[[end]]
type = 'sys_info'
format = [
    ' {cpu_percent}% | {temp_c:k10temp-Tctl}°C',
    ' {memory_percent}%',
    '󰋊 {disk_percent:/}%',
    '󰓢 {net_down:enp195s0f4u1u4} / {net_up:enp195s0f4u1u4} Mbps',
]

[[end]]
type = "upower"
format = "{percentage}%"
icon_size = 16

[[end]]
type = "clock"
format = "%H:%M"

[end.interval]
cpu = 1
disks = 300
memory = 30
networks = 3
temps = 5
Styles

Additional context
Log:

2024-06-18T15:23:35.219091Z ERROR ironbar::logging: The application panicked (crashed).
Message:  Failed to get workspaces: SerdeError(Error("invalid number", line: 50, column: 18))
Location: src/clients/compositor/hyprland.rs:203

Screenshots

If applicable, add screenshots to help explain your problem.

Originally created by @ApproachingApathy on GitHub (Jun 17, 2024). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/642 **Describe the bug** When I plug in a monitor the bar doesn't appear. `ironbar reload` returns an error. **To Reproduce** Steps to reproduce the behavior: 1. Connect external monitors. 2. Start ironbar. 3. Bar should appear on all monitors. 4. Disconnect monitors. 5. Reconnect 6. Bar will be on main display but not on externals. 7. Try `ironbar reload`. 8. You get some variation of "error" or ![image](https://github.com/JakeStanger/ironbar/assets/26229099/88ed1121-7920-4b15-9526-9c7a5fdff314) **Expected behavior** Bar should spawn on newly connected monitors and not error on ironbar reload. **System information:** - Distro: Arch Linux - Compositor: Hyprland (pkg: `extra/hyprland`) ``` Hyprland, built from branch at commit 9e781040d9067c2711ec2e9f5b47b76ef70762b3 (props: bump version to 0.41.1). Date: Thu Jun 13 09:54:06 2024 Tag: v0.41.1, commits: 4818 flags: (if any) ``` - Ironbar version: ironbar 0.16.0-pre - `yay -Q` reports: v0.15.1.r74.gd0bdf31-1 **Configuration** > Share your bar configuration and stylesheet as applicable: <details><summary>Config</summary> ```toml position = "top" height = 4 [[start]] type = "workspaces" all_monitors = false icon_size = 6 [[center]] type = "focused" show_icon = true show_title = true icon_size = 16 truncate = "end" [[end]] name = "recording-indicator" type = "label" label = '''{{poll:2000: if [[ -f /tmp/wl-screenrec.pid ]]; then echo 󰑊 else echo fi }}''' [[end]] type = 'sys_info' format = [ ' {cpu_percent}% | {temp_c:k10temp-Tctl}°C', ' {memory_percent}%', '󰋊 {disk_percent:/}%', '󰓢 {net_down:enp195s0f4u1u4} / {net_up:enp195s0f4u1u4} Mbps', ] [[end]] type = "upower" format = "{percentage}%" icon_size = 16 [[end]] type = "clock" format = "%H:%M" [end.interval] cpu = 1 disks = 300 memory = 30 networks = 3 temps = 5 ``` </details> <details><summary>Styles</summary> ```css ``` </details> **Additional context** Log: ``` 2024-06-18T15:23:35.219091Z ERROR ironbar::logging: The application panicked (crashed). Message: Failed to get workspaces: SerdeError(Error("invalid number", line: 50, column: 18)) Location: src/clients/compositor/hyprland.rs:203 ``` **Screenshots** > If applicable, add screenshots to help explain your problem.
JakeStanger 2026-05-23 01:53:19 +01:00
Author
Owner

@JakeStanger commented on GitHub (Jun 28, 2024):

Hey, can you confirm what version(s) of Hyprland you are experiencing this on please?

<!-- gh-comment-id:2197743231 --> @JakeStanger commented on GitHub (Jun 28, 2024): Hey, can you confirm what version(s) of Hyprland you are experiencing this on please?
Author
Owner

@ApproachingApathy commented on GitHub (Jul 2, 2024):

Hyprland, built from branch  at commit 9e781040d9067c2711ec2e9f5b47b76ef70762b3  (props: bump version to 0.41.1).
Date: Thu Jun 13 09:54:06 2024
Tag: v0.41.1, commits: 4818

flags: (if any)
<!-- gh-comment-id:2203460485 --> @ApproachingApathy commented on GitHub (Jul 2, 2024): ``` Hyprland, built from branch at commit 9e781040d9067c2711ec2e9f5b47b76ef70762b3 (props: bump version to 0.41.1). Date: Thu Jun 13 09:54:06 2024 Tag: v0.41.1, commits: 4818 flags: (if any) ```
Author
Owner

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

Fun, I've just tested this and I can see what's happening. I believe it's related to https://github.com/swaywm/sway/issues/8164 (and the related gtk issue). Effectively, I have to hope that GDK and Wayland report monitors in the same order, which appears to be true until you (dis)connect one.

I'm not sure what I can do about that yet but I'll have a think.

<!-- gh-comment-id:2294821799 --> @JakeStanger commented on GitHub (Aug 17, 2024): Fun, I've just tested this and I can see what's happening. I believe it's related to https://github.com/swaywm/sway/issues/8164 (and the [related gtk issue](https://gitlab.gnome.org/GNOME/gtk/-/issues/6939)). Effectively, I have to hope that GDK and Wayland report monitors in the same order, which appears to be true until you (dis)connect one. I'm not sure what I can do about that yet but I'll have a think.
Author
Owner

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

So a fix has now been implemented in GTK for the issue. Once there's a new GTK3 release, I'll revert the logic in Ironbar to its previous implementation that should resolve this.

<!-- gh-comment-id:2295401180 --> @JakeStanger commented on GitHub (Aug 18, 2024): So a fix has now been implemented in GTK for the issue. Once there's a new GTK3 release, I'll revert the logic in Ironbar to its previous implementation that should resolve this.
Author
Owner

@ApproachingApathy commented on GitHub (Jan 28, 2025):

gtk3 3.24.48 is now available on arch.

<!-- gh-comment-id:2619580239 --> @ApproachingApathy commented on GitHub (Jan 28, 2025): gtk3 3.24.48 is now available on arch.
Author
Owner

@JakeStanger commented on GitHub (May 19, 2025):

Resolved by github.com/JakeStanger/ironbar@7b220cb2ae

Apologies for the delay.

<!-- gh-comment-id:2891256203 --> @JakeStanger commented on GitHub (May 19, 2025): Resolved by https://github.com/JakeStanger/ironbar/commit/7b220cb2ae53c952115cf33237e42d26e8b2f9fb Apologies for the delay.
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#5839
No description provided.