bjornbytes / lovr

Lua Virtual Reality Framework
https://lovr.org
MIT License
2k stars 138 forks source link

Issue launching AppImage on hybrid GPU system #799

Open gungugugungu opened 3 months ago

gungugugungu commented 3 months ago

Howdy! When I launch lovr.AppImage it returns this:

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  149 ()
  Minor opcode of failed request:  4
  Serial number of failed request:  265
  Current serial number in output stream:  276

I have no clue why it does that, I even reinstalled it.

bjornbytes commented 3 months ago

This looks very similar to this problem: https://github.com/bjornbytes/lovr/discussions/792

I have no idea what is causing it. Our GLFW is kind of old, I'll try upgrading it out of desperation.

gungugugungu commented 3 months ago

The weird thing is the program worked on this same driver version a few weeks ago, so I don't get what is going wrong here. I did update to a new, untested nvidia driver and it still doesn't work.

bjornbytes commented 3 months ago

I just pushed the GLFW upgrade if you wanna see if that helps. Also if you can post any system details like the driver version, distro, etc. it might help others that get the same issue or help with a potential fix.

gungugugungu commented 3 months ago

For your info, here are my system specs:

OS: Ubuntu 24.04 LTS x86_64 
Host: ASUS TUF Gaming F15 FX506HE_FX506HE 1.0 
Kernel: 6.8.0-39-generic 
Uptime: 3 hours, 22 mins 
Packages: 2351 (dpkg), 16 (flatpak), 28 (snap) 
Shell: bash 5.2.21 
Resolution: 1080x1920, 1920x1080, 1920x1080 
DE: GNOME 46.0 
CPU: 11th Gen Intel i5-11400H (12) @ 4.500GHz 
GPU: NVIDIA GeForce RTX 3050 Ti Mobile 
GPU: Intel TigerLake-H GT1 [UHD Graphics] 
Memory: 7224MiB / 15730MiB

Also, when I tried recompiling it gave me this error:

[  0%] Built target xr_global_generated_files
[  0%] Built target generate_openxr_header
[  0%] Building CXX object openxr/src/loader/CMakeFiles/openxr_loader.dir/api_layer_interface.cpp.o
In file included from /home/gungu/lovr/deps/openxr/src/loader/loader_platform.hpp:16,
                 from /home/gungu/lovr/deps/openxr/src/loader/api_layer_interface.hpp:19,
                 from /home/gungu/lovr/deps/openxr/src/loader/api_layer_interface.cpp:10:
/home/gungu/lovr/deps/openxr/src/common/xr_dependencies.h:60:10: fatal error: xcb/glx.h: No such file or directory
   60 | #include <xcb/glx.h>
      |          ^~~~~~~~~~~
compilation terminated.
gmake[2]: *** [openxr/src/loader/CMakeFiles/openxr_loader.dir/build.make:90: openxr/src/loader/CMakeFiles/openxr_loader.dir/api_layer_interface.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1960: openxr/src/loader/CMakeFiles/openxr_loader.dir/all] Error 2

Luckily it isn't this version, since I also got this error a few hours ago when I compiled it for the second time.

bjornbytes commented 3 months ago

To fix that compile error you can install libxcb-glx0-dev, full list of required packages is here. The AppImage from CI is also available if that's easier

gungugugungu commented 3 months ago

Thanks! I compiled the whole thing but sadly it still gives the same error.

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  149 ()
  Minor opcode of failed request:  4
  Serial number of failed request:  262
  Current serial number in output stream:  273

At this point I have no clue what the issue is.

bjornbytes commented 3 months ago

Both people experiencing this issue are on dual iGPU/dGPU setups. Apparently disabling the iGPU in BIOS fixes it. Hopefully we can find a better workaround though.

gungugugungu commented 3 months ago

Yeah, I'm hoping for a better workaround, because I have an Asus tuf 15 laptop, and they don't allow disabling the iGPU in the bios, since they got rid of the MUX switch.

gungugugungu commented 1 month ago

Hi! Got another update on this issue. The app works perfectly fine with noveau drivers, my only issue is that I've got a usb-c display which doesn't work with noveau drivers, but I'm gonna get that figured out. Maybe it also works on older driver version, I'm also gonna try that.

gungugugungu commented 1 month ago

Another crazy discorvery, I downgraded drivers and I even tried with current driver versions, and it worked completely fine, up until I used the command sudo prime-select nvidia which ended up stopping the application from working. I'm just gonna leave out that function because I don't play games on linux anymore, and I guess it'll work. I'll still not close this issue though, since it isn't technically fixed