Slashdot Mirror


A New Era For Linux's Low-level Graphics (collabora.com)

Slashdot reader mfilion writes: Over the past couple of years, Linux's low-level graphics infrastructure has undergone a quiet revolution. Since experimental core support for the atomic modesetting framework landed a couple of years ago, the DRM subsystem in the kernel has seen roughly 300,000 lines of code changed and 300,000 new lines added, when the new AMD driver (~2.5m lines) is excluded. Lately Weston has undergone the same revolution, albeit on a much smaller scale. Here, Daniel Stone, Graphics Lead at Collabora, puts the spotlight on the latest enhancements to Linux's low-level graphics infrastructure, including Atomic modesetting, Weston 4.0, and buffer modifiers.

61 comments

  1. Stuff it all in the Kernel. by Anonymous Coward · · Score: 1

    That's what the kernel is there for. EVERYTHING.

    1. Re:Stuff it all in the Kernel. by Spazmania · · Score: 4, Insightful

      The kernel is there to interface with the hardware. The Direct Rendering Manager interfaces with the graphics hardware.

      --
      Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion.
    2. Re:Stuff it all in the Kernel. by Anonymous Coward · · Score: 0

      What are you talking about? With Systemd the kernel is obsolete.

    3. Re:Stuff it all in the Kernel. by thinkwaitfast · · Score: 1

      Pretty sure (HOPE) that was sarcasm.

    4. Re:Stuff it all in the Kernel. by gweihir · · Score: 1

      You do not get it. At all. One primary task of the kernel is process isolation. Without controlling the graphics hardware (or any other hardware that can be shared among processes), that is not really possible. People these days really know nothing...

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    5. Re: Stuff it all in the Kernel. by Anonymous Coward · · Score: 0

      aye, systemd is it, linus' kernel and all other stuff are just incidentals flotsams jetsams to support systemd

    6. Re:Stuff it all in the Kernel. by Anonymous Coward · · Score: 0

      But ... but ... can Joe lusr now casually keyboard commands .... PUT PIXEL --- GET PIXEL ???

  2. DRM rename by Anonymous Coward · · Score: 1

    They really need to rename the DRM subsystem.

    1. Re: DRM rename by Bing+Tsher+E · · Score: 3, Insightful

      The truth is, the 'Digital "Rights" Management' acronym is what needs to be replaced.

      It's not my digital rights that it manages, nor yours.

    2. Re: DRM rename by Anonymous Coward · · Score: 1

      I read it as "Digital Restrictions Management".

    3. Re:DRM rename by Hognoxious · · Score: 3, Funny

      How about systemDRM?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    4. Re: DRM rename by Lord+Bitman · · Score: 1

      That does nothing to help the problem. It isn't "management", either. It's just broken software.

      True DRM, ie: something which actually tries to keep track of what I have the right to use, do, and consume, based on the often fickle nuances of intentional IP law, I would pay money for

      --
      -- 'The' Lord and Master Bitman On High, Master Of All
    5. Re: DRM rename by someoneOtherThanMe · · Score: 1

      No, it's just fine. Read "to manage something" as "to lessen something" or "to lessen the consequences of something". Like weight management, anger management, crisis management...

  3. Re:Oh boy by svanheulen · · Score: 5, Informative

    DRM in this context is "Direct Rendering Manager" not "Digital rights management" https://en.wikipedia.org/wiki/...

  4. Direct Rendering Manager by Anonymous Coward · · Score: 2, Informative

    A stupid name if there ever was one.

  5. Text mode by Spazmania · · Score: 4, Interesting

    How about letting me use the Direct Rendering Manager in X without disrupting my console text mode? Leave my text alone!

    --
    Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion.
    1. Re:Text mode by Anonymous Coward · · Score: 0

      I suspect that the gamerz will throw hissy fits if they find out that a byte of graphics memory got used for something other than rendering their little worlds.

    2. Re:Text mode by Anonymous Coward · · Score: 0

      Good, they should.

      The computer should do what the user wants it to.
      The OS should enable to user to do what he/she wants, not put up restrictions unless absolutely necessary.

      Ideally the both the gamer and the console user should be able to use the system resources the way they want to.

  6. Re:Oh boy by ArchieBunker · · Score: 5, Funny

    Who the hell thought that was a good idea? Next up we have the New Accelerated Micro Binary Launcher Assembly.

    --
    Only the State obtains its revenue by coercion. - Murray Rothbard
  7. light by fluffernutter · · Score: 1

    I've tried a lot of distributions over the years and I can't say I've ever found an interface that felt totally 'light' for linux. I'm not a big fan of OS/X but I can say that it is one thing they got right. Windows even feels light by comparison. I hope it is changing for the better.

    --
    Laws are rules for the court, but merely a bottom bar to hit for life. Think beyond laws in your actions always.
    1. Re:light by Anonymous Coward · · Score: 0

      DWM: https://dwm.suckless.org/

    2. Re:light by execthts · · Score: 1

      Try xfce.

    3. Re:light by fluffernutter · · Score: 1

      I have. It is obvious that XFCE gets it's lightness from being minimal.

      --
      Laws are rules for the court, but merely a bottom bar to hit for life. Think beyond laws in your actions always.
    4. Re:light by fluffernutter · · Score: 1

      I meant 'full' windows managers. I did try DWM. It gets it's speed from pretty much forcing the users to configure it, too much tradeoff.

      --
      Laws are rules for the court, but merely a bottom bar to hit for life. Think beyond laws in your actions always.
    5. Re:light by Anonymous Coward · · Score: 0

      Or fvwm2.
      Or fvwm95.

      There are options out there...

    6. Re:light by Anonymous Coward · · Score: 0

      Or LXDE. But if you feel these are minimal, have you tried KDE? I've never really liked it or tried it but one think I can respect is, like those traditional "2D" desktops (including MATE) you do have a choice on how the graphics run. I.e., turn compositor off (if you don't need it or would like to remove a layer), turn it on, use OpenGL or not, use Wayland (it's always been a year away, but might be closing in)

      Some people like to use XFCE/Mate/LXDE with Compiz. I don't but that's an easy option (with modern Mate there's even a checkbox)
      If you installed only the base XFCE desktop maybe it's more bare than it should, with the "goodies" there are a bunch of panel applets and some tools (e.g. : https://goodies.xfce.org/projects/panel-plugins/start ) but maybe that's me being very old-fashioned for thinking these are "advanced" features.

    7. Re:light by Anonymous Coward · · Score: 0

      I'm just learning fvwm2, figuring out how to configure it how I would like it. By the way, fvwm95 has not been maintained in a long time, as most things can be achieved in fvwm2.

    8. Re:light by Anonymous Coward · · Score: 0

      I think you probably mean desktop managers, not window managers. Window managers manage windows, desktop manager manage much more.

    9. Re:light by OneHundredAndTen · · Score: 1

      What is it incapable of doing that you just can't do without?

  8. Re: Oh boy by jecowa · · Score: 0

    So are Linux graphics drivers completely open-source?

    --
    my opportunity to freely express myself with the potential persecution and hangings and such
  9. Re:Oh boy by Anonymous Coward · · Score: 0

    Nvidia Integrated Graphics Generation Extension Refresh

  10. why is the graphics subsystem churning for decades by Anonymous Coward · · Score: 0

    Seriously, why has the Linux graphics subsystems been in a cycle of endless churn for decades now. Everyone says they're making the next X11 killer, even though every time they end up being a half baked half functional pile of poo. So here we are, still using X, only because it works at all.

    Bleh.

  11. Nvidia Wayland support is still trash by Anonymous Coward · · Score: 0

    Nvidia drivers don't support OpenGL under Weston (maybe not under any Wayland implementation?). Without that support, Weston is nearly useless.

    Between that and Nvidia's Windows drivers refusing to load inside a virtual machine, I'm not in a hurry to buy any more Nvidia hardware.

    How well does Weston work with Intel or AMD graphics?

    1. Re:Nvidia Wayland support is still trash by Anonymous Coward · · Score: 0

      It's probably a good idea at this point to avoid Nvidia if your primary OS is Linux, but Weston/Wayland are not quite done yet. Yes, it's taking them a while. No one is in a hurry to replace X, and if it is going to get replaced, they want to make sure it works as close to perfectly as possible before inflicting it on people en masse. Neither Debian, Canonical, nor Red Hat are currently shipping Wayland by default, and until that day comes I would humbly suggest not predicating your hardware choices on untested graphics libraries. At this point it's probably looking like 2019 or 2020 for them to get all of the kinks worked out.

      That said, AMD lately has been knocking it out of the park with their OSS driver support, and Nvidia generally doesn't give a shit, so AMD is probably the better choice in the long run.

    2. Re:Nvidia Wayland support is still trash by Anonymous Coward · · Score: 0

      > Neither Debian, Canonical, nor Red Hat are currently shipping Wayland by default

      Maybe not on RHEL, but Fedora does ship it by default and has done so for over a year now.
      I'm not saying it's usable and works well, I'm just saying that some are pushing it rather hard.

  12. Re: Oh boy by svanheulen · · Score: 2

    Most consumer desktop video cards have a both an open source driver and a proprietary driver available for Linux.

  13. Actual tech news on Slashdot?? And it’s hidd by Anonymous Coward · · Score: 1

    Meanwhile, political bullshit drama and meaningless crapticles populate the homepage ...

    This site does not deserve the name "Slashdot". The tagline should be "News for 'tards, stuff that saddens."

  14. Re:Oh boy by Stormwatch · · Score: 2, Interesting

    Framerate-Accelerating General Graphics Operations Technology.

  15. Re: Oh boy by Anonymous Coward · · Score: 0

    Direct Rendering Manager?
    Sounds like a good place to hide some Digital Rights Management.

  16. Somebody tell me by Anonymous Coward · · Score: 0

    What the fuck does this all mean? How will the end user (me) see these improvements?

    1. Re:Somebody tell me by AHuxley · · Score: 2

      A free to pay game will look as pretty on Linux. Just like Windows and OS X and the cell phone.

      --
      Domestic spying is now "Benign Information Gathering"
    2. Re:Somebody tell me by OneHundredAndTen · · Score: 1

      So, if you are not into games, this does nothing for you?

    3. Re:Somebody tell me by drinkypoo · · Score: 1

      A free to pay game will look as pretty on Linux. Just like Windows and OS X and the cell phone.

      Your average free to pay game isn't available on Linux, even if the engine it's developed on is supported there. I play Armored Warfare, which is for PS4 and Windows only, even though it's based on Cryengine. Games are literally the only reason I still run Windows, and I both dual-boot and have a dedicated Linux box (plus various other small Linux systems, mostly ARM-based.)

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  17. Kernel mode settings by DrYak · · Score: 1

    Leave my text alone!

    That would require kernel-mode settings.
    But very likely you have still a user-mode-setting driver, because you're using Nvidia GPUs.

    Stop using Nvidia hardware with their proprietary blob that doesn't play nicely with the rest of the usual Linux stack.
    (In a gross over simplification, Nvidia basically recompile their Windows driver for Linux. So if they need something that work differently, or if Linux some things being done differently, well too bad for you. Too bad for you if you have a laptop that goes into suspend or want to switch to a text console virtual terminal)

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:Kernel mode settings by Anonymous Coward · · Score: 0

      But very likely you have still a user-mode-setting driver, because you're using Nvidia GPUs.

      Nvidia has been doing kernel mode setting for years, they just can't use the same API as the open source drivers for licensing reasons.

  18. Re:Oh boy by DeVilla · · Score: 3, Informative

    DRM was a term a video interface in the Linux kernel before it became a euphemism for consumer abuse in the publishing industry.

  19. Re:Actual tech news on Slashdot?? And it’s h by Anonymous Coward · · Score: 0

    Most of the 'tech news sits firmly in that category. Doesn't help that the editors are rosco dipsticks, of course, but "we stuffed 300k more lines of code into the kernel just so we could int 13h" is cutting edge for the X tards. Just like how "we proposed to stuff all our utter crap code to solve problems that aren't" is cutting edge for the poettering crew. This is the best "news" we have, sorry.

  20. Re:why is the graphics subsystem churning for deca by EzInKy · · Score: 1

    Because just about everyone wants killer graphics instead of just good enough?

    --
    Time is what keeps everything from happening all at once.
  21. Re:why is the graphics subsystem churning for deca by Anonymous Coward · · Score: 0

    Microsoft did create some high performance low level graphics stack though, that is hard to catch up to.
    super duper graphics system v. 1.0 : Vista (what linux "3D" desktops are trying to catch up to)
    v. 1.1 : 7 (added back running multiple graphics cards or GPUs from different vendors)
    v. 1.2 : 8
    v. 1.3 : 8.1
    whatever : 10

    This allowed those super smooth $89 phones years ago, or to do things that would require to kill the X server on linux (like recover from a crash or switch driver) which don't even require to log out in Windows.
    Too bad they tried to copy Android or iOS by having craplets and daemons running behind your back, and not letting customize your GUI as you could do in XP or even 3.1 (like when they removed the GUI for color schemes in Windows 7)
    (I'm also disgusted that video games have become social media and spyware, but that's another issue). So, I ran Windows for 15 years (and DOS), and now have been running linux for 10 years. Bleh, too.

  22. Re:why is the graphics subsystem churning for deca by Gavagai80 · · Score: 1

    Making an X11 killer is easy. The problem is nobody will install that because it won't work with everyone's X11 stuff, so the developers have to go back and make their X11 killer do everything exactly like X11 does so that it works with decades of legacy software and workflows.

    --
    This space intentionally left blank
  23. Re:why is the graphics subsystem churning for deca by guruevi · · Score: 1

    X works and is great as a windowing system. Leaving the dressup to the client is good and with modern IPC is fast enough. Combine X with a good typesetting system (eg. LaTeX or Postscript) a la NeXT and what eventually evolved into Mac OS X and it is perfect - you can make pixel-perfect documents from screen to print or make any screen copy-pastable without the program requiring you to implement a custom menu or data export routine.

    In modern days, I would say a rendering engine (XML/HTML) may be better from a developer perspective (since you're already developing a web browser) but on the other hand, all the ML's are unnecessarily chatty.

    --
    Custom electronics and digital signage for your business: www.evcircuits.com
  24. Nethack by Anonymous Coward · · Score: 0

    I thought this was about Nethack.

  25. Re: why is the graphics subsystem churning for dec by Anonymous Coward · · Score: 0

    yes, we should beseech systemd developer to write Xd

  26. Re:why is the graphics subsystem churning for deca by serviscope_minor · · Score: 1

    decades of legacy software and workflows.

    Legacy, n. Something distinguished from the competition by actually working.

    I like remote windowing and I like middle click to paste.

    --
    SJW n. One who posts facts.
  27. jwm if you don't need desktop icons by technosaurus · · Score: 1

    jwm provides 90% of a desktop environment and is part of what makes Puppy Linux so fast/light, (disclaimer I've made a few contributions to Puppy and jwm)
    Switching to Wayland+Weston-alikes won't be much lighter (maybe faster due to GPU acceleration) and since decorations are handled by the apps it looks like a shinier version of the old mismatched motif/tcl-tk/gtk/kde UI days. Many of the problems with X that wayland was developed to solve have been quietly mitigated in the kernel, but not implemented in the Xserver or libraries AFAICT; for example: socket splicing (since Linux-4.2) could be used to speed up large X requests and c99 variable length arrays could be incorporated into X requests so that a single function could handle all requests as a pointer to a struct rather than copying and passing around a huge amount of data using a different function for each request... this should have been part of xcb
    If anyone is interested in making the situation better for wayland, check out the Wayland/Weston and Mesa source and this low level linux graphics tutorial: http://betteros.org/tut/graphi...

    1. Re:jwm if you don't need desktop icons by fluffernutter · · Score: 1

      I don't typically run linux on systems with GPU acceleration.

      --
      Laws are rules for the court, but merely a bottom bar to hit for life. Think beyond laws in your actions always.
  28. Re:why is the graphics subsystem churning for deca by Monster_user · · Score: 1

    Or, alternatively, be something worth porting to or developing for. If you want to be an X11 killer, then be something that kills the X11 software library.