Vivecraft

Vivecraft

5M Downloads

Installation Not Found (110/100) if launcher is installed in a Flatpak on Linux

FriederHannenheim opened this issue · 20 comments

commented

Vivecraft is trying to find the openvrpaths.vrpath file in the Flatpak's config directory (/home/user/.var/app/org.prismlauncher.PrismLauncher/config/openvr). If I create that file and point it to SteamVR it doesn't work. Even if I enable all file access in Flatseal.
Works with non-flatpak version out of the box.

commented

Hmm, I haven't heard of flatpack before, but I think I somewhat know what the issue could be? We include the natives needed in our resources, and move it to that folder when running the game. It might be that it couldn't move the file? This system is old and could definitely be made better.

commented

Flatpak is a package manager for Linux which Sandboxes it's applications. So instead of the files for the launcher being in .local they are under .var and the Application sees that as the home directory. But the application can still access all files if the user allows that.
Here's my log but it doesn't say much about the error sadly: https://mclo.gs/s2q2zoF. If you have a debug version with more verbose logging I could run that and send the logs.

commented

Adding OpenVR search path: /home/********/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/1.18.2 VR/.minecraft/openvr/linux64 Is this present? You also said it worked without flatpack right? Just making sure cause iirc there was a linux issue at some point.

commented

Yes it works without Flatpak. The path you mentioned does exist. It's a folder and it contains 2 files:

  • libopenvr_api.so
  • linux64 (empty file)
commented

It has .../linux64/linux64? That doesn't seem right? Either way, the native is present on that path, so it should be found? This is just an idea (and a odd one), but could you copy the libopenvr_api.so to the second linux64 folder as well? it might be looking there for some reason?

commented

It's a file not a folder. But I tried doing that and the result did not change

commented

Oh that's really odd. I didn't write this code, but I'll try and see what's going on. That file shouldn't exist, and it should just find the natives. What was the path when not using flatpack? (from /openvr).

Vivecraft is trying to find the openvrpaths.vrpath file in the Flatpak's config directory

Hmm, that would mean that the (relative) position of the filesystem is different on flatpack compared to what we except?

commented

The path without flatpak is /home/fried/.local/share/PrismLauncher/instances/1.18.2/.minecraft/openvr/linux64

I think to find the openvrpaths.vrpath the app is using the XDG_CONFIG_HOME environment variable which is different for the flatpak.

commented

A quick possible fix for you would be to place libopenvr_api.so in /home/user/.var/app/org.prismlauncher.PrismLauncher/config/openvr/linux64 I think, since that is where we are looking. I'll look into fixing this however so it isn't needed anymore. Thanks for letting us know!

commented

Sadly that did not fix it

commented

That makes it even more odd. If the file is present at both those paths, I'm not to certain where it would be looking otherwise.

commented

Maybe it finds the openvr.so but doesn't find SteamVR since that would be outside of the sandbox.

commented

Alright. After trying it again today after a restart I now get Hmd Not found Presence Failed (126). SteamVR is running and my headset is connected and working correctly.

commented

I can confirm I am running Linux with GDlauncher which is installed as flatpak too and I have the same error (110).

commented

Is there going to be a fix for this issue?

commented

I don't think it's fixable.
iirc flatpacks are sandboxed, and it fails to find the global steamvr installation

commented

@FriederHannenheim did you try launching prism with the steamvr run script?
https://github.com/ValveSoftware/SteamVR-for-Linux/blob/master/README.md#runtime-requirements
that should in theory set the paths correctly so that steamvr can be detected

commented

could someone here check, if this is still the same with 1.0.1?

commented

closing, as it's more a steamvr issue, and no response to questions

commented

Good afternoon. I ran into this problem and decided to take a crack at finding a workaround myself.

Here's where I got.
My first step was to create a symbolic link: ln -s ~/.config/openvr ~/.var/app/org.prismlauncher.PrismLauncher/config/openvr
This fixes the issue with /home/user/.var/app/org.prismlauncher.PrismLauncher/config/openvr not being found.

After that it'll start complaining about not being able to find shared libraries. This is because the flatpak sandbox is blocking Minecraft from accessing the shared libraries under ~/.steam, so I used Flatseal to grant access to that directory.

At this point Vivecraft will complain that it doesn't know where to find libsteam_api.so. To fix this, add PrismLauncher to Steam as a non-steam game and then launch it from Steam.

At this point is where I'm stuck. Either the game will get into an infinite loop of spamming the following message:

If you click yes, we will try and open https://links.minecraftforge.net/early-display-errors in your default browser
[12Jul2024 00:33:54.001] [Render thread/ERROR] [EARLYDISPLAY/]: ERROR DISPLAY
Failed to initialize graphics window with current settings.


Failure details:
We seem to be having trouble handing off the window, tried for 1 second

Or it just instantly crashes my desktop session and I have to log in again. That issue is very likely SteamVR specific because other games have done it to me too.

Now for some specs about my setup:

thecarl@the-carl-tower:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Linuxmint
Description:	Linux Mint 21.3
Release:	21.3
Codename:	virginia
thecarl@the-carl-tower:~$ uname -a
Linux the-carl-tower 5.15.0-113-generic #123-Ubuntu SMP Mon Jun 10 08:16:17 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
thecarl@the-carl-tower:~$ flatpak --version
Flatpak 1.12.7
thecarl@the-carl-tower:~$ flatpak list | grep prismlauncher
Prism Launcher Contributors	org.prismlauncher.PrismLauncher	8.4	stable	user

I was using the Steam VR Beta branch, build ID 14850593

Minecraft: 1.20.1
Forge: 47.2.0
LWJGL: 3.3.1 build 7
Java: 17.0.11
Graphics card and driver: AMD Radeon RX 6750 XT (radeonsi, navi22, LLVM 17.0.6, DRM 3.42, 5.15.0-113-generic) GL version 4.6 (Core Profile) Mesa 24.1.1 (git-6c377358a5), AMD

I'm sure I forgot something important so go ahead and ask questions. I'll probably give this another go another night.