Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue launching AppImage on hybrid GPU system #799

Open
gungugugungu opened this issue Aug 5, 2024 · 16 comments
Open

Issue launching AppImage on hybrid GPU system #799

gungugugungu opened this issue Aug 5, 2024 · 16 comments
Labels
bug uh oh

Comments

@gungugugungu
Copy link

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
Copy link
Owner

This looks very similar to this problem: #792

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

@bjornbytes bjornbytes added the bug uh oh label Aug 5, 2024
@gungugugungu
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

gungugugungu commented Aug 5, 2024

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.

@gungugugungu gungugugungu reopened this Aug 5, 2024
@bjornbytes
Copy link
Owner

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
Copy link
Author

gungugugungu commented Aug 5, 2024

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
Copy link
Owner

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.

@bjornbytes bjornbytes changed the title Issue launching AppImage Issue launching AppImage on hybrid GPU system Aug 6, 2024
@gungugugungu
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

@EggToaster
Copy link

To prevent duplicate issues, I decided to come here. I tried both latest release, AppImage and manual build of manual development version, but it all leads to similar error:
X Error of failed request: 136 Major opcode of failed request: 148 () Minor opcode of failed request: 1 Serial number of failed request: 270 Current serial number in output stream: 270
The error was taken with manually initiated window(under lovr.load), so it may have some part different.
GLFW version on the development version is 3.50.(found in CMakeLists)

@bjornbytes
Copy link
Owner

Thank you for the info. If you're building from source you could try building with -DLOVR_USE_GLFW=OFF, I'm curious if this would change anything (this uses raw xcb instead of GLFW).

@EggToaster
Copy link

EggToaster commented Dec 21, 2024

image
Weirdly, I got a blank window with this on "no game" display.
Text looks normal on my project, but it is just a black screen, and the log(my logging system) is stopping from certain place.
I enabled debug log, this is the output:
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeManifestFile::FindManifestFiles - failed to determine active runtime file path for this environment Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntimes - unknown error Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntimes - failed to load a runtime Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed to find default runtime with RuntimeInterface::LoadRuntime() Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed querying extension properties Warning: GPU debugging is enabled, but validation layer is not installed
This happened with "no game". For my project, it only shows the last warning(Due to lovr.headset being disabled?).

@EggToaster
Copy link

Note: The weird text issue did not occur on 0.17.1 with GLFW, where the software crashes.

@bjornbytes
Copy link
Owner

Has anyone tried the __NV_PRIME_RENDER_OFFLOAD environment variable?

__NV_PRIME_RENDER_OFFLOAD=1 lovr

@EggToaster
Copy link

Nothing changed, with both GLFW and XCB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug uh oh
Projects
None yet
Development

No branches or pull requests

3 participants