sway-config-fedora/sddm/sddm-compositor-sway
Aleksei Bavshin ddf31e44d7 sway: fallback to legacy DRM interface on virtio
Some time ago, 'WLR_RENDERER=pixman' stopped working properly on virtio.
Appears that it only affects the atomic KMS and falling back to the
legacy DRM interface was enough to work around.

While legacy is a less tested codepath, I don't see any other ways to
address that :'(
2024-02-03 00:42:32 +00:00

29 lines
748 B
Bash
Executable file

#!/bin/sh
# Add sddm config file to the arguments
set -- --config /etc/sway/sddm-greeter.config "$@"
# Try to use a wrapper script from sway-config-fedora
if [ -x /usr/bin/start-sway ]; then
# shellcheck source=../sway/start-sway
. /usr/bin/start-sway
# unreachable
exit 1
fi
# Set some compatibility variables in case if sway-config-fedora is not present
case $(systemd-detect-virt --vm) in
"none"|"")
;;
"kvm")
# WLR_NO_HARDWARE_CURSORS=1 is not needed with legacy DRM interface
export WLR_RENDERER=pixman
export WLR_DRM_NO_ATOMIC=1
;;
*)
# https://github.com/swaywm/sway/issues/6581
export WLR_NO_HARDWARE_CURSORS=1
;;
esac
exec /usr/bin/sway "$@"