Draft: VR Mode
(I do not work for Valve, this is done in my free time)
Main issue: #301
Related MRs: !8500
Related Issues: #305
This plugin turns KWin (and KDE) into a 3D VR Desktop. Features:
- Floating windows
- Physical and Virtual screens
- Everything is 3D, even wayland surfaces, window decorations and shadows
- Made for work: Full keyboard control
- Headgaze: no mouse, touchpad or vr controller is required
- Native Qt rendering: direct dmabuf imports.
- Follow Mode
The plugin uses Qt Quick 3D Xr, so a proper OpenXR runtime is needed. I use Monado (Rokid Max, Rayneo Air 4 Pro, HP G2) and WiVRn (Quest 3)
Patched Qt and XWayland are needed for the plugin to work correctly: https://invent.kde.org/lightofmysoul/vr-patches . Most of the patches were already upstreamed, but there are still some patches left. Patches there are for Qt 6.10.2.
NOTE: KWin will not read XR_RUNTIME_JSON env var, So, the json with active OpenXR runtime should be here:
/etc/xdg/openxr/1/active_runtime.json
Also, the plugin is available as: KWin 6.5.5 branch.
To build:
- (optionally) Apply patches for Qt Quick 3D 6.10.2 from here: https://invent.kde.org/lightofmysoul/vr-patches/-/tree/master/qt-6.10.2/qtquick3d
- Build and install Qt Quick 3D Xr (It is part of Qt Quick 3D)
- (optionally) Apply patches for XWayland from here: https://invent.kde.org/lightofmysoul/vr-patches/-/tree/master/xwayland
- Build KWin with the VR plugin.
NOTE: for AR glasses to work with Monado they should be put into non-desktop mode by kernel patch or this issue is solved: #305
There is still a lot of stuff is needed to be done. Some settings (surface thickness, maybe more) are missing. And the code needs to be polished overall.
However, it works and I use it everyday, so I think it is ready for initial review.
