-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
NixOS: qt + glx broken / segfault / "Could not initialize GLX" #85866
Comments
Wrong issue number?:) Also, I'm running 20.03 and tried openscad both from 20.03 as well as unstable channel and it does not segfault. I've got AMD GPU if that matters. |
Thanks, I've fixed the number.
I guess that it's related to the graphics driver or some opengl packages/-configuration. But I don't know which -- and it worked before the update. |
After |
I am having the same problem with NixOS 20.03 (KDE desktop, trying to run nextcloud client). The problem can also be reproduced by just running |
I have the same on OpenSuse with nixpkgs.
|
I'm also having problems that are related to this, I think. In particular, a program that uses Qt (mcrl2) gives the following errors (I include only two lines, but the first line in my snippet is repeated several times in the output):
(mcrl2 prints nothing when used with nixGLNvidia, I think nixGLNvidia just hides the errors in that case. I also refactored the mcrl2 derivation to use I want to add that |
I was having vaguely similar problems. I found a solution that worked for me on a different issue: |
Thank you for the suggesting. Adding
At least the application starts now ( |
I marked this as stale due to inactivity. → More info |
This is still relevant. I have the same problem on Ubuntu 20.04 with https://github.com/lopsided98/nix-ros-overlay when building ROS environment that contains $ nix-shell
# to get rid of error
# qt.glx: qglx_findConfig: Failed to finding matching FBConfig...
$ export QT_XCB_GL_INTEGRATION=none
$ rosrun rviz rviz
# ...
[ INFO]: rviz version 1.13.16
[ INFO]: compiled against Qt version 5.15.2
[ INFO]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO]: Forcing OpenGL version 0.
Segmentation fault |
Disregard, it turned out to be something related to automatic executable wrapping instead! The GL-related warnings were a red herring and because I was doing some of the testing on a headless machine. |
Just to follow up on @mikepurvis 's comment. We solved our issues by properly wrapping the Qt applications with wrapQtAppsHook. To resolve the segmentation faults when the OpenGL context is being created we are using nixGL. These segmentation faults seem to be only a problem on non-NixOS systems, where the binaries from the nix store don't have access to the libraries installed by the graphics card drivers of the operating system (in our case the libs installed by the Nvidia driver). |
Just confirming that this is still broken as of 21.11.334934.8a053bc2255:
|
Since this can be reproduced with glxinfo, which is not a Qt application, it seems like this probably has nothing to do with Qt. Instead, these Qt errors are just how Qt fails when the display server doesn't support OpenGL. The real question becomes: Why doesn't the display server support OpenGL? Answer that and fix the config and these Qt programs will probably work. |
In my case, I switched from the "nvidia" driver to the "amdgpu" driver (the system has both video cards in it) and both glxinfo and openscad are working fine now. I don't know why glx support is missing when using the "nvidia" driver. The web is littered with posts from people trying to solve that kind of issue on linux so I imagine there are a ton of possible misconfigurations that result in the situation. |
also a problem on WSL |
Describe the bug
It seems that all Qt-programs, using GLX are currently broken and cause a segfault:
(I guess this occurs since 20.03 since some programs worked before, but I'm not completely sure.)
This may be related to #82959 but I'm not sure and since GL with Nix-packages on non-NixOS is quite different, I'm opening a new, NixOS-related bug.
To Reproduce
openscad
ordesigner
Expected behavior
Working program without segfault.
Metadata
"x86_64-linux"
Linux 5.4.33, NixOS, 20.03.1445.95b9c99f6d0 (Markhor)
yes
yes
nix-env (Nix) 2.3.4
"nixos-20.03.1445.95b9c99f6d0"
/nix/var/nix/profiles/per-user/root/channels/nixos
The text was updated successfully, but these errors were encountered: