I spoke too soon, the mouse is not working properly with Qubes GUI agent.
The seat * pointer_constraint disable
stops the mouse from spinning but it’s limiting the mouse movement.
Also passing the mouse input using input-proxy seems to only work in Xorg, it’s not working in Wayland so you’ll need to pass the USB mouse to the qube.
Running sway without Qubes GUI agent in the HVM stubdomain window works fine:
Enable debug mode for gaming qube and gaming qube’s template in dom0:
qvm-prefs MyGamingQube debug 1
qvm-prefs MyGamingQubeTemplate debug 1
Increase the gaming qube VRAM for stubdom, the default value didn’t work for 1920x1080x60Hz mode:
Create this file in dom0:
nano /usr/share/qubes/templates/libvirt/xen-user.xml
And add this content to it:
{% extends 'libvirt/xen.xml' %}
{% block devices %}
{{ super() }}
{% if vm.features.get('increased_vram', '0') == '1' -%}
<video>
<model type='vga' vram='32768' heads='1' primary='yes'/>
</video>
{% endif -%}
{% endblock %}
And enable the increased_vram
feature for your gaming qube in dom0:
qvm-feature MyGamingQube increased_vram 1
If you use kernel provided by qube then in gaming qube template add the missing kenel options compared to the kernel provided by dom0, e.g. for debian:
Add this line at the end of the /etc/default/grub
in the template:
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT rd_NO_PLYMOUTH rd.plymouth.enable=0 plymouth.enable=0 apparmor=1 security=apparmor"
And regenerate the GRUB config, e.g. for debian:
sudo update-grub
Plymouth is messing up the HVM console so you need to disable it.
Remove the qubes-gui-agent from the template, e.g. for debian:
sudo apt remove --purge qubes-gui-agent
Shitdown the gaming qube’s template.
Enable debug mode for gaming qube:
Start gaming qube, login as user
user and create a custom sway config:
mkdir -p ~/.config/sway
cp /etc/sway/config ~/.config/sway/
nano ~/.config/sway/config
cat << 'EOF' | tee -a ~/.config/sway/config
output Virtual-1 {
mode 1920x1080@60.000Hz
}
EOF
You can change the display mode from 1920x1080@60.000Hz to another one.
You can check the available display modes by running this command inside a terminal in sway:
swaymsg -t get_outputs
Run sway:
sway --unsupported-gpu
Then run game in the sway.