NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.14k stars 13.42k forks source link

qutebrowser on ubuntu core dump #66755

Closed parisni closed 1 year ago

parisni commented 5 years ago

Describe the bug

I am using nix on ubuntu 18.04. I tried to install qutebrozser. I get this error:

15:07:22 WARNING: qglx_findConfig: Failed to finding matching FBConfig (8 8 8 0)
15:07:22 WARNING: qglx_findConfig: Failed to finding matching FBConfig (1 8 8 0)
15:07:22 WARNING: qglx_findConfig: Failed to finding matching FBConfig (1 1 8 0)
15:07:22 WARNING: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
15:07:22 WARNING: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
15:07:22 WARNING: qglx_findConfig: Failed to finding matching FBConfig (8 8 8 0)
15:07:22 WARNING: qglx_findConfig: Failed to finding matching FBConfig (1 8 8 0)
15:07:22 WARNING: qglx_findConfig: Failed to finding matching FBConfig (1 1 8 0)
15:07:22 WARNING: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
15:07:22 WARNING: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
15:07:22 CRITICAL: Could not initialize GLX
Fatal Python error: Aborted

Current thread 0x00007fcd8aa56b80 (most recent call first):
  File "/nix/store/wixi6m358qircrsabvm7v3ypbblfwhbw-qutebrowser-1.7.0/lib/python3.7/site-packages/qutebrowser/app.py", line 814 in __init__
  File "/nix/store/wixi6m358qircrsabvm7v3ypbblfwhbw-qutebrowser-1.7.0/lib/python3.7/site-packages/qutebrowser/app.py", line 105 in run
  File "/nix/store/wixi6m358qircrsabvm7v3ypbblfwhbw-qutebrowser-1.7.0/lib/python3.7/site-packages/qutebrowser/qutebrowser.py", line 199 in main
  File "/nix/store/wixi6m358qircrsabvm7v3ypbblfwhbw-qutebrowser-1.7.0/bin/.qutebrowser-wrapped", line 11 in <module>
Aborted (core dumped)

To Reproduce Steps to reproduce the behavior:

  1. nix-env -id qutebrowser

metadata

