I’ve been trying to get VT switching to work on Hyprland, (and in the process have also tested sway and plasma/kde), but the Ctrl + Alt + F[1-12] binds to switch VTs aren’t working (and never have, as far as I know) on all three WM/DEs.
As far as I can tell, polkit isn’t allowing Wayland compositors to use the org.freedesktop.login1.chvt action on NixOS, which just works on other distros (I tested a fresh cachyos install just to be sure)
pkcheck --action-id org.freedesktop.login1.chvt --process 3600 # Hyprland
polkit\56result=auth_admin_keep
polkit\56retains_authorization_after_challenge=1
Authorization requires authentication and -u wasn't passed.
On other distros this ^ just returns with no message
Enabling logging for polkit as described on the wiki (Polkit - Official NixOS Wiki) gave information that I think might explain why it’s not working- a bunch of properties are null or false.
May 29 13:29:00 corais polkitd[3407]: action=[Action id='org.freedesktop.login1.chvt']
May 29 13:29:00 corais polkitd[3407]: subject=[Subject uid=1000 pid=3600 user='shaun' groups=users,wheel,tty,audio,video,networkmanager,libvirtd,input,pipewire,plugdev,ydotool,gamemode seat=null session=null system_unit=null local=false active=false]
But when I run the same command on the hyprland-start process that started the Hyprland one above:
pkcheck --action-id org.freedesktop.login1.chvt --process 3541 # hyprland-start
[no output, command succeeds]
All of those properties are populated.
May 29 13:39:24 corais polkitd[3407]: action=[Action id='org.freedesktop.login1.chvt']
May 29 13:39:24 corais polkitd[3407]: subject=[Subject uid=1000 pid=3541 user='shaun' groups=users,wheel,tty,audio,video,networkmanager,libvirtd,input,pipewire,plugdev,ydotool,gamemode seat='seat0' session='1' system_unit=null local=true active=true]
I haven’t been able to get confirmation whether other hyprland users on nixos experience the same thing or not. I really hope someone can explain what the problem is and how I can fix it since I’m way beyond my depth trying to debug the issue at this point.