Vivecraft / VivecraftMod

An experimental port of Vivecraft to Forge/Fabric
Other
162 stars 33 forks source link

Can't get game to display in headset on Linux. #271

Open CaptainD54321 opened 3 months ago

CaptainD54321 commented 3 months ago

Hey there, I've been trying to get Vivecraft working on my Linux machine, and but can't get it to actually show anything in my VR headset; motion tracking clearly works, as I can see the view on my monitor moving when I put on the headset and look around, but all I see in my headset is the default SteamVR aurora skybox. The Minecraft log fills up with error spam saying [Render thread/ERROR]: Texture submission error: Left/Right SharedTexturesNotSupported/SharedTexturesNotSupported as soon as I put on my headset, and the vrclient_java.txt log file in the steam logs folder is full of these four lines over and over again, plus a few lines further up about "No GPU timing Vulkan device" and "No Vulkan command buffer":

Mon Apr 22 2024 19:13:23.340082 [Info] - CSharedSemaphoreLinux::ImportVulkanSemaphore - vkImportSemaphoreFdKHR failed with error -13
Mon Apr 22 2024 19:13:23.340160 [Info] - CSharedResourceBaseLinux::CreateAssociatedResources failed to pre-allocate semaphore handle=0x10002fc74 slot=0
Mon Apr 22 2024 19:13:23.340196 [Error] - SharedCountingSemaphoreLinux::CreateVulkanCountingSemaphore: failed to create associated semaphores.
Mon Apr 22 2024 19:13:23.340229 [Error] - CVulkanVRRenderer::CreateGPUCountingSemaphore - Failed to allocate counting shared resource

Before you link me to the Vivecraft FAQ (https://www.vivecraft.org/faq/#gpu), I have already made sure that Minecraft is running on the correct GPU (when I load into a world in non-VR mode and open F3, my NVIDIA card is listed as the GPU being used and not the intel Intel card)

System Information: OS: Linux Mint 21.3 CPU: Intel i7-8750H @2.20 GHz GPU: NVIDIA RTX 2060 SteamVR Version: 2.5.2 (latest beta) VR Headset: HTC Vive

Full log files: vrclient_java.txt latest.log

fayer3 commented 3 months ago

are you using the nvidia drivers or opensource?

fayer3 commented 3 months ago

and make sure that everything is plugged into the gpu, monitor and headset

CaptainD54321 commented 3 months ago

Using NVIDIA drivers, version 545, headset is plugged into the displayport on the back of my laptop, as is my main monitor, although I think that the screen of my laptop might actually be connected to the intel chip, but there's nothing I can really do about that

fayer3 commented 3 months ago

huh, so this is a laptop. should have seen that from the cpu. can you check what the vr compositor log from steamvr says what gpu that is using.

fayer3 commented 3 months ago

because thus sounds like it's trying to share stuff between the gpus

CaptainD54321 commented 3 months ago

vrcompositor.txt looks like its saying its using the NVIDIA gpu too, also has close to 40k lines of this:

[Error] - Unflushed events requested in CGpuTiming::GetDeltas!
[Error] - No Vulkan command buffer open in CGpuTiming::MarkEvent!
[Error] - No Vulkan command buffer open in CGpuTiming::MarkEvent!

Full log: vrcompositor.txt

CaptainD54321 commented 3 months ago

As I said earlier, I've so far not had any trouble running Steam games (although I do have a different issue with the SteamVR dashboard not appearing and SteamVR Home not loading), it seems to be only Minecraft that has this particular error

fayer3 commented 3 months ago

no clue. it should work fine on nvidia, I can check tomorrow on mine. in the mean time maybe check the steamvr files for errors

Techjar commented 3 months ago

Can you try non-beta SteamVR?

CaptainD54321 commented 3 months ago

@Techjar same behavior on latest stable (2.4.4), although interestingly I am getting a slight change in my vrdashboard issues on the stable branch (seeing the white bar you drag to move the dashboard, plus seeing a kinda glitched thing instead of nothing on the place on the controller models that is supposed to show the battery indicator and which hand the controller is), I'm gonna take another pass at trying to find a solution for those and maybe manage to fix something else in the process

CaptainD54321 commented 3 months ago

Some more updates from further testing on SteamVR 2.4.4:

The vrcompositor.txt error messages I reported earlier appear to be gone, replaced with a lot of info lines along the lines of Processed message blahblahblahblah from java (processid) took 0.002 seconds, which sounds like its working more normally, but vrclient_java.txt has the exact same errors; these three lines near the top of the log:

Wed Apr 24 2024 19:02:35.680160 [Error] - No GPU timing Vulkan device in CVRCompositorSharedTextures::BeginGPUTimingCommandBuffer!
Wed Apr 24 2024 19:02:35.680212 [Error] - No Vulkan command buffer open in CGpuTiming::MarkEvent!
Wed Apr 24 2024 19:02:35.680240 [Error] - Invalid command buffer in CVRCompositorSharedTextures::FinishOpenCommandBuffer!

Followed by these four lines repeated as long as the program is running:

Wed Apr 24 2024 19:02:35.871036 [Info] - CSharedSemaphoreLinux::ImportVulkanSemaphore - vkImportSemaphoreFdKHR failed with error -13
Wed Apr 24 2024 19:02:35.871113 [Info] - CSharedResourceBaseLinux::CreateAssociatedResources failed to pre-allocate semaphore handle=0x10008c983 slot=0
Wed Apr 24 2024 19:02:35.871155 [Error] - SharedCountingSemaphoreLinux::CreateVulkanCountingSemaphore: failed to create associated semaphores.
Wed Apr 24 2024 19:02:35.871188 [Error] - CVulkanVRRenderer::CreateGPUCountingSemaphore - Failed to allocate counting shared resource

With a few other error messages I just noticed showing up once in that logspam near the top:

Wed Apr 24 2024 19:02:35.891767 [Error] - CSharedBufferLinux::ImportVulkanBuffer - Failed to import cross-process image memory
Wed Apr 24 2024 19:02:35.891906 [Error] - Failed to create sync texture.  Ensure application was built using DXGI 1.1 or later (i.e. Call CreateDXGIFactory1).
[gap of a few lines of other errorspam]
Wed Apr 24 2024 19:02:35.930675 [Error] - CSharedBufferLinux::ImportVulkanBuffer - Failed to import cross-process image memory
Wed Apr 24 2024 19:02:35.954857 [Error] - CSharedBufferLinux::ImportVulkanBuffer - Failed to import cross-process image memory
Wed Apr 24 2024 19:02:35.954920 [Error] - VulkanVRRenderer::ImportConstantBufferFromSharedHandle - Failed to import remote constant buffer.
Wed Apr 24 2024 19:02:35.955076 [Error] - Failed to open frame info buffer (Vulkan)!

I've tried searching all these error messages without finding anything useful; all the other posts on the internet of people having this same basic error with Vivecraft (showing on window on desktop and tracking headset movement, but not displaying in headset) are having issues either with Windows Mixed Reality (obviously irrelevant here), or dual GPU issues (which I worry might be my problem, but I don't know what I can do about the fact my laptop's built-in monitor is connected to the iGPU)

fayer3 commented 3 months ago

so finally got to check on my desktop with an nvidia gpu it works fine there with the nvidia 535 driver. I also get that No GPU timing Vulkan device in the log, so that is normal don't have any of your other errors though

CaptainD54321 commented 2 months ago

Huh, sounds like it is likely some sort of dual GPU issue (I assume your desktop doesn't have an integrated GPU), I might actually try rolling back my graphics drivers to 535, as I'm not actually sure if I ever tested vivecraft with 535 drivers, and I think I used to actually have a good reason that I was only using the 535 drivers; will update if that has any effect

fayer3 commented 2 months ago

535 was the only one ubuntu provided me, that is why I was on that one