From fffd6bf5b83fdd6750096801b58cb8a53e81ea86 Mon Sep 17 00:00:00 2001 From: rope Date: Thu, 20 Aug 2026 20:07:09 +0100 Subject: [PATCH] shell: gpumean must follow symlinks to find cards --- settings/shell.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/settings/shell.nix b/settings/shell.nix index e8bc240..b62b1b2 100644 --- a/settings/shell.nix +++ b/settings/shell.nix @@ -162,8 +162,10 @@ in set -l secs 10 test (count $argv) -gt 0; and set secs $argv[1] # find, not a glob: an unmatched wildcard is an error in fish and would - # abort the function before the emptiness check below. - set -l cards (find /sys/class/drm -maxdepth 3 -name gpu_busy_percent 2>/dev/null | sort) + # abort the function before the emptiness check below. -L is required — + # /sys/class/drm/cardN is a symlink, so a plain find never descends into + # it and silently reports no GPUs at all. + set -l cards (find -L /sys/class/drm -maxdepth 3 -name gpu_busy_percent 2>/dev/null | sort) if test (count $cards) -eq 0 echo "no gpu_busy_percent found (amdgpu/i915 only — nvidia doesn't expose it)" return 1