- system: `"x86_64-linux"`
 - host os: `Linux 4.15.0-58-generic, Ubuntu, 18.04.3 LTS (Bionic Beaver)`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.2.2`
 - channels(nparis): `"nixpkgs-19.09pre188239.c0e56afddbc"`
 - nixpkgs: `/home/parisni/.nix-defexpr/channels/nixpkgs`
FRidh commented 5 years ago

How is it when you use nixos-19.03?

parisni commented 5 years ago

the same works fine on nixo-19.03

rnhmjoj commented 5 years ago

Seems the same kind of issue of https://github.com/qutebrowser/qutebrowser/issues/4429.

rnhmjoj commented 5 years ago

You should try running the KDE Falkon browser (it uses QtWebEngine) to see if the problem is in QtWebEngine or is specific to qutebrowser.

parisni commented 5 years ago

indeed, the problem applies to falkon too:

qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling > the application may fix this problem.

Aborted (core dumped)

rnhmjoj commented 5 years ago

Not really, that error is probably due to https://github.com/NixOS/nixpkgs/issues/65399. EDIT: It definitely was that. I submitted a PR to fix this unrelated problem. You should be able to try again once it's accepted.

rnhmjoj commented 4 years ago

Ok, it should be fixed in the unstable channel. Can you update your channel and try falkon again?

parisni commented 4 years ago
nix-channel --update
nix-env -i falkon
falkon 
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (8 8 8 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 8 8 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 8 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (8 8 8 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 8 8 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 8 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
Fatal: Could not initialize GLX
Aborted (core dumped)

is that what you asked ?

rnhmjoj commented 4 years ago

is that what you asked ?

Yes, thank you. This confirms that whatever the issue is related to QtWebEngine.

andys8 commented 4 years ago

Confirming issue. Can't run qutebrowser on ubuntu 18.04, too.

13:16:57 WARNING: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile)
13:16:57 WARNING: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile)
13:16:57 CRITICAL: Could not initialize GLX
Fatal Python error: Aborted

Current thread 0x00007feb3aada1c0 (most recent call first):
  File "/nix/store/0dall7nx9i0wl90kck2n9ihy215x2yfi-qutebrowser-1.8.1/lib/python3.7/site-packages/qutebrowser/app.py", line 814 in __init__
  File "/nix/store/0dall7nx9i0wl90kck2n9ihy215x2yfi-qutebrowser-1.8.1/lib/python3.7/site-packages/qutebrowser/app.py", line 105 in run
  File "/nix/store/0dall7nx9i0wl90kck2n9ihy215x2yfi-qutebrowser-1.8.1/lib/python3.7/site-packages/qutebrowser/qutebrowser.py", line 200 in main
  File "/nix/store/0dall7nx9i0wl90kck2n9ihy215x2yfi-qutebrowser-1.8.1/bin/.qutebrowser-wrapped", line 9 in <module>
fish: Process 11601, “qutebrowser” “qutebrowser | xclip -selection…” terminated by signal SIGABRT (Abort)
parisni commented 4 years ago

This also applies on archlinux

andys8 commented 4 years ago

Still the case after the recent update to 1.8.2 (https://github.com/NixOS/nixpkgs/commit/33d18156f957e48f06598d73b3467c89a12565d5)

rnhmjoj commented 4 years ago

I wonder if it's an issue with openGL in nixpkgs... Do you have simular errors when running other programs that create openGL contexts? Maybe try running glxinfo/glxgears from nixpkgs and the other package manager.

sindikat commented 4 years ago

I have the same problem, but with the package anki. I use Ubuntu 19.10. Freshly installed Nix. nix-channel --list returns nixpkgs https://nixos.org/channels/nixpkgs-unstable. Run from terminal, anki returns this:

(process:3119): Gtk-WARNING **: 14:38:11.758: Locale not supported by C library.
    Using the fallback 'C' locale.
Gtk-Message: 14:38:11.854: Failed to load module "canberra-gtk-module"
Gtk-Message: 14:38:11.854: Failed to load module "canberra-gtk-module"
qt: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile)
qt: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile)
qt: Could not initialize GLX
Aborted (core dumped)

Tried installing Ubuntu package qt5-default and then separately qtwebengine5-dev, didn't help. Tried installing Nix package qt5.full, didn't help. Rebooting doesn't change anything.

rnhmjoj commented 4 years ago

@sindikat: Can you try to run a different openGL program in nixpkgs? Like glxinfo/glxgears should do. I'd like to know if the issue is limited to qtwebengine or whole nixpkgs.

sindikat commented 4 years ago

Installed package glxinfo from Nix. Trying to run:

name of display: :0
Error: couldn't find RGB GLX visual or fbconfig

Removed it & installed mesa-utils in Ubuntu. Both glxinfo and glxgears work fine.

parisni commented 4 years ago

same behavior for me

masaeedu commented 4 years ago

Similar issue with p4v on Arch Linux:

➜  tmp.wSjBCsqBai uname -a
Linux plutobox 5.4.1-arch1-1 #1 SMP PREEMPT Fri, 29 Nov 2019 13:37:24 +0000 x86_64 GNU/Linux
➜  tmp.wSjBCsqBai p4v
qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile)
No XVisualInfo for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile)
Falling back to using screens root_visual.
qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile)
No XVisualInfo for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile)
Falling back to using screens root_visual.
[2]    84497 segmentation fault (core dumped)  p4v
rnhmjoj commented 4 years ago

Pinging @vcunat as mesa maintainer. I'm not sure who else could help here...

vcunat commented 4 years ago

If that's the issue, OpenGL in nixpkgs on non-NixOS is still troublesome, I suppose. Years ago I decided not spend my time on that combination, as no easy solution could be found (EDIT: well, that seems an understatement). There are some discussion threads here – people were sometimes able to make their use case work. You might want to try https://github.com/NixOS/nixpkgs/pull/62177 (and/or look at the tickets linked in this PR's description)

hmenke commented 4 years ago

I've had the same problem with Mathematica 12 which I was able to work around by:

export USE_WOLFRAM_LD_LIBRARY_PATH=1
export QT_XCB_GL_INTEGRATION=none

The first statement is of course specific to Mathematica but I believe the second one should fix other Qt applications as well.

pmiddend commented 3 years ago

I can confirm that @hmenke's suggestion (using QT_XCB_GL_INTEGRATION) works with qutebrowser as well. Is there any point in getting this into nixpkgs?

alexkalderimis commented 3 years ago

Thanks @pmiddend - I can confirm that this environment variable works for me.

rnhmjoj commented 3 years ago

I'm not exactly sure what the meaning of that variable is, but it looks like it's disabling hardware acceleration. It may certainly work around the issue but it's not idea. I think the best solution, as of now, is to using nixGL to use Nixpkgs drivers on non-NixOS too.

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

2457205703 commented 1 year ago

I've had the same problem with Mathematica 12 which I was able to work around by:

export USE_WOLFRAM_LD_LIBRARY_PATH=1
export QT_XCB_GL_INTEGRATION=none

The first statement is of course specific to Mathematica but I believe the second one should fix other Qt applications as well.

why export QT_XCB_GL_INTEGRATION=none

can fix the problem in pyqt5.qtwebengine when qtwebengine initialize :

librga:RGA_GET_VERSION:3.02,3.020000 ctx=0x34782fd0,ctx->rgaFd=3 Rga built version:7bf9abf Could not initialize GLX Aborted

Artturin commented 1 year ago

Closing in favor of https://github.com/NixOS/nixpkgs/issues/82959 which has a better title