[GH-ISSUE #1425] Busy error loop WARN GTK: [Gdk] vkWaitForFences(): The logical or physical device has been lost. (VK_ERROR_DEVICE_LOST) (-4) #7455

Open
opened 2026-05-23 02:54:38 +01:00 by JakeStanger · 3 comments
Owner

Originally created by @randoragon on GitHub (Mar 18, 2026).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1425

Describe the bug
Once a day on average, ironbar falls into some kind of busy error loop. The symptoms are 100% CPU usage and excessive logging of the following warning:

WARN GTK: [Gdk] vkWaitForFences(): The logical or physical device has been lost. (VK_ERROR_DEVICE_LOST) (-4)

It goes away when I kill ironbar and restart it. Sometimes it comes back after a few hours. I presume there is an error loop without sleeping or some kind of timeout mechanism that's the cause.

To reproduce
Steps to reproduce the behavior:

  1. Start ironbar and leave it running for some hours.
  2. Notice high CPU usage.

Expected behavior
Ironbar should not use 100% CPU and pollute the disk with gigabytes of repetitive logs.

System information:

  • Distro: NixOS 26.05 (Linux 6.18.16)
  • Compositor: Sway
  • Ironbar version: 0.18.0

Configuration

Config
let {
	$pad = {
		type = "label"
		label = "  "
	}

	$sep = {
		type = "label"
		label = " | "
	}

	$sway_workspace = {
		type = "workspaces"
		name_map.11:w = ""
		name_map.12:e = ""
		name_map.13:d = ""
		name_map.14:n = ""
		name_map.15:m = ""
	}

	$sway_mode = {
		type = "bindmode"
	}

	$focused = {
		type = "focused"
		icon_size = 16
	}

	$volume = {
		type = "volume"
		format = "{icon} {percentage}"
		max_volume = 100
		icons.volume_high = ">"
		icons.volume_medium = ">"
		icons.volume_low = ">"
		icons.muted = "X"
		on_click_right = "qpwgraph"
	}

	$storage = {
		type = "script"
		cmd = "$env_XDG_CONFIG_HOME/ironbar/scripts/storage"
		mode = "watch"
	}

	$gpg_expire = {
		type = "script"
		cmd = "$env_XDG_CONFIG_HOME/ironbar/scripts/gpg-expire"
		mode = "watch"
	}

	$clock = {
		type = "clock"
		format = "%a %m/%d  %T  "
		on_click_right = "foot -a floatme sh -c 'cal -3 --color=always | less -R'"
	}

	$battery = {
		type = "script"
		cmd = "$env_XDG_CONFIG_HOME/ironbar/scripts/battery"
		mode = "watch"
	}
}
	in {
	name = "mybar"
	layer = "top"
	position = "top"
	anchor_to_edges = true
	height = 20
	icon_theme = "Kanagawa-BL"

	start = [ $pad $sway_workspace $sway_mode ]
	center = [ $focused ]
	end = [ $volume $sep $storage $sep $gpg_expire $sep $clock $battery $pad ]
}
Styles
* {
	font-family: "Liberation Sans", "Font Awesome 7 Brands", "Font Awesome 7 Free";
	font-size: 13px;
	border: none;
	margin: 0px;
	padding: 0px;
}

.background {
	background-color: #1d1d29dd;
}

.workspaces .item.urgent {
	background-color: red;
}

.workspaces .item.focused {
	color: white;
	background-color: #605f54;
}

.bindmode {
	font-weight: bold;
	padding: 0px 8px;
	corner-radius: 8px;
	color: white;
	background-color: red;
}
battery
#!/bin/sh -e

notif_id=82147924
tmpf="$(mktemp --tmpdir "battery.XXXXX")"
trap 'rm -f -- "$tmpf"' INT EXIT QUIT TERM
echo 100 >"$tmpf"

while true; do
    for path in /sys/class/power_supply/BAT?; do
        [ ! -d "$path" ] && return

        case "$(cat -- "$path/status")" in
            Charging) printf '^' ;;
            Discharging) printf 'v' ;;
            *) printf '*' ;;
        esac

        perc=$(($(cat -- "$path/capacity")))
        perc_prev=$(($(cat -- "$tmpf")))
        [ -z "$perc_prev" ] && perc_prev=100 || perc_prev=$((perc_prev))
        [ -n "$perc" ] && {
            echo "$perc%"
            if [ $perc -le 15 ] && [ $perc_prev -gt 15 ]; then
                notify-send -r $notif_id -i battery -u critical "Battery Low [$perc%]"
            elif [ $perc -le 5 ] && [ $perc_prev -gt $perc ]; then
                notify-send -r $notif_id -i battery -u critical "Battery Low [$perc%]"
            fi
            echo $perc >"$tmpf"
        }

        break  # Only care about the first battery, if any
    done
    sleep 10
