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

{tor,mullvad}-browser: add support for GPU acceleration #267085

Merged
merged 2 commits into from Nov 21, 2023

Conversation

felschr
Copy link
Member

@felschr felschr commented Nov 12, 2023

Description of changes

Previously Tor/Mullvad Browser didn't have support for GPU acceleration.
On about:support under Compositing it would show WebRender (Software) and there were a lot of occurrences of FEATURE_FAILURE_GLXTEST_FAILED.

I've added neccessary dependencies for GPU acceleration as well as some new dependencies & options to better support Wayland, Pipewire & VA-API.

I also added autoPatchelfHook to fix glxtest, which threw an error before on startup of the browser, which could be seen in the console:

mullvad-browser
[GFX1-]: FireTestProcess failed: Failed to spawn child process “/nix/store/4irsfq4c6jhlvikr6i93gm0bq8q2nlrf-mullvad-browser-13.0.1/share/mullvad-browser/glxtest” (No such file or directory)

Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: ManageChildProcess failed
 (t=0.246357) [GFX1-]: glxtest: ManageChildProcess failed

Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: ManageChildProcess failed
 (t=0.246357) |[1][GFX1-]: No GPUs detected via PCI
 (t=0.246385) [GFX1-]: No GPUs detected via PCI

After these changes Compositing in about:support will show up as WebRender & all FEATURE_FAILURE_GLXTEST_FAILED (except for the *.failureid settings) are gone.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Support GPU acceleration for WebRender & VA-API.
@felschr felschr requested a review from panicgh November 12, 2023 18:13
@felschr
Copy link
Member Author

felschr commented Nov 12, 2023

Result of nixpkgs-review pr 267085 run on x86_64-linux 1

2 packages built:
  • mullvad-browser
  • tor-browser

Support GPU acceleration for WebRender & VA-API.
@felschr felschr changed the title {tor,mullvad}-browser: support GPU acceleration {tor,mullvad}-browser: add support for GPU acceleration Nov 12, 2023
@felschr
Copy link
Member Author

felschr commented Nov 12, 2023

Should've mentioned that my system uses an AMD Radeon RX 6700 XT.
Perhaps someone with an Intel or NVIDIA system could check if this works for them.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/1016/77

@mweinelt mweinelt merged commit ed5534c into NixOS:master Nov 21, 2023
28 checks passed
Copy link
Contributor

Successfully created backport PR for release-23.05:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants