WIP: Draft: Document what I did on Asahi Linux #120

Draft
Kitlith wants to merge 12 commits from patch-1 into main
Kitlith commented 2025-05-25 20:57:23 -04:00 (Migrated from gitlab.com)

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.

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.
Kitlith commented 2025-05-26 00:32:58 -04:00 (Migrated from gitlab.com)

the file is in the wrong damn place. sigh i'll fix that later.

the file is in the wrong damn place. *sigh* i'll fix that later.
Kitlith commented 2025-05-26 00:49:57 -04:00 (Migrated from gitlab.com)

added 1 commit

  • e1d8b09d - Add information about WiVRn to Asahi Linux doc

Compare with previous version

added 1 commit <ul><li>e1d8b09d - Add information about WiVRn to Asahi Linux doc</li></ul> [Compare with previous version](/lvra/lvra.gitlab.io/-/merge_requests/115/diffs?diff_id=1368883030&start_sha=50037030b98fe0d52b267fab91407e322b256213)
BabbleBones commented 2025-05-26 01:14:57 -04:00 (Migrated from gitlab.com)

Envision is useful as a quick and dirty setup but I am of the mind we should have a reproducible build guide here using cross compile instructions so everything can be built on the aarch64 machine itself.

We will likely end up costing users substantial headache with less straightforward instructions and this can be used by the Fedora maintainers to help upstream this as a binary setup.

Envision also paves the OpenXR and OpenVR manifests. Steam is not responsible for manifest resets back to steamvr after the version.txt was introduced to both XRizer and OpenComposite.

Envision is useful as a quick and dirty setup but I am of the mind we should have a reproducible build guide here using cross compile instructions so everything can be built on the aarch64 machine itself. We will likely end up costing users substantial headache with less straightforward instructions and this can be used by the Fedora maintainers to help upstream this as a binary setup. Envision also paves the OpenXR and OpenVR manifests. Steam is not responsible for manifest resets back to steamvr after the version.txt was introduced to both XRizer and OpenComposite.
BabbleBones commented 2025-05-26 01:19:47 -04:00 (Migrated from gitlab.com)

This will likely not need configuration much longer with pressure vessel getting support for runtime arch and manifest translation https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/merge_requests/813

This will likely not need configuration much longer with pressure vessel getting support for runtime arch and manifest translation https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/merge_requests/813
BabbleBones commented 2025-05-26 01:31:55 -04:00 (Migrated from gitlab.com)

That's worth raising an issue on the WiVRn git and asking what's up here.

That's worth raising an issue on the WiVRn git and asking what's up here.
BabbleBones commented 2025-05-26 01:34:08 -04:00 (Migrated from gitlab.com)

Useful for PoC but I would like reproducible build and crossbuild guide all on the arrch64, too much can go wrong using Envision as a bodge.

Useful for PoC but I would like reproducible build and crossbuild guide all on the arrch64, too much can go wrong using Envision as a bodge.
Kitlith commented 2025-05-26 01:36:15 -04:00 (Migrated from gitlab.com)

That's the eventual plan, yes, but I want to do more investigation into why the commits are different first. It's probably some metadata somewhere.

That's the eventual plan, yes, but I want to do more investigation into *why* the commits are different first. It's probably some metadata somewhere.
BabbleBones commented 2025-05-26 01:36:50 -04:00 (Migrated from gitlab.com)

Make sure to mention this requires suid on the home filesystem or wherever Monado resides to allow caps.

Make sure to mention this requires suid on the home filesystem or wherever Monado resides to allow caps.
BabbleBones commented 2025-05-26 01:38:26 -04:00 (Migrated from gitlab.com)

Worth investigating if after https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/merge_requests/813 is merged and distributed if XR_RUNTIME_JSON will need to be set as a launch option to the specific arch.

Worth investigating if after https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/merge_requests/813 is merged and distributed if XR_RUNTIME_JSON will need to be set as a launch option to the specific arch.
Kitlith commented 2025-05-26 01:40:24 -04:00 (Migrated from gitlab.com)

I guess the way to do it, then, is to build from inside a aarch64 debian docker container, so we can take advantage of debian multiarch to grab the dependencies & cross compile. Reason I was avoiding doing the x86_64 build on my macbook is because Fedora doesn't follow debian multiarch, which would've made installing the x86_64 versions of deps much more annoying.

I guess the way to do it, then, is to build from inside a aarch64 debian docker container, so we can take advantage of debian multiarch to grab the dependencies & cross compile. Reason I was avoiding doing the x86_64 build on my macbook is because Fedora doesn't follow debian multiarch, which would've made installing the x86_64 versions of deps much more annoying.
BabbleBones commented 2025-05-26 01:43:01 -04:00 (Migrated from gitlab.com)

Perhaps we should work with IMRSVJon to further the multiarch packages of opencomposite and wivrn which are already available in repo.

Perhaps we should work with IMRSVJon to further the multiarch packages of opencomposite and wivrn which are already available in repo.
Kitlith commented 2025-05-26 01:44:17 -04:00 (Migrated from gitlab.com)

XR_RUNTIME_JSON may not actually need to be set as it is -- I added it well before I actually finished troubleshooting the other things that were going wrong (i.e. the hacky XDG_RUNTIME_DIR workaround) and then never removed it.

`XR_RUNTIME_JSON` may not actually need to be set as it is -- I added it well before I actually finished troubleshooting the other things that were going wrong (i.e. the hacky `XDG_RUNTIME_DIR` workaround) and then never removed it.
Kitlith commented 2025-05-27 00:06:36 -04:00 (Migrated from gitlab.com)

https://github.com/WiVRn/WiVRn/pull/351 fixes the commit hash reproducibility issue.

https://github.com/WiVRn/WiVRn/pull/351 fixes the commit hash reproducibility issue.
Kitlith commented 2025-05-29 18:30:38 -04:00 (Migrated from gitlab.com)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/lvra/lvra.gitlab.io/-/merge_requests/115/diffs?diff_id=1374093812&start_sha=e1d8b09df4071d8c8e5ccb2517d341a22b88a10f#7b27cb6d3e614789e2181628217cd6989f25839f_59_0)
Kitlith commented 2025-05-29 18:30:39 -04:00 (Migrated from gitlab.com)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/lvra/lvra.gitlab.io/-/merge_requests/115/diffs?diff_id=1374093812&start_sha=e1d8b09df4071d8c8e5ccb2517d341a22b88a10f#7b27cb6d3e614789e2181628217cd6989f25839f_102_0)
Kitlith commented 2025-05-29 18:30:39 -04:00 (Migrated from gitlab.com)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/lvra/lvra.gitlab.io/-/merge_requests/115/diffs?diff_id=1374093812&start_sha=e1d8b09df4071d8c8e5ccb2517d341a22b88a10f#7b27cb6d3e614789e2181628217cd6989f25839f_30_0)
Kitlith commented 2025-05-29 18:30:39 -04:00 (Migrated from gitlab.com)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/lvra/lvra.gitlab.io/-/merge_requests/115/diffs?diff_id=1374093812&start_sha=e1d8b09df4071d8c8e5ccb2517d341a22b88a10f#7b27cb6d3e614789e2181628217cd6989f25839f_32_0)
Kitlith commented 2025-05-29 18:30:40 -04:00 (Migrated from gitlab.com)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/lvra/lvra.gitlab.io/-/merge_requests/115/diffs?diff_id=1374093812&start_sha=e1d8b09df4071d8c8e5ccb2517d341a22b88a10f#7b27cb6d3e614789e2181628217cd6989f25839f_38_0)
Kitlith commented 2025-05-29 18:30:40 -04:00 (Migrated from gitlab.com)

added 1 commit

Compare with previous version

added 1 commit <ul><li>735f3524 - Update 2 files</li></ul> [Compare with previous version](/lvra/lvra.gitlab.io/-/merge_requests/115/diffs?diff_id=1374093812&start_sha=e1d8b09df4071d8c8e5ccb2517d341a22b88a10f)
Kitlith commented 2025-05-29 19:13:10 -04:00 (Migrated from gitlab.com)

added 1 commit

Compare with previous version

added 1 commit <ul><li>07777855 - Update file Asahi_Linux.md</li></ul> [Compare with previous version](/lvra/lvra.gitlab.io/-/merge_requests/115/diffs?diff_id=1374113955&start_sha=735f35246f50aa9367c2fb54ff0ab8ca0d575180)
Kitlith commented 2025-05-29 19:18:56 -04:00 (Migrated from gitlab.com)

added 1 commit

Compare with previous version

added 1 commit <ul><li>15e87e2a - Update file Asahi_Linux.md</li></ul> [Compare with previous version](/lvra/lvra.gitlab.io/-/merge_requests/115/diffs?diff_id=1374116637&start_sha=07777855ffd5637c3d4e99e6967f080aa3517890)
Kitlith commented 2025-05-29 19:21:07 -04:00 (Migrated from gitlab.com)

The bulk of this section has been replaced with a pointer to https://gitlab.com/lvra/vr-multiarch-build and some basic instructions for its use.

The bulk of this section has been replaced with a pointer to https://gitlab.com/lvra/vr-multiarch-build and some basic instructions for its use.
Kitlith commented 2025-05-29 19:33:44 -04:00 (Migrated from gitlab.com)

That is a good question, since the PR doesn't touch anything to do with loading the runtime jsons, and when I re-checked it just now, it didn't work without it. (new question: does it check active_runtime.json and not active_runtime.<arch>.json? might indicate that an older version of the openxr loader that predates the addition of active_runtime.<arch>.json.)

That is a good question, since the PR doesn't touch anything to do with loading the runtime jsons, and when I re-checked it just now, it didn't work without it. (new question: does it check `active_runtime.json` and not `active_runtime.<arch>.json`? might indicate that an older version of the openxr loader that predates the addition of `active_runtime.<arch>.json`.)
Kitlith commented 2025-05-29 19:34:23 -04:00 (Migrated from gitlab.com)

It'll just be replaced by PRESSURE_VESSEL_IMPORT_OPENXR_1_RUNTIMES=1, since it looks like it's disabled by default.

It'll just be replaced by `PRESSURE_VESSEL_IMPORT_OPENXR_1_RUNTIMES=1`, since it looks like it's disabled by default.
Kitlith commented 2025-05-29 19:42:23 -04:00 (Migrated from gitlab.com)

active_runtime.json works, so valve needs to update the version of the openxr loader included with the steam runtime, most likely.

I need to take a closer look at the load order and see if I can make active_runtime.json a symlink that matches active_runtime.x86_64.json without screwing up native aarch64 applications.

`active_runtime.json` works, so valve needs to update the version of the openxr loader included with the steam runtime, most likely. I need to take a closer look at the load order and see if I can make `active_runtime.json` a symlink that matches `active_runtime.x86_64.json` without screwing up native aarch64 applications.
Kitlith commented 2025-05-29 19:43:46 -04:00 (Migrated from gitlab.com)

Has been updated to mention the commit that fixes it, and using the ignore version override only as a last resort. Feel free to poke me if you think it shouldn't be mentioned at all.

Has been updated to mention the commit that fixes it, and using the ignore version override only as a last resort. Feel free to poke me if you think it shouldn't be mentioned at all.
Kitlith commented 2025-05-29 19:52:26 -04:00 (Migrated from gitlab.com)

oops, i missed that runtime.c was collapsed, which is where all the manifest handling is located.

https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/merge_requests/813/diffs#ed2babf7392cb0d43172fc65e09dadc58f4df19f_4863_4904 acknowledges the issue at least. It might do the right thing, I can't quite tell. Perhaps I should try it and see ™️.

oops, i missed that runtime.c was collapsed, which is where all the manifest handling is located. https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/merge_requests/813/diffs#ed2babf7392cb0d43172fc65e09dadc58f4df19f_4863_4904 acknowledges the issue at least. It *might* do the right thing, I can't quite tell. Perhaps I should try it and see :tm:.
Kitlith commented 2025-05-29 21:48:14 -04:00 (Migrated from gitlab.com)

Current observations:

wivrn didn't work too well in my test with the PC client on my desktop. I got it working in Basis, but it was definitely choppy. There's many possible reasons for this (maybe my WiFi isn't good enough for this), but I know for sure that I'm lacking a driver for hardware video encoding, and that's probably not helping.

monado dummy driver seems to run quite nicely, though I haven't found a configuration where it's useful yet. Qwerty doesn't work, since the debug UI crashes when a game connects to monado (even if I run a nested weston instance under xwayland), but disabling Qwerty gets me a gentle swaying movement, and that has looked smooth as butter on the initial screens of Beat Saber, Basis, The Lab, Pistol Whip, and Droid Repair Bay. This doesn't say that much, but compared to my initial experience with wivrn, it's promising.

Current observations: wivrn didn't work too well in my test with the PC client on my desktop. I got it working in Basis, but it was definitely choppy. There's many possible reasons for this (maybe my WiFi isn't good enough for this), but I know for sure that I'm lacking a driver for hardware video encoding, and that's probably not helping. monado dummy driver seems to run quite nicely, though I haven't found a configuration where it's *useful* yet. Qwerty doesn't work, since the debug UI crashes when a game connects to monado (even if I run a nested weston instance under xwayland), but disabling Qwerty gets me a gentle swaying movement, and *that* has looked smooth as butter on the initial screens of Beat Saber, Basis, The Lab, Pistol Whip, and Droid Repair Bay. This doesn't say that much, but compared to my initial experience with wivrn, it's promising.
Kitlith commented 2025-05-30 00:25:01 -04:00 (Migrated from gitlab.com)

added 1 commit

Compare with previous version

added 1 commit <ul><li>861be0fa - fixup! typo</li></ul> [Compare with previous version](/lvra/lvra.gitlab.io/-/merge_requests/115/diffs?diff_id=1374228362&start_sha=15e87e2a0a82aba360760ac37a997cfe926f5f5d)
Kitlith commented 2025-05-30 17:18:28 -04:00 (Migrated from gitlab.com)

added 1 commit

  • 9dbba2c7 - setcap'd wivrn-server needs dbus-launch

Compare with previous version

added 1 commit <ul><li>9dbba2c7 - setcap&#39;d wivrn-server needs dbus-launch</li></ul> [Compare with previous version](/lvra/lvra.gitlab.io/-/merge_requests/115/diffs?diff_id=1375206020&start_sha=861be0fa62ec80c50819bf13a9abe413a3959b7a)
Kitlith commented 2025-05-30 17:28:56 -04:00 (Migrated from gitlab.com)

Noticed that I didn't appear to have x264 installed for wivrn, so I grabbed it and re-checked. Didn't seem to help that much.

I've also been experiencing an issue where muvm/passt isn't consistently actually connecting forwarded ports, which is annoying/concerning. I don't have a good way to make this consistently work at the moment. Maybe it'd be worth doing the port forwarding through ssh tunneling or something instead of through passt, but I'll need to wait for it to start breaking again before I can confirm if that'd be a valid workaround. EDIT: I was running into https://github.com/AsahiLinux/muvm/issues/178 and I have a workaround for it that I'm adding into documentation.

Noticed that I didn't appear to have x264 installed for wivrn, so I grabbed it and re-checked. Didn't seem to help that much. ~~I've also been experiencing an issue where muvm/passt isn't consistently actually connecting forwarded ports, which is annoying/concerning. I don't have a good way to make this consistently work at the moment. Maybe it'd be worth doing the port forwarding through ssh tunneling or something instead of through passt, but I'll need to wait for it to start breaking again before I can confirm if that'd be a valid workaround.~~ EDIT: I was running into https://github.com/AsahiLinux/muvm/issues/178 and I have a workaround for it that I'm adding into documentation.
Kitlith commented 2025-06-01 20:46:34 -04:00 (Migrated from gitlab.com)

Last comment on this: Newer versions of the openxr loader check the arch specific json before the undecorated json. So you can set a provide all the arch specific paths, and then add a ln -sfn ./active_runtime.x86_64.json ~/.config/openxr/1/active_runtime.json to, in theory, redirect older versions of the openxr loader to the architecture you expect it to need.

Last comment on this: Newer versions of the openxr loader check the arch specific json before the undecorated json. So you can set a provide all the arch specific paths, and then add a `ln -sfn ./active_runtime.x86_64.json ~/.config/openxr/1/active_runtime.json` to, in theory, redirect older versions of the openxr loader to the architecture you expect it to need.
Kitlith commented 2025-06-01 21:06:48 -04:00 (Migrated from gitlab.com)

I can't figure out a way to action on this for this PR, without adding a section on "here's how to replace the version of pressure-vessel that steam uses!" that I don't really feel like adding.

IMO, This document should be updated once that PR is merged and released to the public, but it doesn't feel appropriate to do so before-hand, whether that happens before or after this is merged, unless we were specifically going to not merge this until that PR is merged and release.

Thoughts?

I can't figure out a way to action on this for this PR, without adding a section on "here's how to replace the version of `pressure-vessel` that steam uses!" that I don't really feel like adding. IMO, This document should be updated once that PR is merged and released to the public, but it doesn't feel appropriate to do so before-hand, whether that happens before or after this is merged, unless we were specifically going to not merge this until that PR is merged and release. Thoughts?
Kitlith commented 2025-06-01 21:50:02 -04:00 (Migrated from gitlab.com)

added 1 commit

  • b65bc23b - Refactor the monado and wivrn sections

Compare with previous version

added 1 commit <ul><li>b65bc23b - Refactor the monado and wivrn sections</li></ul> [Compare with previous version](/lvra/lvra.gitlab.io/-/merge_requests/115/diffs?diff_id=1375792636&start_sha=9dbba2c7aec846acd9e373175d2b595b45741edb)
Kitlith commented 2025-06-01 21:51:12 -04:00 (Migrated from gitlab.com)

and right after I post this, I find a way to say "this will not be necessary in the future" in regard to the XDG_RUNTIME_DIR workarounds. shrug

and right after I post this, I find a way to say "this will not be necessary in the future" in regard to the XDG_RUNTIME_DIR workarounds. *shrug*
Kitlith commented 2025-06-01 21:54:29 -04:00 (Migrated from gitlab.com)

added 1 commit

Compare with previous version

added 1 commit <ul><li>e4ccdb9b - fixup!</li></ul> [Compare with previous version](/lvra/lvra.gitlab.io/-/merge_requests/115/diffs?diff_id=1375793549&start_sha=b65bc23b7d3c3eca5cd8c1a17f5341017bfa10e4)
Kitlith commented 2025-06-02 19:42:07 -04:00 (Migrated from gitlab.com)

added 1 commit

Compare with previous version

added 1 commit <ul><li>0269da71 - Add Troubleshooting section</li></ul> [Compare with previous version](/lvra/lvra.gitlab.io/-/merge_requests/115/diffs?diff_id=1377240311&start_sha=e4ccdb9b57b181c5a6dc704f479e05be7725327e)
Kitlith commented 2025-06-02 19:42:29 -04:00 (Migrated from gitlab.com)

added 1 commit

  • 7db85cf0 - Make wivrn a subsection of steam games

Compare with previous version

added 1 commit <ul><li>7db85cf0 - Make wivrn a subsection of steam games</li></ul> [Compare with previous version](/lvra/lvra.gitlab.io/-/merge_requests/115/diffs?diff_id=1377240524&start_sha=0269da7153bfad00beff951aeb1a0eb7b6a32b43)
thebutlah commented 2025-06-03 00:03:35 -04:00 (Migrated from gitlab.com)

Consider linking my NixOS apple-silicon config, as a known-working example for NixOS users.

The nixos-apple-silicon repo pulls in the latest version of asahi's mesa, which includes the necessary vulkan extensions for monado. Once that is configured using the existing guide in that repo, following the regular NixOS instructions for monado + wivrn was sufficient. I did have to pass NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 to the nixos-rebuild command, because some subset of the software doesn't appear to be labeled as supported on aarch64-linux (xriser?). Even though its not labeled as supported, it all built and ran fine.

I have only tested xrgears and a bevy_mod_openxr example application. I can confirm passthrough works, I did not test controllers or hand tracking. I did not test xriser, opencomposite, wlx-overlay, or any other games. I did not test x86 emulation.

Consider linking [my NixOS apple-silicon config](https://github.com/TheButlah/nix/blob/3808edab5f38e388b22bbf16b94a9a2821b2582f/flake.nix#L272-L276), as a known-working example for NixOS users. The [nixos-apple-silicon](https://github.com/nix-community/nixos-apple-silicon/tree/3ddc251d2acce5019b0fa770e224d068610a34e4) repo pulls in the latest version of asahi's mesa, which includes the necessary vulkan extensions for monado. Once that is configured using the existing guide in that repo, following the regular NixOS instructions for monado + wivrn was sufficient. I did have to pass `NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1` to the `nixos-rebuild` command, because some subset of the software doesn't appear to be labeled as supported on aarch64-linux (xriser?). Even though its not labeled as supported, it all built and ran fine. I have only tested xrgears and a [bevy_mod_openxr](https://github.com/awtterpip/bevy_oxr/tree/7a30bb2b523739501ba491956b96d9d6464ed8c5) example application. I can confirm passthrough works, I did not test controllers or hand tracking. I did not test xriser, opencomposite, wlx-overlay, or any other games. I did not test x86 emulation.
Kitlith commented 2025-06-03 03:45:56 -04:00 (Migrated from gitlab.com)

added 1 commit

  • 3aaaf07f - missing `/bin` for wivrn in launch script

Compare with previous version

added 1 commit <ul><li>3aaaf07f - missing `/bin` for wivrn in launch script</li></ul> [Compare with previous version](/lvra/lvra.gitlab.io/-/merge_requests/115/diffs?diff_id=1377605902&start_sha=7db85cf056c6c44b77df34d5c19b7daaba8bcc9a)
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin patch-1:patch-1
git checkout patch-1
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LinuxVR_Adventure/lvra.gitlab.io#120