done
gpg-expire
#!/bin/sh -e

while true; do
    epoch_expire=$(($(gpg -K --with-colons | grep '^\(sec\|ssb\)' | cut -d: -f7 | sort -n | head -n1)))
    epoch_now=$(($(date +%s)))
    if [ $epoch_now -ge $epoch_expire ]; then
        echo EXPIRED
    else
        n_left=$(((epoch_expire - epoch_now) / 3600))
        if [ $n_left -eq 0 ]; then
            echo '<1 hour'
            return
        elif [ $n_left -lt 24 ]; then
            printf '%u hour' "$n_left"
        else
            n_left=$((n_left / 24))
            printf '%u day' "$n_left"
        fi
        [ $n_left -ne 1 ] && printf s
        echo
    fi
    sleep 3600
done
storage
#!/bin/sh -e

while true; do
    rootfs_mountpoint="$(df --output=target /)"
    homefs_mountpoint="$(df --output=target /home)"
    rootfs=$((1024 * $(df --output=avail / | tail -n1)))
    homefs=$((1024 * $(df --output=avail /home | tail -n1)))

    printf '/ %s' \
        "$(numfmt --to iec --format %.1f "$rootfs")"

    if [ "$rootfs_mountpoint" != "$homefs_mountpoint" ]; then
        printf '  ~ %s' \
            "$(numfmt --to iec --format %.1f "$homefs")"
    fi
    echo
    sleep 10
done
Originally created by @randoragon on GitHub (Mar 18, 2026). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1425 **Describe the bug** Once a day on average, ironbar falls into some kind of busy error loop. The symptoms are 100% CPU usage and excessive logging of the following warning: ``` WARN GTK: [Gdk] vkWaitForFences(): The logical or physical device has been lost. (VK_ERROR_DEVICE_LOST) (-4) ``` It goes away when I kill ironbar and restart it. Sometimes it comes back after a few hours. I presume there is an error loop without sleeping or some kind of timeout mechanism that's the cause. **To reproduce** Steps to reproduce the behavior: 1. Start ironbar and leave it running for some hours. 2. Notice high CPU usage. **Expected behavior** Ironbar should not use 100% CPU and pollute the disk with gigabytes of repetitive logs. **System information:** - Distro: NixOS 26.05 (Linux 6.18.16) - Compositor: Sway - Ironbar version: 0.18.0 **Configuration** <details><summary>Config</summary> ```corn let { $pad = { type = "label" label = " " } $sep = { type = "label" label = " | " } $sway_workspace = { type = "workspaces" name_map.11:w = "" name_map.12:e = "" name_map.13:d = "" name_map.14:n = "" name_map.15:m = "" } $sway_mode = { type = "bindmode" } $focused = { type = "focused" icon_size = 16 } $volume = { type = "volume" format = "{icon} {percentage}" max_volume = 100 icons.volume_high = ">" icons.volume_medium = ">" icons.volume_low = ">" icons.muted = "X" on_click_right = "qpwgraph" } $storage = { type = "script" cmd = "$env_XDG_CONFIG_HOME/ironbar/scripts/storage" mode = "watch" } $gpg_expire = { type = "script" cmd = "$env_XDG_CONFIG_HOME/ironbar/scripts/gpg-expire" mode = "watch" } $clock = { type = "clock" format = "%a %m/%d %T " on_click_right = "foot -a floatme sh -c 'cal -3 --color=always | less -R'" } $battery = { type = "script" cmd = "$env_XDG_CONFIG_HOME/ironbar/scripts/battery" mode = "watch" } } in { name = "mybar" layer = "top" position = "top" anchor_to_edges = true height = 20 icon_theme = "Kanagawa-BL" start = [ $pad $sway_workspace $sway_mode ] center = [ $focused ] end = [ $volume $sep $storage $sep $gpg_expire $sep $clock $battery $pad ] } ``` </details> <details><summary>Styles</summary> ```css * { font-family: "Liberation Sans", "Font Awesome 7 Brands", "Font Awesome 7 Free"; font-size: 13px; border: none; margin: 0px; padding: 0px; } .background { background-color: #1d1d29dd; } .workspaces .item.urgent { background-color: red; } .workspaces .item.focused { color: white; background-color: #605f54; } .bindmode { font-weight: bold; padding: 0px 8px; corner-radius: 8px; color: white; background-color: red; } ``` </details> <details><summary>battery</summary> ```sh #!/bin/sh -e notif_id=82147924 tmpf="$(mktemp --tmpdir "battery.XXXXX")" trap 'rm -f -- "$tmpf"' INT EXIT QUIT TERM echo 100 >"$tmpf" while true; do for path in /sys/class/power_supply/BAT?; do [ ! -d "$path" ] && return case "$(cat -- "$path/status")" in Charging) printf '^' ;; Discharging) printf 'v' ;; *) printf '*' ;; esac perc=$(($(cat -- "$path/capacity"))) perc_prev=$(($(cat -- "$tmpf"))) [ -z "$perc_prev" ] && perc_prev=100 || perc_prev=$((perc_prev)) [ -n "$perc" ] && { echo "$perc%" if [ $perc -le 15 ] && [ $perc_prev -gt 15 ]; then notify-send -r $notif_id -i battery -u critical "Battery Low [$perc%]" elif [ $perc -le 5 ] && [ $perc_prev -gt $perc ]; then notify-send -r $notif_id -i battery -u critical "Battery Low [$perc%]" fi echo $perc >"$tmpf" } break # Only care about the first battery, if any done sleep 10 done ``` </details> <details><summary>gpg-expire</summary> ```sh #!/bin/sh -e while true; do epoch_expire=$(($(gpg -K --with-colons | grep '^\(sec\|ssb\)' | cut -d: -f7 | sort -n | head -n1))) epoch_now=$(($(date +%s))) if [ $epoch_now -ge $epoch_expire ]; then echo EXPIRED else n_left=$(((epoch_expire - epoch_now) / 3600)) if [ $n_left -eq 0 ]; then echo '<1 hour' return elif [ $n_left -lt 24 ]; then printf '%u hour' "$n_left" else n_left=$((n_left / 24)) printf '%u day' "$n_left" fi [ $n_left -ne 1 ] && printf s echo fi sleep 3600 done ``` </details> <details><summary>storage</summary> ```sh #!/bin/sh -e while true; do rootfs_mountpoint="$(df --output=target /)" homefs_mountpoint="$(df --output=target /home)" rootfs=$((1024 * $(df --output=avail / | tail -n1))) homefs=$((1024 * $(df --output=avail /home | tail -n1))) printf '/ %s' \ "$(numfmt --to iec --format %.1f "$rootfs")" if [ "$rootfs_mountpoint" != "$homefs_mountpoint" ]; then printf ' ~ %s' \ "$(numfmt --to iec --format %.1f "$homefs")" fi echo sleep 10 done ``` </details>
Author
Owner

