12 ms·
Firefox 94 to start using EGL on Linux
- encryptluks2 5y agoAbout time. I don't know why, but for me in Linux Chromium has had much better performance than Firefox. Maybe this will help.
- gtirloni 5y agoI think Chrome/Chromium don't use hw acceleration on Linux, right?
- eptcyka 5y agoIt does, if it deems your drivers good enough.
- Comevius 5y agoWith Chromium 95 and Nvidia 470.74 driver for me hardware acceleration is enabled for canvas, and can be enabled for rasterization. For video decode it can be enabled, but it's VA-API, which is not supported by Nvidia. Vulkan can be enabled. GpuMemoryBuffers is software only.
- fubbyy 5y agoHave you tried vulkan? Curious if it offers any performance benefits.
- encryptluks2 5y agoActually, that is one the main reasons I get better performance on Chromium is because you can use HW acceleration. I just use some of the settings documented in the Arch wiki. Firefox isn't terrible, but there is a noticeable startup lag and I get random freezes a lot more often.
- flipbrad 5y agoThe only websites I've noticed Chromium having an advantage, are those run by or embedding Google content (eg Google maps)
- exyi 5y agoIt also seems to me. At least it motivates me to use anything which is not owned by Google :]
- iotku 5y agoAt this point I have enough confidence in Google's developers to consider bad performance in Firefox not an accident.
- watermelon0 5y agoIt's much more believable that they are developing with Chromium in mind, and testing primarily on it. I've seen many webapps that are completely unrelated to Google, that are more performant on Chromium browsers, just because most developers are using them for development. It's also easier to justify spending time fixing bugs/improving performance if it affects the majority of users, instead of spending effort for 4% of users.
- dralley 5y agoGoogle has, in the past, made YouTube reliant on non-standard browser APIs and shipped a polyfill for other browsers that had terrible performance. It's not just that they passively focus on Chromium, they will deliberately trash performance on every other browser without a second thought.
- diegocg 5y agoGoogle didn't have much of a choice. It's either a polyfill or not supporting Firefox at all. Or having two different frontends, or stopping feature development to make Firefox developers happy. Which are terrible choices. And going beyond of what standards offer is pretty much how web evolution had always happened.
- mhd 5y agoFor a while. Wirth's Law still applies. Web developers will find further ways to mess up rendering some basic shapes and letters.
- marginalia_nu 5y agoI think firefox has cache management problems. I got to the point where even opening an nginx test page off localhost took 1-2 seconds, but clearing the cache seems to have fixed it back to tolerable levels again.
- lobocinza 5y agoIf you can afford, just set on disk cache to 0 and increase on memory cache. Firefox have bad defaults.
- butz 5y agoAs Firefox is lagging a bit with new feature implementation, Chromium based browsers usually are using native implementation that is faster and Firefox is left using slower polyfills. And web app developers sure love using most recent web browser features and APIs.
- cute_boi 5y agowell most api that is not implemented in firefox has high probably of not being implemented in safari too. So I don't think web app developer should use recent web browser features and API that is available in chromium browser only. 20-30% represent a large number of users so I think devs should show more pragmatism.
- deleted 5y ago[deleted]
- darthrupert 5y agoThis won't help. Firefox's latency problems seem to be deeper.
- hedgehog 5y agoDoes anyone know if this will make Firefox on headless setups (like Xvfb + VNC) work better?
- morsch 5y agoWill you be affected? Here's the gist from the article: As of Firefox 94, users using Mesa driver >= 21 will get it by default. Users of the proprietary Nvidia driver will need to wait a little bit longer as the currently released drivers lack an important extension. However, most likely we’ll be able to enable EGL on the 470 series onwards. DMABUF support (and thus better WebGL performance) requires GBM support and will be limited to the 495 series onwards. Ubuntu 21.10 currently comes with the 470 series driver.
- mnd999 5y agoEven Arch doesn’t ship the 495 yet. It’s coming though.
- Svenstaro 5y agoWell in Arch we have the drivers in testing with an extended period to give users a chance to report issues. You can already get them and help us test! We'll likely move them next week.
- 5e92cb50239222b 5y agoYou're doing God's work. I don't use nvidia drivers, but do enjoy my Arch Linux installations very much. They are always up to date, but very rarely break in practice (IME, YMMV). Thanks for everything you do.
- lipnitsk 5y agoIt does now: https://github.com/archlinux/svntogit-packages/commits/packages/nvidia/trunk https://github.com/archlinux/svntogit-packages/commits/packa...
- smitty1e 5y agoFor those needing an EGL LEG-up: https://en.wikipedia.org/wiki/EGL_(API) https://en.wikipedia.org/wiki/EGL_(API)
- tombh 5y agoNote that Wayland users are already using EGL in Firefox, so I don't think this makes any difference to them?
- kzrdude 5y agoDoes Firefox ship one binary that can do both X and Wayland? How do they probe for it?
- maxnoe 5y agoThere are env variables set by the session
- Scramblejams 5y agoHow can one tell if Firefox is already using EGL?
- sweetsocks21 5y agoIf you go to about:support and scroll to the end of the graphics section you should see two entries: X11_EGL DMABUF and should say something like "available by default"/enabled or similar wording. Otherwise it'll either say unsupported/disabled or will be missing.
- deleted 5y ago[deleted]
- lucb1e 5y agoHow do you change those? This is something I remember trying to look up some time ago (to set PATH also for the Alt+F2 'run command' dialog in Cinnamon) but I didn't find it.
- md8z 5y agoWayland uses WAYLAND_DISPLAY, X uses DISPLAY.
- dathinab 5y agoUh, through this article I noticed that I missed a juicy but if news: Nvidea seems to jump on the GBM wagon, at least for some GPUS.
- 1_player 5y agoYes, the latest stable version 495 has GBM support.
- lucb1e 5y agoFor anyone else as uninitiated as me: > Generic Buffer Management (GBM) is an API that provides a mechanism for allocating buffers for graphics rendering tied to Mesa. GBM is intended to be used as a native platform for EGL on DRM or openwfd. The handle it creates can be used to initialize EGL and to create render target buffers. Where > The Direct Rendering Manager (DRM) is a subsystem of the Linux kernel responsible for interfacing with GPUs of modern video cards. DRM exposes an API that user-space programs can use to send commands and data to the GPU https://en.wikipedia.org/wiki/Mesa_(computer_graphics)#Generic_Buffer_Management https://en.wikipedia.org/wiki/Mesa_(computer_graphics)#Gener... and https://en.wikipedia.org/wiki/Direct_Rendering_Manager https://en.wikipedia.org/wiki/Direct_Rendering_Manager What does it mean for nvidia to jump on the GBM bandwagon? Firefox would just talk (perhaps via some intermediate API like EGL or BGM) to the Linux kernel for talking to an nvidia card, if I understand it correctly?
- yissp 5y agoWith the proprietary driver, the GPU is controlled by their closed-source kernel module, so Mesa's GBM code wouldn't know how to talk to it. However, as of the latest version, NVIDIA is shipping a GBM back-end library that Mesa can load which is able to talk to their module.
- nextaccountic 5y agoBut what does this mean for applications that use Vulkan?
- bno1 5y agoI already force-enabled EGL in firefox 93 on Arch Linux with the 470.74 nvidia driver, and the performance is stellar compared with what it used to be. Before EGL all desktop applications (including firefox) would stutter when a video was playing in firefox. I did not encounter any bugs so far.
- __s 5y agoReading linked issue, it seems like you might run into issues after suspend/resume
- bno1 5y agoNow that you mention, I did have an issue after a suspend. All text was missing inside firefox, restarting it resolved the issue. But I keep my laptop plugged in and open 99% of the time with presentation mode enabled, so this is extremely rare for me.
- fghjfghk 5y agoIt seems to pretty consistently break after suspend, with the text looking like an ms-dos machine with bad vram. I enabled EGL in response to seeing your comment this morning, then found myself having to turn it back off after the very first suspend/resume.
- vzaliva 5y agoI thought video playback is not using OpenGL.
- ronjouch 5y agoVideo playback is accelerated in many apps, for example VLC 3.x defaults to it. In web browsers, things are more delicate because videos live within the complex context that is a webpage -with its own layer of hardware acceleration!-, and failures can be brutal depending on your browser, hardware and driver quality (crashes, video corruption, etc). The pain-in-the-ass-ness to enable it on a given browser varies with time and browser/OS and along regressions, stack changes, and maintainer priorities. From personal experience during the past years, it has never been great on Linux: - In Firefox, regressions have been frequent. - In Chrome, the feature is here but Google disables it at build time in their official builds (my personal intuition is that they do enable it for their Chromebooks, but they don't want to support the wild west of broader Linux configuration and old/broken driver fun). However, out of official Chrome builds, several distributions builds (Arch, Debian) of Chromium now enable it at build time, so it's possible to try to use it. So, it's finnicky to enable, but sometimes feasible, until it's no longer :D . To give it a try on a Linux box, the well-maintained Arch wiki is what you want (and these sections are mostly not specific to Arch): - Firefox: https://wiki.archlinux.org/title/Firefox#Hardware_video_acceleration https://wiki.archlinux.org/title/Firefox#Hardware_video_acce... - Chrome: https://wiki.archlinux.org/title/Chromium#Hardware_video_acceleration https://wiki.archlinux.org/title/Chromium#Hardware_video_acc...
- skohan 5y agoI'm not really sure what EGL is, but will Vulkan also run on top of EGL?
- jabl 5y agoVulkan has WSI, which is roughly equivalent to GLX or EGL in the OpenGL world. https://github.com/KhronosGroup/Vulkan-Guide/blob/master/chapters/wsi.adoc https://github.com/KhronosGroup/Vulkan-Guide/blob/master/cha...
- account42 5y agoGLX and EGL have two roles, one is the WSI part, the other is context creation and device enumeration which Vulkan had the good sense to add to the core standard.
- ZiiS 5y agoNo Vulkan dose not need/use EGL. It nativity talks to Wayland/X11.
- johnvega 5y ago"For most cases, you do all the actual rendering work in GL or GLES contexts, which you create with WGL, CGL, GLX, or EGL, depending on your platform. GL and GLES do the actual rendering. EGL and friends are basically just the glue layer to get things to the screen. (Well, to the window manager)" https://www.reddit.com/r/opengl/comments/11q0oz/what_is_the_difference_between_eglglxogl_and_gles/ https://www.reddit.com/r/opengl/comments/11q0oz/what_is_the_...
- matheusmoreira 5y ago> EGL and friends are basically just the glue layer to get things to the screen. (Well, to the window manager)" EGL can also be used directly with kernel mode setting and buffer management. No window managers necessary! A simple example I found: https://github.com/siro20/XlessEGL/blob/master/eglkms.c https://github.com/siro20/XlessEGL/blob/master/eglkms.c
- solarkraft 5y ago> For OpenGL on X11 most programs use GLX, while its successor, EGL, gets used on Wayland, Android and in the embedded space The headline is kind of wrong, then. This is about X11. Firefox on modern (Wayland) desktops is already using EGL.
- CameronNemo 5y agoThat's too bad. My WebGL performance is pretty bad.
- 1over137 5y agoDoes this affect the BSDs at all?
- floatboth 5y agoYes, nearly everything about "Linux" in Firefox applies to BSD.
- grahamjperrin 5y ago"if someone has an HN account the answer to https://news.ycombinator.com/item?id=29049511 https://news.ycombinator.com/item?id=29049511 is works fine on freebsd" – IRC, #freebsd-desktop https://matrix.to/#/!KYWCpFvqYdeGYJdkxS:libera.chat/$ZOJrjgpxr5pyOIU79RDTeMEgBV9HcyFFTBugMM4wbSI?via=libera.chat&via=matrix.org&via=sergiusens.org https://matrix.to/#/!KYWCpFvqYdeGYJdkxS:libera.chat/$ZOJrjgp...
- vzaliva 5y agoI am curious to see benchmarks on promised improved perofmance and reduced battery usage. Are there any?
- superkuh 5y agoFirefox has become an excellent operating system but somewhere along the way it became a pretty marginal browser. Still, getting hardware acceleration working on linuxes was serious work and it's not like this guy would've been fixing the UI issues created in recent version if he wasn't doing this.
- snuser 5y agoI may be weird but I really like the new UI
- ldng 5y ago"Reduced power consumption" I can't wait to see that actually happen because ... man Firefox and Chrome have both become quite the power and memory hogs !
- loxias 5y agoI read this and my first thought is "oh shit, is Firefox about to stop working?" some of us like our software to be stable and reliable, and not switch to the newest bullshit just because they can. I'm still bitter about being forced to find a workaround for FF requiring pulseaudio. Am I now gonna need to find a workaround for this? I run FF 94 right now, and will upgrade with trepidation... (shoutout to https://github.com/i-rinat/apulse https://github.com/i-rinat/apulse. THANKS.)
- grahamjperrin 5y agoNo.
- phendrenad2 5y agoWhat's EGL?
- usr1106 5y agohttps://en.wikipedia.org/wiki/EGL_(API) https://en.wikipedia.org/wiki/EGL_(API) Reading that helps a bit, but you still won't understand the complicated graphics stack without prior knowledge. Is there a good introduction that systematically goes through all (or most) of the components for the average Python, C, database etc. programmer who knows absolutely nothing about computer graphics? Edit: See also thread https://news.ycombinator.com/item?id=29048815 https://news.ycombinator.com/item?id=29048815
- phendrenad2 5y agoYeah I guess it won't make sense without more context, I.E. understanding the rest of the graphics systems on a computer. It seems like it's a standardized interface for a windowing library like wayland/x11 to talk to a graphics driver, specifically for setting up regions of the screen which will be rendered into by something (opengl etc.)? So there were non-standard ways before?
- usr1106 5y agoWell, before there was only X11 in the Unix/Linux world. And the mechanism was GLX. It had different implementations over nearly 30 years: https://en.m.wikipedia.org/wiki/GLX https://en.m.wikipedia.org/wiki/GLX