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

Firefox no WebGL and no audio (both firefox-esr and firefox) #272269

Closed
ghost opened this issue Dec 5, 2023 · 13 comments
Closed

Firefox no WebGL and no audio (both firefox-esr and firefox) #272269

ghost opened this issue Dec 5, 2023 · 13 comments

Comments

@ghost
Copy link

ghost commented Dec 5, 2023

Describe the bug

Firefox is neither able to play WebGL content nor play audio (nix installed on debian).

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install nix on most recent debian (here WSL is used, both audio and WebGL work when installing firefox-esr via apt-get) via "sudo nix-shell -p firefox-esr"

Expected behavior

WebGL and audio should play correctly. Also, there seems to be a font issue, since firefox only displays question marks.

Notify maintainers

@mweinelt
@lovesegfault

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.133.1-microsoft-standard-WSL2, Debian GNU/Linux, 12 (bookworm), nobuild`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.8.0`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/root/.nix-defexpr/channels/nixpkgs`
@ghost ghost added the 0.kind: bug label Dec 5, 2023
@ghost ghost changed the title Firefox no WebGL and no audio Firefox no WebGL and no audio (both firefox-esr and firefox) Dec 5, 2023
@mweinelt
Copy link
Member

mweinelt commented Dec 5, 2023

Can you test firefox-bin and check if that makes things work for you?

I'm a bit worried about supporting WSL. It is not an environment I'm able to test.

@ghost
Copy link
Author

ghost commented Dec 5, 2023

Of course, but I do not think this is a WSL issue. Installing firefox-bin does not solve either issue. Running normally and it works like a charm.

@ghost
Copy link
Author

ghost commented Dec 5, 2023

Update: Installing nix not via apt-get (as done previously) but as single-user installation (as described on the homepage) resolves the audio problem. The lack of WebGL continues, though (both firefox and firefox-bin)

Is this log message relevant?
[GFX1-]: glxtest: libEGL no displayERROR

@mweinelt
Copy link
Member

mweinelt commented Dec 5, 2023

Yeah, it is likely unable to find the graphics drivers for OpenGL support.

I'll expect vainfo to fail as well.

@ghost
Copy link
Author

ghost commented Dec 5, 2023

$ vainfo
Trying display: wayland
libva info: VA-API version 1.20.0
Segmentation fault

Do you think this is a WSL thing or a nix thing?
Why is it that the firefox audio works when installing as single-user but not when installed via apt-get?

@K900
Copy link
Contributor

K900 commented Dec 5, 2023

Graphics acceleration for Nix built applications requires extra setup on both non-NixOS and WSL. You're using both, so you need twice as much extra setup, and I don't think this kind of thing is documented anywhere.

Source: am NixOS-WSL maintainer.

@ghost
Copy link
Author

ghost commented Dec 6, 2023

Ok.
I have now dropped WSL, now running nix under native Debian, audio works, but WebGL is broken still.

@K900
Copy link
Contributor

K900 commented Dec 6, 2023

You need https://github.com/nix-community/nixGL for that.

@ghost
Copy link
Author

ghost commented Dec 6, 2023

You need https://github.com/nix-community/nixGL for that.

Can this be integrated by default? The used expects a working firefox browser after all

@K900
Copy link
Contributor

K900 commented Dec 6, 2023

There's basically no way to do this without issues. If we include our own graphics drivers, as nixGL currently does, it'll break on systems where the OS uses a different driver version (notably Nvidia). If we use the underlying OS' copy of the graphics drivers, that will cause weird linking errors and dependency mismatches. There's unfortunately no good solution here if you don't control the entire system.

@ghost
Copy link
Author

ghost commented Dec 7, 2023

Well the problem here is that I use nix for reproducible development environments and builds. Part of my build scenario consists in launching a firefox browser and testing some stuff via selenium. So far, this has worked like a charm, and I really like the reproducibility. Not supporting WebGL is however a big deal, because some of the test scenarios need a WebGL-enabled browser.

I try to circumvent the problem using nixGL, but fixing this issue would make things a lot easier.

@K900
Copy link
Contributor

K900 commented Dec 7, 2023

Well, if you have any specific ideas on how to fix it, please propose those.

@Aleksanaa
Copy link
Member

So this issue is generally #9415 and may be considered as a duplicate. If you don't have further problems, you can close this issue.

@ghost ghost closed this as completed Dec 18, 2023
This issue was closed.
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

3 participants