@randoragon commented on GitHub (Mar 18, 2026):

Since the problem is related to Vulkan, it could be relevant information that I'm running an NVIDIA GPU.

<!-- gh-comment-id:4082986913 --> @randoragon commented on GitHub (Mar 18, 2026): Since the problem is related to Vulkan, it could be relevant information that I'm running an NVIDIA GPU.
Author
Owner

@JakeStanger commented on GitHub (Mar 28, 2026):

I've not seen this myself so hard to know exactly what, but I suspect it is a compositor issue (esp since Sway doesn't support NVidia).

Possibly related: #1400

<!-- gh-comment-id:4148178555 --> @JakeStanger commented on GitHub (Mar 28, 2026): I've not seen this myself so hard to know exactly what, but I suspect it is a compositor issue (esp since Sway doesn't support NVidia). Possibly related: #1400
Author
Owner

@CameronBarnes commented on GitHub (Apr 23, 2026):

I believe I saw this error myself today. I ssh'd into my system remotely and noticed ironbar was using 100% CPU. Currently I'm running Hyprland on AMD.
My displays are turned off when the system goes to sleep using hyprland's dispatch for dpms, and I've had other issues with ironbar not behaving correctly when monitors are turned on and off so this may be related.
I unfortunately dont have any logs to share due to the way I've got hyprland starting ironbar, I'll change my config to make sure these logs are captured in future.

<!-- gh-comment-id:4309094958 --> @CameronBarnes commented on GitHub (Apr 23, 2026): I believe I saw this error myself today. I ssh'd into my system remotely and noticed ironbar was using 100% CPU. Currently I'm running Hyprland on AMD. My displays are turned off when the system goes to sleep using hyprland's dispatch for dpms, and I've had other issues with ironbar not behaving correctly when monitors are turned on and off so this may be related. I unfortunately dont have any logs to share due to the way I've got hyprland starting ironbar, I'll change my config to make sure these logs are captured in future.
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#7455
No description provided.