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 installed by home-manager doesn't start: could not initialize GLX #1315

Closed
JonathanReeve opened this issue Jun 9, 2020 · 7 comments

Comments

@JonathanReeve
Copy link
Contributor

Issue description

With programs.qutebrowser.enable = true, and using home-manager on Ubuntu, qutebrowser doesn't start, complaining that it can't initialize GLX.

To be honest, I don't really want home-manager to manage my installation of Qutebrowser, which is probably better done by my system—I just want it to manage my Qutebrowser configs. It'd be great if it were possible to have one but not the other.

FWIW, I can run Qutebrowser through my host system just fine, with /usr/bin/qutebrowser. But home-manager's version doesn't work.

The full error message is:

(process:23413): Gtk-WARNING **: 22:34:37.925: Locale not supported by C library.
	Using the fallback 'C' locale.
Gtk-Message: 22:34:37.926: Failed to load module "appmenu-gtk-module"
Gtk-Message: 22:34:38.059: Failed to load module "canberra-gtk-module"
Gtk-Message: 22:34:38.060: Failed to load module "canberra-gtk-module"
22:34:38 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)
22:34:38 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)
22:34:38 CRITICAL: Could not initialize GLX
Fatal Python error: Aborted

Current thread 0x00007f591b673240 (most recent call first):
  File "/nix/store/910621igsv9ihfjw27bjw6d0clxaadra-qutebrowser-1.12.0/lib/python3.7/site-packages/qutebrowser/app.py", line 478 in __init__
  File "/nix/store/910621igsv9ihfjw27bjw6d0clxaadra-qutebrowser-1.12.0/lib/python3.7/site-packages/qutebrowser/app.py", line 92 in run
  File "/nix/store/910621igsv9ihfjw27bjw6d0clxaadra-qutebrowser-1.12.0/lib/python3.7/site-packages/qutebrowser/qutebrowser.py", line 203 in main
  File "/nix/store/910621igsv9ihfjw27bjw6d0clxaadra-qutebrowser-1.12.0/bin/.qutebrowser-wrapped", line 9 in <module>
fish: 'qutebrowser' terminated by signal SIGABRT (Abort)

Technical details

  • system: "x86_64-linux"
  • host os: Linux 5.4.0-7634-generic, Pop!_OS, 20.04 LTS
  • multi-user?: no
  • sandbox: yes
  • version: nix-env (Nix) 2.3.6
  • channels(jon): "home-manager, nixpkgs-20.09pre228453.dcb64ea42e6"
  • nixpkgs: /home/jon/.nix-defexpr/channels/nixpkgs
@wedens
Copy link

wedens commented Jun 9, 2020

That's a general problem with gpu drivers in Nix on non-NixOS. You can try https://github.com/guibou/nixGL/ as a workaround.

@wedens
Copy link

wedens commented Jun 9, 2020

Your other options are:

  1. Use home-manager to just copy config file in the original format to expected place: xdg.configFile."qutebrowser/config.py".source = ./config.py;

  2. Continue using Nix as a config format and override (e.g. add to an overlay) qutebrowser derivation with a stub that just invokes non-Nix qutebrowser:

self: super: {
  qutebrowser = pkgs.writeShellScriptBin "qutebrowser" ''
    /usr/bin/qutebrowser "$@"
  '';
}

It's kinda dirty, but should work as long as no files from original derivation are required.

@JonathanReeve
Copy link
Contributor Author

Ah. I guess I can just override the .desktop file. What'd be great though is if there were a way to skip installation of the package. Something like qutebrowser.installBinary = false.

@teto
Copy link
Collaborator

teto commented Jun 10, 2020

some modules have a package option that can be set to null.

@JonathanReeve
Copy link
Contributor Author

JonathanReeve commented Jun 10, 2020 via email

@wedens
Copy link

wedens commented Jun 13, 2020

JonathanReeve added a commit to JonathanReeve/home-manager that referenced this issue Jun 15, 2020
This will allow users of Nix on non-NixOS to specify None as their
qutebrowser package, thereby allowing them to use home-manager to handle
their qutebrowser config, while running their system-wide installed copy
of qutebrowser instead of the Nix-installed one.

This is necessary, because of what is described in nix-community#1315: sometimes
Nix-installed Qutebrowser fails to start, because of GLX issues.

Fixes nix-community#1315.
@JonathanReeve
Copy link
Contributor Author

Ok I'm not an expert in Nix, but PR #1334 is my attempt at that.

@rycee rycee closed this as completed in ad4f33c Jun 15, 2020
colemickens pushed a commit to colemickens/home-manager that referenced this issue Jun 24, 2020
colemickens pushed a commit to colemickens/home-manager that referenced this issue Jun 27, 2020
colemickens pushed a commit to colemickens/home-manager that referenced this issue Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants