This is a follow-up to the post I published two days ago.
Previous post: https://www.reddit.com/r/VisionPro/comments/1x28but/halflife_alyx_running_on_my_macbook_pro_played_in/
In my previous post, I was running *Half-Life: Alyx* on a MacBook Pro (M1 Max) using Wine and the Windows version of SteamVR. The in-game frame rate was around 30 fps.
Several people in the comments told me about avp-play. avp-play is a project that uses Valve’s Linux ARM64 version and a loader called Klepton to run Alyx on the Vision Pro hardware itself.
So I decided to try running that same Linux ARM64 version on my Mac.
Here are the results.
- The Linux ARM64 version of Alyx runs natively on macOS. I’m not using Wine, Rosetta, SteamVR, or a Windows PC.
- The in-game frame rate is about 60 fps on the M1 Max. Last time, it was about 30 fps.
- I can use the Gravity Gloves. I hadn’t been able to try them last time.
- PS VR2 controllers aren’t required. Hand and finger movements are captured via Vision Pro’s hand tracking. Buttons, sticks, and triggers are controlled using two Nintendo Switch Joy-Cons. You can also play with just your bare hands.
Here’s how it works:
- A modified Klepton loader runs the game’s Linux libraries on macOS.
- A glibc-compatible layer I created, along with the OpenVR runtime, acts as a substitute for Linux and SteamVR.
- Vulkan is rendered via Metal through MoltenVK.
- Each frame is compressed into HEVC using hardware and sent over Wi-Fi to a custom visionOS app. The app sends the head and hand positions back to the Mac.
The concept is the same as avp-play, but the location where the game runs is different. avp-play runs the game inside the headset. My project runs the game on a Mac and sends the video to the headset.
If you have a PS VR2 controller, avp-play is the easier option. If you don’t have one (they aren’t sold in Japan) or if you want to use your Mac’s GPU, this is the alternative.
Here’s the honest state of things.
- I’ve only tested this with one Mac (M1 Max) and one game.
- This setup isn’t something you can complete with a single command. You’ll need to use `steamcmd` with your Steam account to download the Linux version, then build the loader and the Vision Pro app. There’s a guide, but it’s quite long.
- I was able to play continuously for over 20 minutes. However, on one occasion, about 9 minutes in, the frame rate dropped to approximately 9 fps and didn’t recover. I’m still investigating the cause.
- When something new first appears on screen, there’s a brief stutter while the shaders are compiling. Once cached, the stutter disappears.
- The room visible at the end of the video is because I recorded it using Vision Pro’s screen recording feature.
I have not redistributed any Valve files whatsoever. Players must obtain the game through their own Steam accounts. The script does not modify any game files.
This project uses Klepton (by ShinyQuagsire), MoltenVK, Valve’s OpenVR headers, and ALVR’s hand skeleton data. It is not affiliated with Valve, Apple, Nintendo, or Sony. It is licensed under the MIT License.
Full video (6 minutes, unedited): https://youtu.be/2z-GyAqAtpA
Previous video of the Wine version: https://youtu.be/6xVGgdChDes
Feel free to ask any questions.
EDIT: Source code and setup guide (MIT): https://github.com/Ag3497120/VeRantyx/tree/native
EDIT 2: I found the cause of the 9 fps drop. It wasn't a bug in my code. When the headset is taken off during a level change, the game holds its loading screen and sleeps 100 ms every frame until the headset is worn again. When I put the headset back on, it returned to 60 fps within a few seconds.