Closed tad-lispy closed 9 months ago
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/webgl-stopped-working-in-firefox-after-nixos-upgrade/25487/2
Is this still a problem?
Is this still a problem?
For me yes.. On mesa-amber driver i got the same result on firefox 112 and for glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
intel_do_flush_locked failed: Invalid argument```
glxinfo | grep "OpenGL version"
OpenGL version string: 1.4 Mesa 21.3.9 Amber
For me it eventually got fixed after some updates. Probably with a new kernel version. I'm sorry I can't provide any more details. Good luck @MadDogMayCry0 !
I'm having a similar issue. I'm using nix (not on nixos). The firefox version of the system supports webgl, but the one installed with nix doesn't
Is this an issue that just needs someone to step up and tackle or is the current group maintaining the package genuinely stumped on the problem? I only ask because this is something that affects me daily running Nix on stock Ubuntu. I really love Nix and hate to see my setup fail on something so important to daily operations as Firefox. So if this needs a champion, I'll start looking into it!
If WebGL isn't working it likely isn't able to find your graphics drivers. I'm personally only use NixOS, so I can't reproduce.
Can we first make sure, that libva can find your driver?
nix shell nixpkgs#libva-utils -c vainfo
Then check the following issue for how to get some logs from Firefox wrt driver selection through the use of VAAPI hardware decoding of videos.
In my case:
❯ nix shell 'nixpkgs#libva-utils' -c vainfo
Trying display: wayland
Trying display: x11
libva info: VA-API version 1.20.0
libva error: vaGetDriverNames() failed with unknown libva error
vaInitialize failed with error code -1 (unknown libva error),exit
So, presumably, this means that libva
isn't finding my driver.
As for firefox logs, I'm not sure what I'm looking for, but I can see this at the very top:
❯ MOZ_LOG="PlatformDecoderModule:5" firefox
[GFX1-]: glxtest: libEGL no displayERROR
...
Other lines seem mostly related to audio.
See https://github.com/NixOS/nixpkgs/issues/272269#issuecomment-1841048492 if you are not on NixOS.
See #272269 (comment) if you are not on NixOS.
This ended up being the solution for me. Specifically using NixGL as mentioned a little further down in this comment. What I ended up with isn't quite as seamless or repeatable as I'd like, but the other issue seems more focused around this.
Thanks for the feedback. I'll close here, as this issue has served its purpose twice over after mixing various environments with different root causes.
This is my output:
❯ nix shell 'nixpkgs#libva-utils' -c vainfo
Trying display: wayland
Trying display: x11
libva info: VA-API version 1.20.0
libva info: Trying to open /run/opengl-driver/lib/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib32/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva error: dlopen of /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so failed: libigdgmm.so.12: cannot open shared object file: No such file or directory
libva info: Trying to open /usr/lib/i386-linux-gnu/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /run/opengl-driver/lib/dri/i965_drv_video.so
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Trying to open /usr/lib32/dri/i965_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva error: dlopen of /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so failed: libdrm_intel.so.1: cannot open shared object file: No such file or directory
libva info: Trying to open /usr/lib/i386-linux-gnu/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
Set hardware.opengl.enable = true;
on NixOS.
I've just updated my NixOS and WebGL stopped working in Firefox. It still works in Chromium. Previous generation, where it works is 5 days old. The version of Firefox is the same (109.0.1 (64-bit)).
For example, this page http://webglsamples.org/aquarium/aquarium.html displays this to me:
and a bunch of warnings in the console:
And my own project at https://tad-lispy.gitlab.io/bevy-lion-playground/ gives following errors:
Here's a diff of a dump from
about:support
in Firefox on working vs broken generation:@lovesegfault @mweinelt
Metadata
"x86_64-linux"
Linux 6.1.11, NixOS, 23.05 (Stoat), 23.05pre454549.545c7a31e5d
yes
yes
nix-env (Nix) 2.13.2
"nixos"
"home-manager, nixpkgs"
/home/tad/.nix-defexpr/channels/nixpkgs