Firefox on RISCV-64 fails to detect GPU and falls back to software rendering
0
votes
0
answers
21
views
I have built Firefox for RISCV-64 architecture on Wayland in Ubuntu 22.
sudo apt-get update
Dependency packages:-
sudo apt-get install -y curl libnspr4 libgtk-3-dev python3-dev llvm-14 llvm-dev libnspr4-dev clang libclang-dev libx11-xcb-dev libevent-dev libdbus-glib-1-dev m4 meson ninja-build libssl-dev libxcb-glx0-dev libxkbcommon-dev libgtk-3-dev libxcb-dri2-0-dev libvpx-dev libnss3-dev
pip install -U pip
pip install -U meson
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
cargo install sccache
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
echo 'export RUSTC_WRAPPER="sccache"' >> ~/.bashrc
echo 'export SCCACHE_DIR="$HOME/.cache/sccache"' >> ~/.bashrc
echo 'export SCCACHE_CACHE_SIZE="10G"' >> ~/.bashrc
source ~/.bashrc
cargo install cbindgen
nodejs(v17.1.0)
cairo version upgrade (1.16.0 -> 1.18.4)
git clone --branch FIREFOX_139_0_4_RELEASE --single-branch --depth 1 https://github.com/mozilla-firefox/firefox.git
cd firefox
-> apply the patch related to riscv64
vi mozconfig
mk_add_options MOZ_PARALLEL_BUILD=4
ac_add_options --enable-optimize=-O3
ac_add_options --enable-application=browser
ac_add_options --with-app-name=firefox
ac_add_options --disable-release
ac_add_options --enable-hardening
ac_add_options --enable-rust-simd
ac_add_options --enable-linker=bfd
ac_add_options --disable-bootstrap
ac_add_options --enable-official-branding
ac_add_options --with-branding=browser/branding/official
ac_add_options --enable-update-channel=release
ac_add_options --with-unsigned-addon-scopes=app,system
ac_add_options --allow-addon-sideload
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland
ac_add_options --with-system-zlib
ac_add_options --enable-strip
ac_add_options --enable-system-ffi
ac_add_options --with-system-libevent
ac_add_options --with-system-nspr
ac_add_options --disable-updater
ac_add_options --disable-tests
ac_add_options --enable-alsa
ac_add_options --without-wasm-sandboxed-libraries
ac_add_options --with-system-libvpx
ac_add_options --with-ccache=sccache
ac_add_options MOZ_WEBRENDER=1
MOZ_APP_REMOTINGNAME=Firefox
export LDFLAGS="$LDFLAGS -L/usr/local/lib/riscv64-linux-gnu -L/usr/local/lib -lcairo -lX11 -lXext -lfreetype -lEGL -lGLESv2"
export CFLAGS="$CFLAGS -I/usr/local/include -I/usr/local/include/cairo -I/usr/local/include/freetype2"
export MOZ_ACCELERATED=1
export LIBVA_DRIVERS_PATH=/usr/lib/riscv64-linux-gnu/dri
sudo chown -R $USER:$USER /home/user/firefox
./mach vendor rust --ignore-modified
./mach build
I followed these steps to build my firefox
Actual results:
However, it is failing to detect my Mesa GPU driver.When I checked the
and during startup, i am getting the following logs
Can someone help me to resolve this issue?
about:support
page in Firefox,under the Graphics section, the composition is listed as WebRender(software), the WebGL driver information is missing, and although the GPU is shown as active, no description is provided.
Expected results:
Firefox Should detect my GPU Mesa driver and Compositing should show Webrender (hardware),WebGL 1 Driver & WebGL 2 Driver information should be correctly listed and GPU details should display correct.
Are there any code changes are required for firefox which is purely built on egl backend on wayland platform?
Asked by Saiteja
(1 rep)
Jul 25, 2025, 05:32 AM
Last activity: Jul 29, 2025, 06:13 PM
Last activity: Jul 29, 2025, 06:13 PM