mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 06:15:21 +01:00
[GH-ISSUE #1446] keyboard layout: "error" when new display connected/resume from sleep #4658
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#4658
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jficz on GitHub (Apr 8, 2026).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1446
Describe the bug
Text "error" is displayed instead of the flag icon/layout indicator after one or more of these steps happening (can't reproduce with 100 % consistency) on my laptop until the layout is switched - then the flag appears as expected.
To reproduce
Steps to reproduce the behavior:
Expected behavior
Flag/indicator should be displayed with current layout
System information:
Configuration
Config
Styles
Additional context
The error is shown on all visible bars on all connected displays.
Cannot exactly determine the steps to reproduce. The steps described are the full sequence I think relates to this but I'm not sure if all the steps are needed to reproduce this. There might be some delays between sleep and resume involved, too, or the sleep might not even be relevant. Can't tell, will try to experiment more though it's not so easy as displays X and Y are in different locations and I don't have another display available at either location.
Logs captured after the errror is observed
The
IconPixmaperror repeats ever ~3s and is most likely not relevant (maybe related to home-manager/nix setup). Possibly releated to https://github.com/JakeStanger/ironbar/issues/1335.There is no new entry in the logs after layout switch that fixes the issue.
Screenshots
error shown:

after switching layout:

@JakeStanger commented on GitHub (Apr 13, 2026):
Hm, there's no code anywhere that'd fall back to "error" (in fact, we always display the layout as the compositor returns it). That makes me think it might actually be Hyprland returning the error string.
Could you try querying the layout with
hyprctlwhile the error message shows in Ironbar and see if it shows the right thing or an error there too please?If it doesn't, then I could possibly try and see if I can detect the 'error' string and re-fetch.
@jficz commented on GitHub (Apr 15, 2026):
No, it shows the keymap.
I'd much prefer to figure out where the error is coming from and fix it there if possible. How exactly does the layout plugin detect the layout? Hyprland IPC or something? Can I replicate the query somehow exactly?
@jficz commented on GitHub (Apr 15, 2026):
However, it might be possible that Hyprland does emit an
errorat the moment the plugin queries it, I suppose that happens very soon after resume.Today, it happened just after suspend/resume cycle, with the same display (dis)connected. The display is also a dock if that makes any difference (in fact, so is the other display I used come to think of it).
The exact procedure I did is this:
At step 4 I'm not quite sure about the order but I usually first open the laptop, then power on the ext display.
So if it really is some kind of race condition then
might actually make sense. Though I'd suggest not to check for
errorstring but be more generic - refetch if the result doesn't look like a keymap and definitely emit something to the log. Maybe try a few times and if it doesn't detect the layout eventually, display something like, perhaps, a question mark or some kind of INOP symbol (like╳maybe) with tooltip saying "could not detect keymap/layout", or something along those lines.@jficz commented on GitHub (Apr 16, 2026):
new observation:
errordisplayed after clean boot/start. Restarting ironbar fixed the problem. That's imho a strong indication of a race condition.@jficz commented on GitHub (May 11, 2026):
not sure if this has been addressed in any recent changes but since at least 10 may build (flake) I didn't see the error (yet). To be fair, I haven't done much computering until today so let's consider this report prelim. I'll report back in a few days to confirm/deny.
@JakeStanger commented on GitHub (May 11, 2026):
Certainly not intentionally addressed
@jficz commented on GitHub (May 12, 2026):
spoke too soon, still there :/ sorry for the noise