Force software cursors on nouveau
Adapt the fix from PR #6161 to Quattro's per-user hardware setup and add coverage for detection, idempotency, and proprietary-driver handling.
This commit is contained in:
committed by
David Heinemeier Hansson
parent
73efa7d926
commit
9030ba870c
@@ -7,6 +7,7 @@ run_logged "$OMARCHY_INSTALL/user/hardware/asus/fix-audio-mixer.sh"
|
||||
run_logged "$OMARCHY_INSTALL/user/hardware/asus/fix-mic.sh"
|
||||
run_logged "$OMARCHY_INSTALL/user/hardware/framework/fix-f13-amd-audio-input.sh"
|
||||
run_logged "$OMARCHY_INSTALL/user/hardware/dell/xps13-text-scaling.sh"
|
||||
run_logged "$OMARCHY_INSTALL/user/hardware/fix-nouveau-cursor.sh"
|
||||
|
||||
run_logged "$OMARCHY_INSTALL/user/default-keyring.sh"
|
||||
run_logged "$OMARCHY_INSTALL/user/mise.sh"
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Disable hardware cursors when the nouveau driver is in use.
|
||||
#
|
||||
# The nouveau DRM driver does not display the hardware cursor plane on many
|
||||
# older NVIDIA GPUs, leaving the mouse pointer invisible under Hyprland.
|
||||
# Skip the fix when the proprietary driver was configured: supported GPUs can
|
||||
# still use nouveau during installation before switching drivers on reboot.
|
||||
nvidia_config="${OMARCHY_NVIDIA_MODPROBE_CONFIG:-/etc/modprobe.d/nvidia.conf}"
|
||||
|
||||
if [[ ! -f $nvidia_config ]] &&
|
||||
omarchy-cmd-present lspci &&
|
||||
LC_ALL=C lspci -k | grep -qi 'Kernel driver in use: nouveau'; then
|
||||
looknfeel="$HOME/.config/hypr/looknfeel.lua"
|
||||
|
||||
if [[ -f $looknfeel ]] && ! grep -q 'no_hardware_cursors' "$looknfeel"; then
|
||||
echo "Detected nouveau driver. Forcing software cursors so the mouse pointer stays visible."
|
||||
|
||||
cat >>"$looknfeel" <<'EOF'
|
||||
|
||||
-- nouveau does not display the hardware cursor plane on many older NVIDIA GPUs,
|
||||
-- leaving the pointer invisible on the physical display. Render it in software.
|
||||
hl.config({
|
||||
cursor = {
|
||||
no_hardware_cursors = true,
|
||||
},
|
||||
})
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user