Slashdot Mirror


Why Linux Loses Out On Hardware Acceleration In Firefox

devtty writes with some bad news for Linux users, from OSNews: "The release notes for Firefox 4.0 beta 9 noted that it comes with hardware acceleration for Windows 7 and Vista via a combination of Direct2D, DirectX 9 and DirectX 10. Windows XP users will also enjoy hardware acceleration for many operations 'using our new Layers infrastructure along with DX9.' Furthermore, Mac OS X has excellent OpenGL support, they claim, so they've got that covered as well. No mention of Linux, and there's a reason for that. 'We tried enabling OpenGL on Linux, and discovered that most Linux drivers are so disastrously buggy (think "crash the X server at the drop of a hat, and paint incorrectly the rest of the time" buggy) that we had to disable it for now,' explains Zbarsky, 'Heck, we're even disabling WebGL for most Linux drivers, last I checked...'" An update to the story softens this news slightly, saying that "hardware acceleration (OpenGL only) on Linux has been implemented, but due to bugs and issues, only one driver so far has been whitelisted (the proprietary NVIDIA driver)."

34 of 456 comments (clear)

  1. Yes, as I've said many times.... by Burnhard · · Score: 3, Insightful

    Until graphics card manufacturers take Linux seriously, these problems are always going to occur. That's why it's stupid to use the argument that OpenGL is better than D3D because it's cross-platform. It's only cross-platform insofar as there is actually an implementation on Linux. After that, I'm wondering if it's better to use D3D and Wine instead of native GL!

    1. Re:Yes, as I've said many times.... by crafoo · · Score: 3, Interesting

      How can you lay this at the feet of the graphics card manufacturers? The closed source binary drivers (NVidia) work just fine. The open source ATI stuff is mostly junk. It's a bit unfair to say OpenGL is bad just because the open source guys can't implement it correctly in the Linux drivers.

    2. Re:Yes, as I've said many times.... by u17 · · Score: 4, Informative

      After that, I'm wondering if it's better to use D3D and Wine instead of native GL!

      Then I guess it will surprise you to know that Wine implements D3D on top of native OpenGL. If Firefox worked better on Wine, it would only mean that the Firefox developers can't write decent OpenGL code, but Wine developers can.

    3. Re:Yes, as I've said many times.... by Cyberax · · Score: 5, Interesting

      OpenSource guys know how to implement graphics drivers, but they're horribly understaffed.

      There are probably 50 times more closed source driver developers than OpenSource developers. The fact that they are able to do even what they do is amazing in its own right.

    4. Re:Yes, as I've said many times.... by beelsebob · · Score: 3, Informative

      After that, I'm wondering if it's better to use D3D and Wine instead of native GL!

      Wine, which implements D3D by translating it to OpenGL?

      Re your argument that it's not cross platform...
      D3D is available on at most 3 platforms – Windows, WiMo 7 and XBox
      OpenGL is available on Windows, Mac OS, Linux, iOS, Android, Playstation, Wii, Solaris, various BSDs, .........

      Just the fact that it runs on both windows and mac is enough, and the fact that one of the implementations is poor does not defeat this argument.

    5. Re:Yes, as I've said many times.... by diegocg · · Score: 5, Insightful

      Graphic cards manufacturers do take Linux seriously. At least Intel and AMD/ATI do, they contribute with open source drivers, engineers and even specs.

      And after years of supporting opensource drivers, they still suck. The problem is that a good quality graphic driver is really hard. It takes years and several engineers to write one, so often the drivers are late or incomplete. As if that wasn't bad enought, Linux has needed to rewrite big chunks of the graphic stack: KMS, and now Gallium3D, which force a kernel/mesa driver rewrite. And then there are other problems, like the fact that X sucks and graphic drivers have not been able to make Xrender really fast (some times toolkits seem to be faster using software than using Xrender; also Xrender doesn't reports which parts of its interface are hardware accelerated and which ones are using a software fallback which makes hard to trust it)

    6. Re:Yes, as I've said many times.... by TheRaven64 · · Score: 4, Informative

      I take it you only read the first half of the summary. They have an OpenGL version that works fine on Mac, and fine on Linux with the nVidia drivers. The problem is not that OpenGL is a difficult API to use, it's that the Linux drivers suck.

      --
      I am TheRaven on Soylent News
    7. Re:Yes, as I've said many times.... by TheRaven64 · · Score: 4, Informative

      I'm not sure if you're trolling or not. FreeBSD and Solaris have almost identical nVidia drivers to Linux - they have slightly different kernel shims, but they use the same blob. Most DRI drivers are also the same on Linux and FreeBSD, because they mostly run in userspace and are more dependent on X.org than the kernel (this is changing a bit with KMS).

      --
      I am TheRaven on Soylent News
    8. Re:Yes, as I've said many times.... by Cyberax · · Score: 4, Insightful

      There are independent OpenSource graphics developers who do an amazing job (thanks for r300, Corbin Simpson!). But there are too few of them, mostly because the whole area of graphics driver development is fairly specialized and complicated.

      PS: I'm a long-time lurker in Mesa IRC and mailing lists, and I'm planning to join Mesa development once I've more free time.

    9. Re:Yes, as I've said many times.... by Narishma · · Score: 4, Interesting

      Isn't it funny then that the vendor who, according to you, doesn't take Linux seriously, is the only one with working drivers?

      --
      Mada mada dane.
    10. Re:Yes, as I've said many times.... by TheLink · · Score: 3, Informative

      AMD's closed source drivers on windows suck too.

      --
    11. Re:Yes, as I've said many times.... by smash · · Score: 3, Insightful

      Delicious irony. I've been using nvidia cards for 10+ years mostly due to the driver support. Not just linux, ATI's drivers have sucked every time i've dealt with them on windows, too.

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    12. Re:Yes, as I've said many times.... by Yvanhoe · · Score: 5, Insightful

      And there are a few of us who get paid for coding open source software.
      But you are right, we do not exist, we should never be brought up in any conversation...

      --
      The Wise adapts himself to the world. The Fool adapts the world to himself. Therefore, all progress depends on the Fool.
    13. Re:Yes, as I've said many times.... by dicobalt · · Score: 3, Insightful

      Until Linux kernel developers take hardware manufacturers seriously these problems are always going to occur. See what I did there? The lack of good drivers is mostly attributed to the open driver developers not having access to the information they need in order to make a proper driver. That's obviously because NVidia/ATI do not want to give out their secrets. Can you really blame them? Linux needs a HAL that allows binary drivers to be plugged in with no recompiling, same as Windows has always done. Till that happens Linux will always have these type of problems because of the kernel having a childlike neediness to have everything recompiled just especially for that specific system. Nobody wants to acknowledge the need for full featured HAL.

    14. Re:Yes, as I've said many times.... by jadrian · · Score: 4, Interesting

      Just fine? KDE 4.5 and 4.6 (upcoming) crash on log in with nvidias drivers ver 260.xx.xx (on openSUSE 11.3 32bit?). Many other applications and applets also crash, particularly on 4.6 where krunner, amarok and search and launch activity are amongst the affected ones. This is one of the currently most reported bugs at the moment with a current dup count of 58! As if all this wasn't enough in 4.6 the window manager also almost immediately freezes until desktop effects are automatically disabled.

      So basically when you try KDE 4.6 on openSUSE 11.3 with updated nvidia drivers what happens is. You can't login due to desktop crash. If you fix that by removing the offending applets from the config files. On login Krunner crashes and keeps re-spawning and crashing. If you manage to kill it then desktop freezes and if all goes well effects are disabled. And if you get past then you can use it... without krunner, effects, and some of its best applications.

    15. Re:Yes, as I've said many times.... by morgan_greywolf · · Score: 5, Interesting

      Heh. NVidia obviously does take Linux serious, because they continue to put out good, working drivers with each subsequent release, and are obviously the only cards to get for Linux users that needs working, stable 3D, such as those doing 3D CAD.

      I've been using NVidia cards for more than 10 years and I've never had a single X server crash related to NVidia's drivers. The two times I tried AMD/ATI cards, I threw my hands up after numerous X server crashes.

    16. Re:Yes, as I've said many times.... by TheRaven64 · · Score: 5, Insightful

      That has nothing to do with the license. FreeBSD and Solaris both manage to maintain stable kernel ABIs, so upgrading the kernel typically doesn't require kernel modules to be recompiled. Linux breaks them for fun because Linux devs like making work for other people.

      Audio is equally amusing when you use Linux. On FreeBSD or Solaris, multiple apps can open /dev/dsp, can write audio, and can have independent volume controls, and it all just works. On Linux, you need to have a userspace daemon running to make this basic functionality work, and you need all of your code to agree on exactly which userspace daemon it should be...

      --
      I am TheRaven on Soylent News
    17. Re:Yes, as I've said many times.... by BasilBrush · · Score: 3, Insightful

      With the emphasis on "few".

    18. Re:Yes, as I've said many times.... by Ash+Vince · · Score: 3, Insightful

      As far as I know, it needs the card manufacturers to commit. I don't believe they "open source" all of their low level specs.

      That would be true, if the drivers they release were the ones causing the problem. The last time I checked ATI had open sourced all their specs and it is their driver that sucks. The other major graphics card manufacturer is Nvidia and the get a mention for producing a working OpenGL driver.

      I know that their are lots of security issues with the Nvidia proprietary driver supposedly, but I have a sneaky feeling this is because more of the open source community look for a stick to beat nvidia with to try and encourage them to open source their driver. I also think that purely theoretical security issues that only give root to a normal user are not such an issue on single user desktops that are the most likely machines to need graphics acceleration (Personally I disable X on servers).

      I used to love ATI cards until I started using Linux. Then I found the Nvidia driver was far more stable than the ATI drivers by bitter experience. This was back in the days when both were closed source but until I start reading things about Nvidia having more issues on Linux than ATI I will stick with what works best. I have never had a single issue with the NVidia closed source driver in the past 7 years.

      Open source or closed does not matter to me if only one works correctly. I think many end users of computers are of a similar mindset.

      --
      I dont read /. to RTFA, I read /. to offend people in ignorance.
    19. Re:Yes, as I've said many times.... by TheRealGrogan · · Score: 3, Informative

      I too like the Linux Nvidia driver (ignoring the ideology) and they sure do a good job supporting different kernel versions and X. Nobody does a proprietary driver better than Nvidia. Get a new -rc kernel? If the current version doesn't build and link in, and there's no beta that covers it, there's probably someone already in the forums who has a patch or code snippet that will make you happy again.

      However, the proprietary ATI driver is no longer the length of turd that it used to be. They haven't quite got it together like Nvidia does in terms of supporting diverse Linux systems, but I haven't suffered too much at their hands in the year or so that I've had a Radeon HD 5870.

      On my current rig I opted for an ATI card, because I hated my last Nvidia card: 9800 GX2 which was buggy in a lot of my Windows games and died 17 months after purchase. (It was an "OCX" model from BFG though, factory overclocked. It ran very, very hot, even with the fan at 100% during gaming and it doesn't take a rocket scientist to suspect that it got damaged. I burned for the lifetime BFG warranty too because they went out of business. That was a $600 video card. Even that is partly my fault for procrastinating though.)

      I wasn't sorry, I have been very happy with the ATI 5870 in Windows 7, and I've managed to do OK with the proprietary ATI driver. It always needs patching though... three ATI driver versions have gone by and it STILL doesn't build for Linux 2.6.36.x or 2.6.37. (I use --buildpkg Slackware/All to make slackware packages) Fortunately the kernel parts haven't changed that much and the patches can be easily adjusted. That's still pretty piss poor maintenance on their part, but at least it's not an untenable situation for me.

      The end result has been great though. In fact, for what I do with 3D acceleration in Linux, older games like UT2004, Quake 4, Doom 3 and friends as well as things like Sauerbraten, it's as good as or better than Nvidia (e.g. No glitches in UT2004). I think that 2D acceleration has been better than Nvidia as well.

      For a browser, 2D is more important anyway at this time. I know that since I switched to Firefox 4 in Linux (I'm using sources I got using Mercurial a few days ago, it says 4.0b10pre) that long Slashdot threads load up a lot faster, and no longer make the browser unresponsive while they are rendering. They also scroll effortlessly.

      So I'm assuming that I have better 2D acceleration with Firefox 4 than Firefox 3.6.

    20. Re:Yes, as I've said many times.... by jmorris42 · · Score: 5, Insightful

      That would be stupid and fatal long term. We would never again see Linux lead the way anywhere if we hitched ourselves to Microsoft's trailer hitch. All this new push to ARM would have never been possible had not Linux lead the way there and created a potential market large enough to get Microsoft to follow. Your idea would have forever tied us to x86.

      NVidia has a top tier 3D driver now because high dollar workstation users these days use Linux instead of legacy UNIX. That means there is money in keeping their drivers good enough to keep those super high margin cards moving out of their factory and not AMD/ATI's. But AMD wants in, not only there but on desktops and lacking the development resources are instead opening the specs. So be patient and soon we will have two hight quality options. Intel is already supplying fair driver support but they just don't compete well on the hardware.

      Had we somehow adopted the Microsoft driver model (heavy emphasis on the somehow) none of this progress would have happened.

      --
      Democrat delenda est
  2. Wine players already knew that. by Endimiao · · Score: 3, Interesting

    There are plenty of games that would be a bother to play via wine were it not for the Nvidia drivers. Thats why for more than 8 years I've installed nothing but Geforce video boards on most desktops, sad as it may be.

  3. Re:It's true. by Anonymous Coward · · Score: 3, Informative

    Google never had a problem getting it to work in Chrome.

    In fact the dev builds on Linux were the first to have hardware acceleration.

    Whether or not they're wrong about the drivers being shit (I won't disagree entirely) other browser developers aren't too incompetent to get it to work..

  4. GLSL vs KWin by MaikB · · Score: 5, Insightful

    This conclusion matches the observation of the kwin developers who are brave enough to use GLSL for desktop effects
    http://blog.martin-graesslin.com/blog/2010/09/driver-dilemma-in-kde-workspaces-4-5/

    Without citations to back it up, the response of some open source devs was, IIRC: The KWin guys don't understand open source. They are meant to get in touch with the driver developers and help getting the bugs resolved, preferable send patches. The clutter developers i.e. sent patches to solve driver problems.

    IIRC, the mentioned contribution from clutter devs to the graphics drivers were made by Red Hat employees, which heavily backs the gnome development. Red Hat has lots of money and eve more important expertise in house to tackle such problems. The KWin guys don't have these resources.

    Open source gives the means to find, analyze and fix bugs, but its not mandatory. Saying so would mean that one has to know the code bases of every open source library used by his or her application. Thats ridiculous.

    The firefox devs sure don't plan to get into linux graphics driver development and thats fine.

    The real problem is that the driver teams don't have enough resources (money and developers) to get the job done. I'd be happy to vote with my feet and only buy graphics hardware with good open source drivers to encourage to hardware vendors to hire linux kernel developers. But right now I have to stick with nvidia since their drivers, though not open source and certainly have their own bugs, are the only sufficient choice for OpenGL (and OpenCL) on linux.

  5. Wait a minute by Anonymous Coward · · Score: 5, Insightful

    If you need to hardware accelerate web browsers these days, I think that more indicates a problem with modern website design.

    1. Re:Wait a minute by elashish14 · · Score: 4, Insightful

      THANK YOU.

      Of late, of all programs that I run on my machine, it's the web browser that takes up the most CPU. More than Gimp, OpenOffice (I'm more of a Latex person meself, but still), PDF readers, or any other utility that you run in for core productivity, it's the fucking bloated webpages that are the most taxing on my CPU. It's the Flash plugins, and the javascript - I have to block /. in noscript or the scrolling becomes all laggy (and as you'd expect /. have more competent developers than other sites, it's better than most).

      I have to upgrade my computers so i can browse the internets. Lame.

      --
      I have left slashdot and am now on Soylent News. FUCK YOU DICE.
    2. Re:Wait a minute by visualight · · Score: 3, Interesting

      The thing that grinds on my nerves most of all is the rampant use of scripts from external domains. I mean jquery and the like. There are too many websites that require my browser to download scripts from several sites in order to render at all. Too many sites where I have to spend 5 minutes tweaking noscript to view a page...maybe that's the intent, to get me to stop using noscript. I'm certain that some sites deliberately make it hard to load a page without temporarily disabling noscript.

      --
      Samsung took back my unlocked bootloader because Google wants me to rent movies. They're both evil.
  6. Re:OpenGL no rosy story by metamatic · · Score: 4, Informative

    Ah, but at least the OS X drivers are likely fairly consistent with the bugs due to the limited amount of different mac hardware out there.

    I think a more accurate statement is that OS X OpenGL bugs typically don't crash the UI, unlike Linux OpenGL bugs. OS X OpenGL bugs mostly involve features not working. Like antialiasing, for example. Apple does a lot of work at the Quartz level to get decent antialiased graphics primitives.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
  7. Not sure what you are talking about on Windows by Sycraft-fu · · Score: 4, Informative

    nVidia supplies top-flight OpenGL drivers with their cards. They are in every way as stable and as fast as their DirectX drivers, and support the latest standards. ATi's OpenGL drivers are nearly as good. I haven't tested them recently but last time I did they weren't quite as fast as DirectX, but nearly so, and their feature support is current (4.1 with the current drivers). Their main issue is with older games since they can't limit extensions reporting which can cause problems for games that can't handle all the extensions modern cards have.

    The support is true over many generations too. The very latest cards, the 580 and 6970, support OpenGL (version 4.1 in this case), and support had been there for a long time. Go back and get an original GeForce 256, you find that it supports OpenGL (1.4 in its case) and every card in between. Not an extra download either, it is part of the standard drivers they provide on their website (and their OEMs ship with their cards).

    That isn't non-existent, that is heavily supported. More or less if you have a dedicated graphics accelerator on Windows, you have OpenGL support. The only major graphics provider I don't know about in Intel. I know their graphics chips have OpenGL support, though it lags a bit, but I've no idea how good it is.

    Regardless, I'd say Windows drivers being "practically non existent" is very incorrect. If you want 3D acceleration for your system, you purchase an nVidia or ATi card. They are the only guys in the business anymore. They both supply current OpenGL drivers with their current products. Means OpenGL drivers are readily available, and in fact installed on most systems that have discreet 3D.

  8. No, not correct by Sycraft-fu · · Score: 4, Insightful

    Rather nVidia's drivers are a result of two things:

    1) Getting tired of the Linux situation. Much of the problems with the bullshit in X and the underlying layers nVidia just avoids by bypassing it all with their drivers. They do things their own way and it works. They weren't interesting in fucking around with all the politics and BS and waiting around for a reasonable standard to get developed, and just made something that works. They shouldn't have to, and didn't on Windows which provides a solid graphics infrastructure (which also allows for extension so you can implement other APIs like OpenGL) but htey did on Linux.

    2) Their drivers use code they've licensed that they can't distribute. Various things are patented or licensed in some way and they can't just hand it out. So to do an OSS version would mean to rewrite the drives without it, and generally using programmers that had never worked with it to avoid issues of contamination. That is difficult and expensive. Before you claims that can't be the case note that AMD hasn't just opened up their binary drivers. The reason is the same.

    Basically nVidia did what was best for their business, and best for their customers that want to get work done. They made Linux graphics drivers that work well. They aren't OSS friendly, but they can accelerate OpenGL well and they have been doing so for years. They weren't interested in ideological purity or the like, they were interested in having good support, and their strategy delivered and is STILL the only one that does, after all this time.

    Maybe in a few years you'll be right, there'll be an open solution that works as good or better. Maybe at that point nVidia will use it. However right now I have trouble faulting them. Their shit works where the other's don't. That is really all that matters.

  9. They've cleaned up their Windows act by Sycraft-fu · · Score: 3, Interesting

    Can't speak on Linux as I haven't used it on the desktop but for Windows, their drivers are fine. I still wouldn't rank them as highly as nVidia's, but it is mostly advanced features. Stability wise they are great, and they support all the current technologies (DX11, DirectCompute, OpenGL 4.1, etc).

    I've had a 5870 for about a year now and it has worked real well, I don't find myself saying "Man I wish I'd stuck with nVidia." Now I still like nVidia better, and I'll be getting an nVidia card next round if they have a competitive offering (they didn't when I bought the 5870, they currently do) but it is for little things. For example nVidia handles per application settings much more gracefully than ATi. I have no reservations at all about using and recommending ATi, if they are the better value.

    That was certainly not always true. There was a time when I wouldn't touch ATi with a 10-foot pole. However these days, for Windows at least, they are fine to use. Graphics are fast and the system doesn't crash, which is really what matters.

  10. The state of the graphics stack doesn't help by Olivier+Galibert · · Score: 3, Interesting

    Graphics drivers are all over the place. For instance, the intel stack, to be complete, requires:
    - the xserver tree
    - the protocols tree
    - the libdrm tree
    - the intel 2d video driver (includes separated DDX driver and XvMC driver)
    - the kernel (drm tree)
    - mesa with its integrated drivers
    - libva (for vaapi)

    That's 5 hardware-accessing drivers (internal kernel, DDX, XvMC, internal Mesa, libva) in 4 trees linked together with libraries and applications coming from 3 more trees. And they call each other through layers and layers of function arrays with no real documentation at any level. It's always fun when trying to understand a function to see it calling another one through a function pointer which after two more indirections finally ends up in another function a paragraph after the original one. And you have to trace everything, because the just as innocuous call after that one is in fact going to send a message through a drm connection and the X server to the DDX driver. And will be as documented as the previous one. Add to that a (failed, but present) tentative in the code to support almost any combination of versions in this dreadful house of cards, and you end up with an astounding amount of added complexity that does not make debugging easy.

    And fixing that is probably not going to ever happen until X/Mesa is dead under its own weight. The bitching when the n protocol trees became the one protocols tree was incredible, I don't see the poor soul who managed that one doing it ever again.

        OG.

  11. Re:It's true. by jmorris42 · · Score: 3, Interesting

    Google cares about having their browser run well on Linux because they intend it to run on Chrome OS. Mozilla doesn't really care about Linux support going all the way back to when they were Netscape. Linux/UNIX has never been a 1st class target, only a port with a 'couple guys' working on it.

    Seriously, I bought Netscape 1.0 and the Linux binary wasn't even on the CD. Back then buying was the only way to get export prohibited crypto. When I asked them about it I got blown off. Some years they care a little more than that, others about that little. At all time they make it clear a hold up on a port won't slow down feature development on their primary platform. IE is getting hardware assist so Firefox WILL ship it before IE9 leaves bets. And that probably makes sense from their pov.

    --
    Democrat delenda est
  12. The Linux graphics is getting there. by jabjoe · · Score: 3, Informative

    I think there is a a lot of negativity going on here, but I don't think there needs to be. Gallium3D/KMS/DRM is moving along nicely, as are the drivers that use it. It's all new, but it is moving well, and at the end, the drivers will be easier to maintain with much more code sharing between them. This process also removes the drivers from X. This will make X development easier too, hopefully reinvigorating X development. It also makes X alterantives realistic possible, which is why all the excitement about Wayland. It's all a lot of big changes, and it's not finished. It's not surprising it's not perfect yet. Personally I can't wait for Nouveau to be able to take over from NVidia's closed drivers. People here are raving about them, but they crash about once a month for me, which is worse then any other driver on the system (non of which crash). You also get left behind with all the X development as NVidia don't take part. As the drivers start getting feature complete, optimization will be increasingly the new goal (stablity will always be a goal). This is happening! Nouveau has replaced nv, the open ATI and getting better all the time, and I expect Nouveau 3D to start becoming enabled as standard quite soon.