bjornbytes / lovr

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

Issue launching AppImage on hybrid GPU system #799

Open gungugugungu opened 1 month ago

gungugugungu commented 1 month 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 1 month 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 1 month 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 1 month 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 1 month 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 1 month 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 1 month 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 1 month 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 1 month 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.