jlesage / docker-firefox

Docker container for Firefox
MIT License
1.42k stars 267 forks source link

hardware acceleration not working #124

Closed joraCardan5 closed 1 year ago

joraCardan5 commented 2 years ago

Hi!

Great container. but I've noticed hwa is not working so neither dependent features like WebGL.

On linux host with intel integrated graphics I've shared /dev/dri as suggested on some forums, but that didn't work, I think something else is missing - in about:support it still shows WebRender (software)

Any suggestions on this?

Thanks, Daniel

mrtnd commented 1 year ago

Hi great container!! Use it on daily basis.

I have also tried to enable HWA by exposing /dev/dri to the container but that did not do the trick as mentioned by @joraCardan5

mrtnd commented 1 year ago

just checked if the mesa driver is installed. It wasn't. From inside the container run apk update && apk add mesa-dri-gallium. with the driver installed, WebGL Driver is recognized in about:support. @jlesage can you add it with the next release?

jlesage commented 1 year ago

@mrtnd, do you still get software rendering with the driver installed ?

mrtnd commented 1 year ago

@mrtnd, do you still get software rendering with the driver installed ?

Hi, yes just installing the driver wont enable HW acceleration. They are some settings that need to be enabled in about:config. They are still not enabled by default on some linux systems. Set layers.acceleration.force-enabled and gfx.webrender.all to true. Make sure gfx.webrender.software is set to false. If this is set to true, the cpu is used for rendering.

PS: This only applies for Intel based gpus. I not sure what driver/settings are needed for AMD or NVIDIA Graphic cards.

joraCardan5 commented 1 year ago

@mrtnd, do you still get software rendering with the driver installed ?

Hi, yes just installing the driver wont enable HW acceleration. ...

Thank you very much, it works, and now I finally have hwa and web gl working. Case solved, thanks