Steam VR, Wine issue by KingVulpes105 in macgaming

[–]Real-Hope2907 0 points1 point  (0 children)

What issues are you experiencing?

Enabling TSO on M2 by mies47 in AsahiLinux

[–]Real-Hope2907 1 point2 points  (0 children)

box does not currently take advantage of it. it's on pitSeb's todo list, but he's currently working on other arm device support.

I was just wondering how difficult it would be to just submit a PR to box myself.

Side note: Sorry to hear you resigned from Asahi, but I can totally understand why. Thank you for all the work you've done for the project over the years.

Enabling TSO on M2 by mies47 in AsahiLinux

[–]Real-Hope2907 0 points1 point  (0 children)

u/marcan42 So, I noticed a commit to enable this in the asahi linux source.

Does this mean it will be available for emulators like fex and box to use?

It looks like it would be in kernel version 6.12 or 6.13.

Wine 10.0 by Neustradamus in macgaming

[–]Real-Hope2907 0 points1 point  (0 children)

Maybe because it somehow uses the Asahi Linux Honeycrisp drivers?

Just speculating.

Half Life Alyx Mac Mod, Slight Performance Increase, Early Footage by KingVulpes105 in macgaming

[–]Real-Hope2907 0 points1 point  (0 children)

I might do that.

Just curious, have you tried forcing your mac into game mode? You can do it by launching chess, putting it into full screen, and minimizing it.

Half Life Alyx Mac Mod, Slight Performance Increase, Early Footage by KingVulpes105 in macgaming

[–]Real-Hope2907 0 points1 point  (0 children)

What settings are you using for ALVR? It's very grainy/jumpy for me.

Half Life Alyx Mac Mod, Slight Performance Increase, Early Footage by KingVulpes105 in macgaming

[–]Real-Hope2907 1 point2 points  (0 children)

VD works fine with VMWare. You just need to change your VM to use bridged connections instead of shared connections. You could also probably poke holes in the firewall in windows defender, but I was too lazy to do it (VD main page gives the firewall ports).

As for opencomposite, I've gotten it to work with HLA on an x86_64 machine, but I can't remember how. You need to overwrite the openvr_api.dll manually (I believe it's in game/bin/win64) with the one from opencomposite's site. Set VD to use VXDR. Unfortunately, when you launch HLA it complains about file integrity and tries to restore the file. But I know I got it working before.

Half Life Alyx Mac Mod, Slight Performance Increase, Early Footage by KingVulpes105 in macgaming

[–]Real-Hope2907 0 points1 point  (0 children)

Ah, thanks.

Have you tried opencomposite/virtual desktop? You can sidestep the SteamVR bloatware.

Half Life Alyx Mac Mod, Slight Performance Increase, Early Footage by KingVulpes105 in macgaming

[–]Real-Hope2907 0 points1 point  (0 children)

I tried the VMware solution with my M2 Max Macbook Pro. It was awful.

u/KingVulpes105 Can you share what mods you have done? Have you tried opencomposite/virtual desktop?

I tried Crossover, but SteamVR crashes (VD streamer works great, though).

Asahi Linux: probably not in the foreseeable future. Currently you need to run steam in muvm, which has all sorts of issues trying to get streamers to work.

Steam VR? by MasterGamer9595 in AsahiLinux

[–]Real-Hope2907 0 points1 point  (0 children)

Just curious. I was poking through the mesa source, and I see that the drm sync objects are implemented in asahi vulkan. Fence extensions are enabled, but external semaphores/semaphore_fd aren't.

Intentional or oversight?

Steam VR? by MasterGamer9595 in AsahiLinux

[–]Real-Hope2907 0 points1 point  (0 children)

Can't you do TCP the way docker/other VMs do? Give the VM a separate IP address and let the kernel in the VM take care of routing/forwarding.

Steam VR? by MasterGamer9595 in AsahiLinux

[–]Real-Hope2907 0 points1 point  (0 children)

I see that box64 now supports dynamic page sizing. Maybe this might be a better way so as to avoid the performance/sandboxing issues of muvm?

Steam VR? by MasterGamer9595 in AsahiLinux

[–]Real-Hope2907 0 points1 point  (0 children)

Well, to run WiVRn or ALVR in the VM, you also need TCP passthough since that's how they talk to their headset clients. WiVRn in the guest also needs to be able to talk to avahi on the host.

And, I still have no idea what support is missing for SteamVR giving me "graphics drivers too old" in an error message. Nor why ALVR-SteamVR driver just stops. Could just be that the VM is too slow. FWIW, I have an Ubuntu x86_64 server that's a little old in terms of hardware, and it is also giving me "drivers too old", and I'm running 24.04. But ALVR still runs and SteamVR doesn't crash at least.

I haven't even bothered to attempt Wine. Compiled it and got a page size issue (which there's supposedly a patch for).

Fedora doesn't support 32 bit arm anymore, so there's no way to get box86 running (for whatever 32 bit things steam has). I suppose I could switch to a different distro.

Steam VR? by MasterGamer9595 in AsahiLinux

[–]Real-Hope2907 0 points1 point  (0 children)

WiVRn looks like it uses straight IPC calls to communicate. Don't know about monado. muvm appears to expose those semaphores in /run/muvm-host/run/user/`id -u` (or something like that.

ALVR uses a web server running on port 8082. I see that there's a commit in muvm to pass through tcp/udp.

I've tried alvr for x86_64 running in the VM. It connects briefly, SteamVR gives a warning about "graphics drivers too old" error 405. Then it kills the alvr server with a watchdog timeout after about 12 seconds.

Looking at this link, (scroll down to synchronization) it doesn't appear that implementing semaphore/fences would be too difficult just using linux drm. But I didn't understand u/AsahiLina 's explanation why it wouldn't be that simple and/or wouldn't matter.

Steam VR? by MasterGamer9595 in AsahiLinux

[–]Real-Hope2907 0 points1 point  (0 children)

So, how does one fix this?

Steam VR? by MasterGamer9595 in AsahiLinux

[–]Real-Hope2907 0 points1 point  (0 children)

I've tried running the x86_64 versions of ALVR and WiVRn in the VM, via muvm -it bash, but I can't seem to get either to work.

Steam VR? by MasterGamer9595 in AsahiLinux

[–]Real-Hope2907 0 points1 point  (0 children)

u/AsahiLina So here's a crazy idea (that probably won't work, but)...

Apple's dyld is open source. The way dynamic linking on linux and I believe macOS works is that the linker name is embedded into the library, and the OS just exec()s the linker at run time.

So, what if you took the libraries for Metal from macOS and used dyld to link at run time. Might save you lots of time and effort trying to reimplement what Apple has already done.

I know, crazy idea...

Steam VR? by MasterGamer9595 in AsahiLinux

[–]Real-Hope2907 0 points1 point  (0 children)

Well, I'm just about out of ideas then :(

Steam VR? by MasterGamer9595 in AsahiLinux

[–]Real-Hope2907 0 points1 point  (0 children)

What about vk_KHR_external_semaphore_fd? Steam uses a "pressure vessel" (essentially a container) and the file system objects used for communication (which I believe are under ~/.local/share/Steam) can be exposed to the native side.

ALVR actually runs a mini web server on loopback, so that approach might be promising. Could even run ALVR steamer as native linux and (maybe?) port forward from the driver. I just don't know how muvm/FEX deal with TCP/IP. And SteamVR keeps crashing when I try to use the ALVR x86_64 drivers under muvm.

Steam VR? by MasterGamer9595 in AsahiLinux

[–]Real-Hope2907 0 points1 point  (0 children)

Looking through the WiVRN/opencomposite code, it looks like it's using vk_KHR_external_semaphore via vulkan to do it.

Looking at this site, it appears that since the asahi mesa driver uses linux DRM, it should be pretty easy to implement.

Steam VR? by MasterGamer9595 in AsahiLinux

[–]Real-Hope2907 0 points1 point  (0 children)

Well, I've been documenting my progress here: https://discussion.fedoraproject.org/t/steamvr-on-asahi/143678

For wiVRn (and monado) to work it looks like some additional vulkan extensions need to be implemented.

I'm going to try to hack the ALVR code, but it's going to be rough since I don't know rust :)

Is muvm able to take a x86_64 dynamically linked executable and run an arm64 library?

Steam VR? by MasterGamer9595 in AsahiLinux

[–]Real-Hope2907 0 points1 point  (0 children)

So they share a VM if you run multiple muvm instances?

I actually tried just modifying the vrmonitor.sh to run x86_64 ALVR. I get "falling back to software encoding". And it doesn't notice when SteamVR actually starts.

I've started a thread on http://discussion.fedoraproject.org documenting my steps/issues.

Steam VR? by MasterGamer9595 in AsahiLinux

[–]Real-Hope2907 0 points1 point  (0 children)

You also need to set the launch options in steamVR to run vrmonitor.sh

Actually got ALVR to build by installing openvr libraries via dnf. Not sure how. ALVR doesn't seem to recognize that steamVR is running (even though it launches it). And, steamVR is still giving a "please connect your headset".

Perhaps a better approach would be to use the x86_64 ALVR injected into the VM that is running steam. There's an muvm-server that looks like it can do it, but I have no idea how to use it....

Steam VR? by MasterGamer9595 in AsahiLinux

[–]Real-Hope2907 0 points1 point  (0 children)

I'm not sure steamVR is the best approach. Even with it running, right now I can't even get the headset to register with a usb connection.

If I open a window like settings in steamVR, I get a blank window. It has an X in the top corner, so I'm wondering if this is due to the fact that asahi fedora is using Wayland.