From 50037030b98fe0d52b267fab91407e322b256213 Mon Sep 17 00:00:00 2001 From: Kitlith Date: Mon, 26 May 2025 00:56:51 +0000 Subject: [PATCH 01/12] Document what I did on Asahi Linux This... isn't really a true guide. I'm documenting what I did so that it doesn't get lost elsewhere. I did all my testing with this with a dummy monado profile, but it would likely be *much* more useful to try this with wivrn and a wireless headset, and I may try to arrange circumstances where I can test it. --- content/Asahi_Linux.md | 80 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 content/Asahi_Linux.md diff --git a/content/Asahi_Linux.md b/content/Asahi_Linux.md new file mode 100644 index 0000000..cdb40a6 --- /dev/null +++ b/content/Asahi_Linux.md @@ -0,0 +1,80 @@ +--- +title: Asahi Linux +--- + +# Asahi Linux + +*AKA: Fedora on aarch64 with extra steps* + +## Envision + +Fedora has the `envision` package, as well as the `envision-monado` and `envision-wivrn` metapackages which grab the necessary dependencies for building monado and wivrn, respectively. +This *will not* be the most up-to-date with upstream envision, but seeing as Envision doesn't currently build aarch64 AppImages, this is the easiest way to build custom commits of monado/wivrn/opencomposite/xrizer. + +## Multiarch + +Depending on what openxr applications you are planning on running, you may need multiple builds of the same component, but for different architectures. +I will refer to the components as monado and opencomposite going forward, but the same information holds for wivrn and xrizer. + +Here's how I created an environment that can run both aarch64 openxr/openvr applications, and x86_64 openxr/openvr applications: + +I started by using envision on an aarch64 machine and an x86_64 machine, building the same profile on the same commits. +Each prefix (containing monado) was copied from `~/.local/share/envision/prefixes/{profile id}/` to a directory on my Asahi Linux install. +(In my case, `~/multiarch_monado/monado-x86_64-prefix/` and `~/multiarch_monado/monado-aarch64-prefix/`.) +The two instances of OpenComposite (located at `~/.local/share/envision/{profile id}/OpenComposite/build`) should be merged into a single directory. +(In my case, `~/multiarch_monado/opencomposite`.) +The x86_64 build of OpenComposite should contribute `bin/linux64/vrclient.so`, while the aarch64 build of OpenComposite should contribute `bin/linuxarm64/vrclient.so`. +(If you are following along using an OpenComposite commit that pre-dates , +or an xrizer commit that pre-dates , +you should rename the `bin/linux64` folder from the aarch64 build to `bin/linuxarm64`. +Or you can choose to ignore the aarch64 build entirely, since Steam games don't currently require it.) + +Runtimes that have been copied from another machine should probably be setcap'd: `sudo setcap CAP_SYS_NICE=eip monado-service` + +To be able to run openxr applications, we need to create the symlinks `active_runtime.x86_64.json` and `active_runtime.aarch64.json` in `~/.config/openxr/1/`. +On my machine, this looks like: +```sh +ln -s ~/multiarch_monado/monado-aarch64-prefix/share/openxr/1/openxr_monado.json ~/.config/openxr/1/active_runtime.aarch64.json +ln -s ~/multiarch_monado/monado-x86_64-prefix/share/openxr/1/openxr_monado.json ~/.config/openxr/1/active_runtime.x86_64.json +``` + +To be able to run openvr applications, we need to create `~/.config/openvr/openvrpaths.vrpath`. +This is overridden when you start steam in some cases, so make sure you keep an extra copy handy to re-override it. +On my machine, the contents of `openvrpaths.vrpath` is as follows: +``` +{ + "jsonid": "vrpathreg", + "runtime": [ + "/home/kitlith/multiarch_monado/opencomposite" + ], + "version": 1 +} +``` + +## Steam Games under muvm + +What worked for me was running `monado-service` manually, with all the environment variables that envision uses, and manually setting up environment variables for steam launch arguments. +On my machine, the launch arguments look like: `PRESSURE_VESSEL_FILESYSTEMS_RW=/run/user/1000/monado_comp_ipc XR_RUNTIME_JSON=~/.config/openxr/1/active_runtime.x86_64.json %command%` +There is some extra complication caused my muvm putting its `XDG_RUNTIME_DIR` in a weird spot interfering with monado's ability to connect to itself. +Therefore, my reccomended launch order is as follows: + +Launch steam from inside a terminal (so that you can see logs when things inevitably work incorrectly): +```sh +steam +``` + +Lanuch monado-service: +```sh +muvm -it -- bash +``` + +```sh +mkdir -p /run/user/1000/ +chmod 700 /run/user/1000/ +# setup the rest of the environment variables, ensuring XRT_DEBUG_UI is *not* enabled. +XDG_RUNTIME_DIR=/run/user/1000/ ./monado-service +``` + +Ensure that `openvrpaths.vrpath` has the correct contents and hasn't been overwritten by steam. + +Launch a game. \ No newline at end of file From e1d8b09df4071d8c8e5ccb2517d341a22b88a10f Mon Sep 17 00:00:00 2001 From: Kitlith Date: Mon, 26 May 2025 04:49:54 +0000 Subject: [PATCH 02/12] Add information about WiVRn to Asahi Linux doc More information, now that I've setup a test environment for WiVRn. --- content/Asahi_Linux.md | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/content/Asahi_Linux.md b/content/Asahi_Linux.md index cdb40a6..2ba3fb3 100644 --- a/content/Asahi_Linux.md +++ b/content/Asahi_Linux.md @@ -58,11 +58,6 @@ On my machine, the launch arguments look like: `PRESSURE_VESSEL_FILESYSTEMS_RW=/ There is some extra complication caused my muvm putting its `XDG_RUNTIME_DIR` in a weird spot interfering with monado's ability to connect to itself. Therefore, my reccomended launch order is as follows: -Launch steam from inside a terminal (so that you can see logs when things inevitably work incorrectly): -```sh -steam -``` - Lanuch monado-service: ```sh muvm -it -- bash @@ -75,6 +70,33 @@ chmod 700 /run/user/1000/ XDG_RUNTIME_DIR=/run/user/1000/ ./monado-service ``` +Launch Steam. + +Optionally, `tail -f ~/.steam/steam/logs/console-linux.txt` so you can see errors when a game fails to do the correct thing. + Ensure that `openvrpaths.vrpath` has the correct contents and hasn't been overwritten by steam. -Launch a game. \ No newline at end of file +Launch a game. + +## wivrn + +Due to , the terminal that you're running WiVRn within *must* be the one that's starting the VM. +Therefore, you should start wivrn before you start steam. + +There are also some extra considerations, such as the avahi daemon not being visible within the VM. + +Here's what I did that worked: + +```sh +muvm -it -p 9757/udp -p 9759 -- bash +``` + +```sh +mkdir -p /run/user/1000/ +chmod 700 /run/user/1000/ +# setup the rest of the environment variables, ensuring XRT_DEBUG_UI is *not* enabled. +XDG_RUNTIME_DIR=/run/user/1000/ ./wivrn-server --no-publish-service --no-manage-active-runtime +``` + +On my machines, for some reason, WiVRn produced different commit hashes when applying patches, even though the base monado commit and wivrn commit were the same. +If this happens to you, you can workaround it by adding `IPC_IGNORE_VERSION=1` to your steam launch arguments, *but you should verify that everything was built off of the same commit first.* \ No newline at end of file From 735f35246f50aa9367c2fb54ff0ab8ca0d575180 Mon Sep 17 00:00:00 2001 From: Kitlith Date: Thu, 29 May 2025 15:30:36 -0700 Subject: [PATCH 03/12] Update 2 files - /content/Asahi_Linux.md - /content/docs/distros/Asahi_Linux.md --- content/{ => docs/distros}/Asahi_Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename content/{ => docs/distros}/Asahi_Linux.md (100%) diff --git a/content/Asahi_Linux.md b/content/docs/distros/Asahi_Linux.md similarity index 100% rename from content/Asahi_Linux.md rename to content/docs/distros/Asahi_Linux.md From 07777855ffd5637c3d4e99e6967f080aa3517890 Mon Sep 17 00:00:00 2001 From: Kitlith Date: Thu, 29 May 2025 16:13:07 -0700 Subject: [PATCH 04/12] Update file Asahi_Linux.md --- content/docs/distros/Asahi_Linux.md | 75 ++++++++++++++--------------- 1 file changed, 36 insertions(+), 39 deletions(-) diff --git a/content/docs/distros/Asahi_Linux.md b/content/docs/distros/Asahi_Linux.md index 2ba3fb3..180a69a 100644 --- a/content/docs/distros/Asahi_Linux.md +++ b/content/docs/distros/Asahi_Linux.md @@ -14,48 +14,37 @@ This *will not* be the most up-to-date with upstream envision, but seeing as Env ## Multiarch Depending on what openxr applications you are planning on running, you may need multiple builds of the same component, but for different architectures. -I will refer to the components as monado and opencomposite going forward, but the same information holds for wivrn and xrizer. +You can acquire these builds in multiple ways, such as cross-compiling, or gathering builds from multiple machines. -Here's how I created an environment that can run both aarch64 openxr/openvr applications, and x86_64 openxr/openvr applications: +A repo ([vr-multiarch-build]) for cross-compiling these components has been thrown together to make things easy. +Some sample usage: -I started by using envision on an aarch64 machine and an x86_64 machine, building the same profile on the same commits. -Each prefix (containing monado) was copied from `~/.local/share/envision/prefixes/{profile id}/` to a directory on my Asahi Linux install. -(In my case, `~/multiarch_monado/monado-x86_64-prefix/` and `~/multiarch_monado/monado-aarch64-prefix/`.) -The two instances of OpenComposite (located at `~/.local/share/envision/{profile id}/OpenComposite/build`) should be merged into a single directory. -(In my case, `~/multiarch_monado/opencomposite`.) -The x86_64 build of OpenComposite should contribute `bin/linux64/vrclient.so`, while the aarch64 build of OpenComposite should contribute `bin/linuxarm64/vrclient.so`. -(If you are following along using an OpenComposite commit that pre-dates , -or an xrizer commit that pre-dates , -you should rename the `bin/linux64` folder from the aarch64 build to `bin/linuxarm64`. -Or you can choose to ignore the aarch64 build entirely, since Steam games don't currently require it.) - -Runtimes that have been copied from another machine should probably be setcap'd: `sudo setcap CAP_SYS_NICE=eip monado-service` - -To be able to run openxr applications, we need to create the symlinks `active_runtime.x86_64.json` and `active_runtime.aarch64.json` in `~/.config/openxr/1/`. -On my machine, this looks like: ```sh -ln -s ~/multiarch_monado/monado-aarch64-prefix/share/openxr/1/openxr_monado.json ~/.config/openxr/1/active_runtime.aarch64.json -ln -s ~/multiarch_monado/monado-x86_64-prefix/share/openxr/1/openxr_monado.json ~/.config/openxr/1/active_runtime.x86_64.json +git clone https://gitlab.com/lvra/vr-multiarch-build +cd vr-multiarch-build +# `./setup_wivrn.sh` and `./setup_xrizer.sh` also exist, depending on what you need. +./setup_monado.sh && ./setup_opencomposite.sh +sudo ./setcap.sh + +# you can now start monado by running prefixes/monado-aarch64/bin/monado-service ``` -To be able to run openvr applications, we need to create `~/.config/openvr/openvrpaths.vrpath`. -This is overridden when you start steam in some cases, so make sure you keep an extra copy handy to re-override it. -On my machine, the contents of `openvrpaths.vrpath` is as follows: -``` -{ - "jsonid": "vrpathreg", - "runtime": [ - "/home/kitlith/multiarch_monado/opencomposite" - ], - "version": 1 -} +When you want to update a component, you should manually pull the git repos, then rerun the setup scripts. For example: + +```sh +cd vr-multiarch-build +git pull # update the build repository +git -C monado pull +git -C OpenComposite pull +./setup_monado.sh && ./setup_opencomposite.sh +sudo ./setcap.sh ``` ## Steam Games under muvm What worked for me was running `monado-service` manually, with all the environment variables that envision uses, and manually setting up environment variables for steam launch arguments. -On my machine, the launch arguments look like: `PRESSURE_VESSEL_FILESYSTEMS_RW=/run/user/1000/monado_comp_ipc XR_RUNTIME_JSON=~/.config/openxr/1/active_runtime.x86_64.json %command%` -There is some extra complication caused my muvm putting its `XDG_RUNTIME_DIR` in a weird spot interfering with monado's ability to connect to itself. +On my machine, the launch arguments look like: `XR_RUNTIME_JSON=~/.config/openxr/1/active_runtime.x86_64.json PRESSURE_VESSEL_FILESYSTEMS_RW=/run/user/1000/wivrn/comp_ipc:/run/user/1000/monado_comp_ipc %command%` +There are some extra complications caused by muvm putting its `XDG_RUNTIME_DIR` in a weird spot interfering with monado's ability to connect to itself. Therefore, my reccomended launch order is as follows: Lanuch monado-service: @@ -66,15 +55,18 @@ muvm -it -- bash ```sh mkdir -p /run/user/1000/ chmod 700 /run/user/1000/ +ln -s $XDG_RUNTIME_DIR/monado_comp_ipc /run/user/1000/ # setup the rest of the environment variables, ensuring XRT_DEBUG_UI is *not* enabled. -XDG_RUNTIME_DIR=/run/user/1000/ ./monado-service +./monado-service ``` Launch Steam. +Due to a [bug](https://pagure.io/fedora-asahi/steam/issue/18) in the steam launcher wrapper on asahi, the "Launching Steam" window will not stick around, but Steam *is* still launching. +If you get a message from OpenComposite complaining that it doesn't support VR Applications of type 6, then you should attempt to re-launch steam, as that will cause Steam to fail to launch. Optionally, `tail -f ~/.steam/steam/logs/console-linux.txt` so you can see errors when a game fails to do the correct thing. -Ensure that `openvrpaths.vrpath` has the correct contents and hasn't been overwritten by steam. +Ensure that `openvrpaths.vrpath` has the correct contents. Launch a game. @@ -83,7 +75,8 @@ Launch a game. Due to , the terminal that you're running WiVRn within *must* be the one that's starting the VM. Therefore, you should start wivrn before you start steam. -There are also some extra considerations, such as the avahi daemon not being visible within the VM. +The avahi daemon is not available inside of muvm, so you should use `--no-publish-service`. +Since I'm managing my active runtimes through [vr-multiarch-build] Here's what I did that worked: @@ -92,11 +85,15 @@ muvm -it -p 9757/udp -p 9759 -- bash ``` ```sh -mkdir -p /run/user/1000/ +mkdir -p /run/user/1000/wivrn/ chmod 700 /run/user/1000/ +ln -s $XDG_RUNTIME_DIR/wivrn/comp_ipc /run/user/1000/wivrn/comp_ipc # setup the rest of the environment variables, ensuring XRT_DEBUG_UI is *not* enabled. -XDG_RUNTIME_DIR=/run/user/1000/ ./wivrn-server --no-publish-service --no-manage-active-runtime +./wivrn-server --no-publish-service --no-manage-active-runtime ``` -On my machines, for some reason, WiVRn produced different commit hashes when applying patches, even though the base monado commit and wivrn commit were the same. -If this happens to you, you can workaround it by adding `IPC_IGNORE_VERSION=1` to your steam launch arguments, *but you should verify that everything was built off of the same commit first.* \ No newline at end of file +If you are using a commit of WiVRn before , the build system *will* produce inconsistent commit hashes for its build of monado. +To work-around this, you can either `git cherry-pick 5130bdeda51c52137f11e0536273f3bfbb2f7f71` onto your wivrn branch, use a newer commit of wivrn, or add `IPC_IGNORE_VERSION=1` to your steam launch arguments. +If you pick the last option, you need to be *extra careful* that you are actually building things off of the same commit of wivrn/monado. + +[vr-multiarch-build]: https://gitlab.com/lvra/vr-multiarch-build \ No newline at end of file From 15e87e2a0a82aba360760ac37a997cfe926f5f5d Mon Sep 17 00:00:00 2001 From: Kitlith Date: Thu, 29 May 2025 16:18:54 -0700 Subject: [PATCH 05/12] Update file Asahi_Linux.md --- content/docs/distros/Asahi_Linux.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/content/docs/distros/Asahi_Linux.md b/content/docs/distros/Asahi_Linux.md index 180a69a..b9e91e9 100644 --- a/content/docs/distros/Asahi_Linux.md +++ b/content/docs/distros/Asahi_Linux.md @@ -9,14 +9,16 @@ title: Asahi Linux ## Envision Fedora has the `envision` package, as well as the `envision-monado` and `envision-wivrn` metapackages which grab the necessary dependencies for building monado and wivrn, respectively. -This *will not* be the most up-to-date with upstream envision, but seeing as Envision doesn't currently build aarch64 AppImages, this is the easiest way to build custom commits of monado/wivrn/opencomposite/xrizer. +This *will not* be the most up-to-date with upstream envision, but seeing as Envision doesn't currently build aarch64 AppImages, this is the easiest way to build custom commits of monado/wivrn/opencomposite/xrizer for arm64, specifically. +If you are looking to use non-native VR applications, or [Steam Games](#steam-games-under-muvm), you should continue on into the [Multiarch](#multiarch) section. ## Multiarch Depending on what openxr applications you are planning on running, you may need multiple builds of the same component, but for different architectures. You can acquire these builds in multiple ways, such as cross-compiling, or gathering builds from multiple machines. -A repo ([vr-multiarch-build]) for cross-compiling these components has been thrown together to make things easy. +A repo ([vr-multiarch-build]) for cross-compiling these components has been thrown together to make things easier. +You will need podman, as well as the typical runtime dependencies. Some sample usage: ```sh @@ -43,7 +45,7 @@ sudo ./setcap.sh ## Steam Games under muvm What worked for me was running `monado-service` manually, with all the environment variables that envision uses, and manually setting up environment variables for steam launch arguments. -On my machine, the launch arguments look like: `XR_RUNTIME_JSON=~/.config/openxr/1/active_runtime.x86_64.json PRESSURE_VESSEL_FILESYSTEMS_RW=/run/user/1000/wivrn/comp_ipc:/run/user/1000/monado_comp_ipc %command%` +On my machine, the steam launch arguments look like: `XR_RUNTIME_JSON=~/.config/openxr/1/active_runtime.x86_64.json PRESSURE_VESSEL_FILESYSTEMS_RW=/run/user/1000/wivrn/comp_ipc:/run/user/1000/monado_comp_ipc %command%` There are some extra complications caused by muvm putting its `XDG_RUNTIME_DIR` in a weird spot interfering with monado's ability to connect to itself. Therefore, my reccomended launch order is as follows: From 861be0fa62ec80c50819bf13a9abe413a3959b7a Mon Sep 17 00:00:00 2001 From: Kitlith Date: Thu, 29 May 2025 21:25:00 -0700 Subject: [PATCH 06/12] fixup! typo --- content/docs/distros/Asahi_Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/distros/Asahi_Linux.md b/content/docs/distros/Asahi_Linux.md index b9e91e9..a149377 100644 --- a/content/docs/distros/Asahi_Linux.md +++ b/content/docs/distros/Asahi_Linux.md @@ -83,7 +83,7 @@ Since I'm managing my active runtimes through [vr-multiarch-build] Here's what I did that worked: ```sh -muvm -it -p 9757/udp -p 9759 -- bash +muvm -it -p 9757/udp -p 9757 -- bash ``` ```sh From 9dbba2c7aec846acd9e373175d2b595b45741edb Mon Sep 17 00:00:00 2001 From: Kitlith Date: Fri, 30 May 2025 14:18:26 -0700 Subject: [PATCH 07/12] setcap'd wivrn-server needs dbus-launch --- content/docs/distros/Asahi_Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/distros/Asahi_Linux.md b/content/docs/distros/Asahi_Linux.md index a149377..9ff6613 100644 --- a/content/docs/distros/Asahi_Linux.md +++ b/content/docs/distros/Asahi_Linux.md @@ -91,7 +91,7 @@ mkdir -p /run/user/1000/wivrn/ chmod 700 /run/user/1000/ ln -s $XDG_RUNTIME_DIR/wivrn/comp_ipc /run/user/1000/wivrn/comp_ipc # setup the rest of the environment variables, ensuring XRT_DEBUG_UI is *not* enabled. -./wivrn-server --no-publish-service --no-manage-active-runtime +dbus-launch ./wivrn-server --no-publish-service --no-manage-active-runtime ``` If you are using a commit of WiVRn before , the build system *will* produce inconsistent commit hashes for its build of monado. From b65bc23b7d3c3eca5cd8c1a17f5341017bfa10e4 Mon Sep 17 00:00:00 2001 From: Kitlith Date: Sun, 1 Jun 2025 18:50:00 -0700 Subject: [PATCH 08/12] Refactor the monado and wivrn sections Additionally, add a workaround for a bug present somewhere in the muvm stack. --- content/docs/distros/Asahi_Linux.md | 76 +++++++++++++++++------------ 1 file changed, 46 insertions(+), 30 deletions(-) diff --git a/content/docs/distros/Asahi_Linux.md b/content/docs/distros/Asahi_Linux.md index 9ff6613..d708ef4 100644 --- a/content/docs/distros/Asahi_Linux.md +++ b/content/docs/distros/Asahi_Linux.md @@ -46,31 +46,46 @@ sudo ./setcap.sh What worked for me was running `monado-service` manually, with all the environment variables that envision uses, and manually setting up environment variables for steam launch arguments. On my machine, the steam launch arguments look like: `XR_RUNTIME_JSON=~/.config/openxr/1/active_runtime.x86_64.json PRESSURE_VESSEL_FILESYSTEMS_RW=/run/user/1000/wivrn/comp_ipc:/run/user/1000/monado_comp_ipc %command%` -There are some extra complications caused by muvm putting its `XDG_RUNTIME_DIR` in a weird spot interfering with monado's ability to connect to itself. -Therefore, my reccomended launch order is as follows: -Lanuch monado-service: +There are some extra complications caused by interactions between muvm and pressure-vessel, you may wish to put the following inside of a script somewhere for now: ```sh -muvm -it -- bash -``` +#!/usr/bin/env bash -```sh -mkdir -p /run/user/1000/ +# I couldn't find a way to make PRESSURE_VESSEL_FILESYSTEMS_RW map one file/directory to another, +# so let's create pressure-vessel's view of XDG_RUNTIME_DIR instead. +# This won't be necessary once pressure-vessel supports passing through openxr runtimes. +mkdir -p /run/user/1000/wivrn/ chmod 700 /run/user/1000/ ln -s $XDG_RUNTIME_DIR/monado_comp_ipc /run/user/1000/ -# setup the rest of the environment variables, ensuring XRT_DEBUG_UI is *not* enabled. -./monado-service +ln -s $XDG_RUNTIME_DIR/wivrn/comp_ipc /run/user/1000/wivrn/ + +# wivrn: Work around https://github.com/AsahiLinux/muvm/issues/178 +ping -c1 8.8.8.8 + +# setup the environment variables for monado or wivrn + +# launch monado or wivrn +# path/to/vr-multiarch-build/prefixes/monado-aarch64/bin/monado-service +# dbus-launch path/to/vr-multiarch-build/prefixes/wivrn-aarch64/wivrn-server --no-publish-service --no-manage-active-runtime ``` -Launch Steam. -Due to a [bug](https://pagure.io/fedora-asahi/steam/issue/18) in the steam launcher wrapper on asahi, the "Launching Steam" window will not stick around, but Steam *is* still launching. -If you get a message from OpenComposite complaining that it doesn't support VR Applications of type 6, then you should attempt to re-launch steam, as that will cause Steam to fail to launch. +For ease, going forward, I will assume that this script is located within the home directory, named `launch_monado.sh`, and has the executable bit set. +Therefore, my reccomended launch order is as follows: -Optionally, `tail -f ~/.steam/steam/logs/console-linux.txt` so you can see errors when a game fails to do the correct thing. +1. Lanuch monado: +```sh +muvm -it -- ~/launch_monado.sh +``` -Ensure that `openvrpaths.vrpath` has the correct contents. +2. Launch Steam. + - Due to a [bug](https://pagure.io/fedora-asahi/steam/issue/18) in the steam launcher wrapper on asahi, the "Launching Steam" window will not stick around, but Steam *is* still launching. + - If you get a message from OpenComposite complaining that it doesn't support VR Applications of type 6, then you should attempt to re-launch steam, as that will cause Steam to fail to launch. -Launch a game. +3. Optionally, `tail -f ~/.steam/steam/logs/console-linux.txt` so you can tell what's going on if a game fails to find the openvr/openxr runtimes. + +4. Ensure that `openvrpaths.vrpath` has the correct contents. + +5. Launch a game. ## wivrn @@ -78,24 +93,25 @@ Due to , the terminal that you're Therefore, you should start wivrn before you start steam. The avahi daemon is not available inside of muvm, so you should use `--no-publish-service`. -Since I'm managing my active runtimes through [vr-multiarch-build] +Since I'm managing my active runtimes through [vr-multiarch-build], I'm using `--no-manage-active-runtime`. -Here's what I did that worked: +If you are using a commit of WiVRn before , the build system *will* produce inconsistent commit hashes for its build of monado across architectures. -```sh -muvm -it -p 9757/udp -p 9757 -- bash -``` +To work around this, you can: +- `git cherry-pick 38b64fe09c27757109f126d91b9a5f4244e01f78` onto your wivrn branch +- use a newer commit of wivrn that includes that commit +- add `IPC_IGNORE_VERSION=1` to your steam launch arguments -```sh -mkdir -p /run/user/1000/wivrn/ -chmod 700 /run/user/1000/ -ln -s $XDG_RUNTIME_DIR/wivrn/comp_ipc /run/user/1000/wivrn/comp_ipc -# setup the rest of the environment variables, ensuring XRT_DEBUG_UI is *not* enabled. -dbus-launch ./wivrn-server --no-publish-service --no-manage-active-runtime -``` - -If you are using a commit of WiVRn before , the build system *will* produce inconsistent commit hashes for its build of monado. -To work-around this, you can either `git cherry-pick 5130bdeda51c52137f11e0536273f3bfbb2f7f71` onto your wivrn branch, use a newer commit of wivrn, or add `IPC_IGNORE_VERSION=1` to your steam launch arguments. If you pick the last option, you need to be *extra careful* that you are actually building things off of the same commit of wivrn/monado. +Assuming a similar script to the one described above, named `launch_wivrn.sh`, my reccomended launch order is as follows: + +1. Launch wivrn: +```sh +muvm -it -p 9757/udp -p 9757 -- ~/launch_wivrn.sh +``` +2. Connect your headset to wivrn. +3. Start steam. +4. etc. + [vr-multiarch-build]: https://gitlab.com/lvra/vr-multiarch-build \ No newline at end of file From e4ccdb9b57b181c5a6dc704f479e05be7725327e Mon Sep 17 00:00:00 2001 From: Kitlith Date: Sun, 1 Jun 2025 18:54:26 -0700 Subject: [PATCH 09/12] fixup! --- content/docs/distros/Asahi_Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/distros/Asahi_Linux.md b/content/docs/distros/Asahi_Linux.md index d708ef4..a3e4d59 100644 --- a/content/docs/distros/Asahi_Linux.md +++ b/content/docs/distros/Asahi_Linux.md @@ -60,7 +60,7 @@ ln -s $XDG_RUNTIME_DIR/monado_comp_ipc /run/user/1000/ ln -s $XDG_RUNTIME_DIR/wivrn/comp_ipc /run/user/1000/wivrn/ # wivrn: Work around https://github.com/AsahiLinux/muvm/issues/178 -ping -c1 8.8.8.8 +ping -c1 8.8.8.8 # setup the environment variables for monado or wivrn @@ -110,7 +110,7 @@ Assuming a similar script to the one described above, named `launch_wivrn.sh`, m ```sh muvm -it -p 9757/udp -p 9757 -- ~/launch_wivrn.sh ``` -2. Connect your headset to wivrn. +2. Connect your headset. 3. Start steam. 4. etc. From 0269da7153bfad00beff951aeb1a0eb7b6a32b43 Mon Sep 17 00:00:00 2001 From: Kitlith Date: Mon, 2 Jun 2025 16:42:03 -0700 Subject: [PATCH 10/12] Add Troubleshooting section This only works with the most current version of asahi mesa right now. --- content/docs/distros/Asahi_Linux.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/content/docs/distros/Asahi_Linux.md b/content/docs/distros/Asahi_Linux.md index a3e4d59..f6be498 100644 --- a/content/docs/distros/Asahi_Linux.md +++ b/content/docs/distros/Asahi_Linux.md @@ -114,4 +114,14 @@ muvm -it -p 9757/udp -p 9757 -- ~/launch_wivrn.sh 3. Start steam. 4. etc. +## Troubleshooting + +### VkPhysicalDevice does not support required extension VK_KHR_external_semaphore + +VK_KHR_external_semaphore support was re-enabled in `Mesa 25.1.0-asahi20250425`. +Ensure that your mesa version is up-to-date, and is a revision that comes after this one. + +Aside: It sounds like the asahi fork of mesa will not be necessary, soon. +However, switching to mainline [breaks virglrenderer]() as of the time of writing. + [vr-multiarch-build]: https://gitlab.com/lvra/vr-multiarch-build \ No newline at end of file From 7db85cf056c6c44b77df34d5c19b7daaba8bcc9a Mon Sep 17 00:00:00 2001 From: Kitlith Date: Mon, 2 Jun 2025 16:42:27 -0700 Subject: [PATCH 11/12] Make wivrn a subsection of steam games --- content/docs/distros/Asahi_Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/distros/Asahi_Linux.md b/content/docs/distros/Asahi_Linux.md index f6be498..a973dff 100644 --- a/content/docs/distros/Asahi_Linux.md +++ b/content/docs/distros/Asahi_Linux.md @@ -87,7 +87,7 @@ muvm -it -- ~/launch_monado.sh 5. Launch a game. -## wivrn +### wivrn Due to , the terminal that you're running WiVRn within *must* be the one that's starting the VM. Therefore, you should start wivrn before you start steam. From 3aaaf07ff0365720a11a616cd09a0e92010c02b3 Mon Sep 17 00:00:00 2001 From: Kitlith Date: Tue, 3 Jun 2025 00:45:53 -0700 Subject: [PATCH 12/12] missing `/bin` for wivrn in launch script Thanks Jayden! --- content/docs/distros/Asahi_Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/distros/Asahi_Linux.md b/content/docs/distros/Asahi_Linux.md index a973dff..f4bc3a5 100644 --- a/content/docs/distros/Asahi_Linux.md +++ b/content/docs/distros/Asahi_Linux.md @@ -66,7 +66,7 @@ ping -c1 8.8.8.8 # launch monado or wivrn # path/to/vr-multiarch-build/prefixes/monado-aarch64/bin/monado-service -# dbus-launch path/to/vr-multiarch-build/prefixes/wivrn-aarch64/wivrn-server --no-publish-service --no-manage-active-runtime +# dbus-launch path/to/vr-multiarch-build/prefixes/wivrn-aarch64/bin/wivrn-server --no-publish-service --no-manage-active-runtime ``` For ease, going forward, I will assume that this script is located within the home directory, named `launch_monado.sh`, and has the executable bit set.