Skip to content

Commit f51c371

Browse files
mapitmanCopilot
andauthored
debian: apply AMD cursor fix on desktop install (#34)
On AMD GPUs with GNOME/Wayland, the hardware cursor plane can be dropped on login or wake, leaving the cursor invisible until the compositor recovers. Setting MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0 in /etc/environment disables atomic KMS in Mutter and prevents this. The fix is only applied when an AMD GPU is detected via lspci and is idempotent (skipped if already present in /etc/environment). Validated with bash scripts/check.sh. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 883bf95 commit f51c371

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

debian/install-desktop-packages

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,15 @@ if command -v gsettings >/dev/null 2>&1; then
110110
gsettings get org.gnome.desktop.wm.preferences button-layout || true
111111
gsettings set org.gnome.desktop.wm.preferences button-layout close,minimize,maximize: || true
112112
fi
113+
114+
# AMD GPU + GNOME/Wayland cursor fix
115+
# Disabling atomic KMS prevents the hardware cursor plane from being dropped
116+
# on login/wake, which causes the cursor to be invisible until the compositor recovers.
117+
if lspci 2>/dev/null | grep -qi 'vga.*amd\|vga.*ati\|3d.*amd\|3d.*ati'; then
118+
if ! grep -q 'MUTTER_DEBUG_ENABLE_ATOMIC_KMS' /etc/environment 2>/dev/null; then
119+
echo 'MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0' | sudo tee -a /etc/environment
120+
echo "Applied AMD cursor fix to /etc/environment (MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0)"
121+
else
122+
echo "AMD cursor fix already present in /etc/environment, skipping."
123+
fi
124+
fi

0 commit comments

Comments
 (0)