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

qutebrowser doesn't start #101186

Closed
magnetophon opened this issue Oct 20, 2020 · 22 comments
Closed

qutebrowser doesn't start #101186

magnetophon opened this issue Oct 20, 2020 · 22 comments

Comments

@magnetophon
Copy link
Member

magnetophon commented Oct 20, 2020

Describe the bug

After an upgrade to the latest nixos-unstable (8133b9c), I can't start qutebrowser anymore.

I get the following error:

Failed to create OpenGL context for format QSurfaceFormat

Searching in here came up with some similar issues, but none that matches mine exactly:

When I do export QT_XCB_GL_INTEGRATION=none, I can run qutebrowser, but some pages render really odd:
screenshot_20201020_172525

To Reproduce
Steps to reproduce the behavior:

  1. upgrade to 21.03.git.e45da51fe31 (Okapi)
  2. have qutebrowser in system pkgs
  3. run qutebrowser

Notify maintainers
ping @jagajaga @rnhmjoj @dysinger @ebzzry

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.9.0, NixOS, 21.03.git.e45da51fe31 (Okapi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.7
  • channels(bart): ""
  • channels(root): "nixos-21.03pre247760.8133b9cb5f7, nixos-hardware"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
@magnetophon magnetophon added the 0.kind: bug Something is broken label Oct 20, 2020
@IvarWithoutBones
Copy link
Member

I have the same issue, log:

~ > qutebrowser
libGL error: MESA-LOADER: failed to open radeonsi (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open radeonsi (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open swrast (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: swrast
12:23:05 WARNING: QGLXContext: Failed to create dummy context
12:23:05 WARNING: WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
12:23:06 CRITICAL: Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile)
zsh: IOT instruction (core dumped)  qutebrowser

This happened after upgrading my system configuration. This is on nixos-unstable, kernel 5.9.1.

@magnetophon
Copy link
Member Author

@IvarWithoutBones Does the workaround function for you as well? export QT_XCB_GL_INTEGRATION=none
Do you also get some pages rendered weirdly?

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Oct 21, 2020

Running unstable qutebrowser from 20.09 seems to work fine, so the problem could be in a recent mesa update.

@magnetophon
Copy link
Member Author

@rnhmjoj Thanks for another data point.
How would I go about checking if the issue is with a mesa update?
I tried reverting e991a1e but that (of course) will rebuild the world, which is not fun on my aging laptop.

For completeness sake, this is my qutebrowser log:

qutebrowser   
libGL error: MESA-LOADER: failed to open i965 (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: i965
libGL error: MESA-LOADER: failed to open i965 (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: i965
libGL error: MESA-LOADER: failed to open swrast (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: swrast
15:13:27 WARNING: QGLXContext: Failed to create dummy context
15:13:27 WARNING: WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
15:13:28 WARNING: /nix/store/mwp688w771cmq49f3k1hh0dr9hasxxvg-qutebrowser-1.14.0/lib/python3.8/site-packages/qutebrowser/mainwindow/tabwidget.py:646: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  size = QSize(width, height)

15:13:28 CRITICAL: Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile) 
[1]    1845 IOT instruction (core dumped)  qutebrowser

I find it odd that it mentions i965, even though I have a i915, afaik:

lshw -C video
these paths will be fetched (1.46 MiB download, 7.20 MiB unpacked):
  /nix/store/rp6pkr7l9l12g2zqx9xfs55zsnv4chaf-lshw-02.18b
copying path '/nix/store/rp6pkr7l9l12g2zqx9xfs55zsnv4chaf-lshw-02.18b' from 'https://cache.nixos.org'...
  *-display                 
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:29 memory:f0000000-f03fffff memory:e0000000-efffffff ioport:4000(size=64) memory:c0000-dffff

@magnetophon
Copy link
Member Author

When I run sha1sum /run/opengl-driver/lib/dri/* | sort, I get the impression that i915 and i965 are the same thing, but maybe I'm interpreting the data wrong:

09228a72072a39057503b7134df32b571b7c30aa  /run/opengl-driver/lib/dri/vdpau_drv_video.la
16c6e4903163972effd8d49be205b29ed21948cb  /run/opengl-driver/lib/dri/nouveau_drv_video.so
16c6e4903163972effd8d49be205b29ed21948cb  /run/opengl-driver/lib/dri/r600_drv_video.so
16c6e4903163972effd8d49be205b29ed21948cb  /run/opengl-driver/lib/dri/radeonsi_drv_video.so
1bb31144521541f631bbe44900e68449b2752447  /run/opengl-driver/lib/dri/nvidia_drv_video.so
1bb31144521541f631bbe44900e68449b2752447  /run/opengl-driver/lib/dri/s3g_drv_video.so
1bb31144521541f631bbe44900e68449b2752447  /run/opengl-driver/lib/dri/vdpau_drv_video.so
4b3f6deb03043548ef7dabfb520475301174616d  /run/opengl-driver/lib/dri/iris_dri.so
4b3f6deb03043548ef7dabfb520475301174616d  /run/opengl-driver/lib/dri/kms_swrast_dri.so
4b3f6deb03043548ef7dabfb520475301174616d  /run/opengl-driver/lib/dri/nouveau_dri.so
4b3f6deb03043548ef7dabfb520475301174616d  /run/opengl-driver/lib/dri/r300_dri.so
4b3f6deb03043548ef7dabfb520475301174616d  /run/opengl-driver/lib/dri/r600_dri.so
4b3f6deb03043548ef7dabfb520475301174616d  /run/opengl-driver/lib/dri/radeonsi_dri.so
4b3f6deb03043548ef7dabfb520475301174616d  /run/opengl-driver/lib/dri/swrast_dri.so
4b3f6deb03043548ef7dabfb520475301174616d  /run/opengl-driver/lib/dri/virtio_gpu_dri.so
4b3f6deb03043548ef7dabfb520475301174616d  /run/opengl-driver/lib/dri/vmwgfx_dri.so
6aedf39f183d4714521c79acab57f0201f2981bd  /run/opengl-driver/lib/dri/iHD_drv_video.so
7f9749c3e87f7fa597cc79a482adbcbd2f43d929  /run/opengl-driver/lib/dri/i915_dri.so
7f9749c3e87f7fa597cc79a482adbcbd2f43d929  /run/opengl-driver/lib/dri/i965_dri.so
7f9749c3e87f7fa597cc79a482adbcbd2f43d929  /run/opengl-driver/lib/dri/nouveau_vieux_dri.so
7f9749c3e87f7fa597cc79a482adbcbd2f43d929  /run/opengl-driver/lib/dri/r200_dri.so
7f9749c3e87f7fa597cc79a482adbcbd2f43d929  /run/opengl-driver/lib/dri/radeon_dri.so
ee66a5f17dfdff4a5d0aeda458e4a22a4352c898  /run/opengl-driver/lib/dri/i965_drv_video.la
fa0dfd84d9209b598376c6305c1ec636422848fa  /run/opengl-driver/lib/dri/i965_drv_video.so

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Oct 21, 2020

How would I go about checking if the issue is with a mesa update?

I can only think of bisecting Nixpkgs, when running into this sort of issues.

@magnetophon
Copy link
Member Author

I made a minimal config.nix, which builds and runs fine without nixpkgs=$NIXPKGS . Except for the broken qutebrowser of course.

When I try to build it with the previous version of mesa, it still triggers a massive build.
I don't think this build will ever finish on my Intel i5-2520M with 8GB of RAM.

Any ideas?

@magnetophon
Copy link
Member Author

The build wasn't as bad as I feared, it finished! :)

Unfortunately, e991a1e wasn't the cause of the issue.

Unless anyone has ideas for targeted commits for me to revert, I'll try bisecting later today, when I have time.

@pio2398
Copy link
Contributor

pio2398 commented Oct 22, 2020

I have similar problem with other apps like flatpak, virt-manager from unstable on NixOS 20.09.

@magnetophon
Copy link
Member Author

@piotr-szegda Similar how? The errors, the rendering, both?

@pio2398
Copy link
Contributor

pio2398 commented Oct 22, 2020

I had been using mesa from unstable any some application failed to start (ex. steam from flatpak) due GLX error. virt-manager works but I had to disable OpenGL acceleration. Firefox work without any problem but I had graphic glitch in KDE. In logs I had seen libGL error: MESA-LOADER: failed to open radeonsi (search paths /run/opengl-driver/lib/dri) I also had this error when I start VM with OpenGL acceleration. It's seem to be larger problem then qutebrowser.

Switch to mesa from NixOS 20.09 solved all problems.

@magnetophon
Copy link
Member Author

magnetophon commented Oct 22, 2020

Switch to mesa from NixOS 20.09 solved all problems.

@piotr-szegda Thanks, that helps!

@primeos @vcunat Any idea what this could be?
It doesn't seem to be e991a1e, if I did my testing correctly.

@magnetophon
Copy link
Member Author

magnetophon commented Oct 22, 2020

Hmm, it seems some commit in the new nixos-unstable fixed it for me.

Either that, or it was the /home/bart/.nix-profile/bin/qutebrowser I still had hanging around.... 😅

@IvarWithoutBones @piotr-szegda Did you try to upgrade to the new nixos-unstable already?

@pio2398
Copy link
Contributor

pio2398 commented Oct 22, 2020

@magnetophon: Not yet, did you reboot after mesa switch?

@magnetophon
Copy link
Member Author

@piotr-szegda Yes I did.

@IvarWithoutBones
Copy link
Member

@IvarWithoutBones Does the workaround function for you as well? export QT_XCB_GL_INTEGRATION=none
Do you also get some pages rendered weirdly?

It does, the application starts now. Have not found any broken pages yet.

@IvarWithoutBones @piotr-szegda Die you try to upgrade to the new nixos-unstable already?

I did. With my users channel being nixpkgs-unstable, and my system channel being nixos-unstable. The error seems to be exactly the same as before, I've rebooted already as well.

@IvarWithoutBones
Copy link
Member

IvarWithoutBones commented Oct 28, 2020

Any update on this? When starting with QT_XCB_GL_INTEGRATION=none qutebrowser can't play any sound, log:

ALSA lib pcm.c:2651:(snd_pcm_open_conf) Either /nix/store/fpi3ni1b0w3mc98mcp1qdanwqj1v19n5-alsa-plugins-1.2.2/lib/alsa-lib/libasound_module_pcm_pulse.so cannot be opened or _snd_pcm_pulse_open was not defined inside
[4557:4557:1028/161505.184655:ERROR:alsa_util.cc(204)] PcmOpen: default,No such device or address

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Oct 28, 2020

I still can't reproduce it. Can you try these steps?

  1. git clone https://github.com/NixOS/nixpkgs; cd nixpkgs
  2. git checkout 533965957ea
  3. git clone https://github.com/guibou/nixGL
  4. nix-env -I nixpkgs=$PWD -f nixGL/ -iA nixGLIntel
  5. nix-build -A qutebrowser
  6. nixGLIntel result/bin/qutebrowser -T

This should be completely deterministic as qutebrowser
is running with its default config using the mesa driver
from the same nixpkgs checkout.

Note: substitute "Intel" with the name of your driver, see https://github.com/guibou/nixGL

@stale
Copy link

stale bot commented Jun 5, 2021

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

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 5, 2021
@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jun 5, 2021

Is this still an issue?

@magnetophon
Copy link
Member Author

In case it wasn't clear: for me, it cleared up.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 5, 2021
@vcunat
Copy link
Member

vcunat commented Jun 5, 2021

OK, let's close at least until it's reproduced.

@vcunat vcunat closed this as completed Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants