If anyone wants to give an ELI5 or a link to a video that ELI5 I’d be incredibly thankful

I swear that all the stuff I find is like super in depth technical stuff that just loses me in no time flat

  • SavvyWolf@pawb.social
    link
    fedilink
    English
    arrow-up
    211
    arrow-down
    3
    ·
    8 months ago

    Programs running graphically (Firefox, your file browser, etc.) need a way to tell the system “draw these pixels here”. That’s what the display server does; it takes all these applications, works out where their windows are and manages that pixel data.

    XOrg has historically been the display server in common use, but it’s very old and very cobbled together. It generally struggles with “modern” things that must people expect today. Multimonitor setups, vsync, hdr and all that. They work, but support is hacked together and brittle.

    Wayland is a replacement for XOrg that was designed from scratch to fix a lot of these issues. But it’s been an uphill battle because XOrg is the final boss of legacy codebases.

    tl;dr They’re both software that manages drawing pixels from applications to the display.

    • Ensign_Crab@lemmy.world
      link
      fedilink
      English
      arrow-up
      70
      arrow-down
      1
      ·
      8 months ago

      XOrg is the final boss of legacy codebases.

      Pretty sure the IRS still holds that title.

    • Gormadt@lemmy.blahaj.zoneOP
      link
      fedilink
      arrow-up
      50
      ·
      8 months ago

      The TLDR was really helpful NGL

      So it’s software that handles software wanting to display things on the screen. Because having each piece of software do it itself would be not only chaos but a massive security concern. And it’s a big deal because it fixes (by replacing) the old software with something that’s easier to work with than the old ways of doing things (due to all new code that’s not spaghetti that’s hacked together over decades).

      Am I close?

      • loutr@sh.itjust.works
        link
        fedilink
        arrow-up
        37
        ·
        8 months ago

        Because having each piece of software do it itself would be not only chaos but a massive security concern.

        Not really, the main point is that (most) apps don’t know where they are on the screen, whether they’re minimized, on the active workspace, … and they don’t care either. That’s the responsibility of the window manager.

        The app tells the display server “I need a window to display these pixels” and that’s it. And the window manager, well, manages these windows.

        On the topic of security, X11 doesn’t handle security at all, that’s one of the main issues. So any graphical app can read the other windows’ pixels, grab everything you type, everything you copy, … OTOH Wayland isolates apps so they can’t do that by default. Apps that really need to (screenshot apps, …) can use “portals” to ask for these permissions.

        • Gormadt@lemmy.blahaj.zoneOP
          link
          fedilink
          arrow-up
          16
          ·
          8 months ago

          That’s really interesting and thank you

          I think I’m beginning to get it now, and Wayland does sound better than X11 at least

          • bisby@lemmy.world
            link
            fedilink
            English
            arrow-up
            22
            ·
            8 months ago

            I use wayland, but be warned that there are downsides.

            X11 is 40 years old. Which means that even though it has 40 years of bad decisions baked into it, it also has 40 years of features and tooling built around it.

            And in some cases, things are purposefully broken in the name of security as mentioned above. Writing a keylogger on X11? Easy. Every app can watch the keyboard even when they aren’t in focus. So if I type my password into firefox, Discord can listen. Hope you don’t have any malicious apps just patiently listening to all your keystrokes.

            Getting rid of input listening sounds great! … Except for the concept of global keybinds. Have a Push to talk button in discord that you need it to be able to listen to while youre playing a game? Sorry, the game is in focus, so discord can’t see ANY of your input. Including the push to talk button. Different wayland servers have different ways of handling this with their portals. Some don’t have it at all. And the ones that do don’t always have great solutions.

            One major issue that has been in wayland debate hell… how do multi-window apps communicate with each other. For example GIMP. The editor window is a separate window from the toolkit which is a separate from the layer view. GIMP on X11 knows where all of its windows are because it can see everything. if you wanted GIMP to save all the window positions, it could. GIMP on Wayland has no idea where each window is relative to each other. Each window knows its own size and shape. And thats it. It doesnt know where on the screen it is. Which means it doesnt know where it’s other sub windows are relative to itself. Which means GIMP on Wayland can’t really save the window positions for next run. Wayland is working on a protocol for handling this, but its been caught up in debate hell last I saw. This is a prime example of a thing X11 had. And Wayland will someday have, but the 40 year headstart and disregard for security gives X11 a huge headstart.

            Most of these problems have workarounds and solutions, but you might find yourself in a situation where you do in fact need to implement a workaround instead of having everything Just Work.

            “Better” means different things to different people. Architecture and security and technologically? Wayland is better. Just Works and its what your apps were probably built to run on so less weird edge case issues? X11 is still better just due to inertia. (And again, I use Wayland, I’m willing to deal with the workarounds, but you do you).

        • oo1@kbin.social
          link
          fedilink
          arrow-up
          5
          ·
          8 months ago

          Does it also handle key and mouse inputs to make sure they’re interpretted by the right programme in the right context?

    • Shareni@programming.dev
      link
      fedilink
      arrow-up
      8
      arrow-down
      1
      ·
      edit-2
      8 months ago

      But it’s been an uphill battle because XOrg is the final boss of legacy codebases.

      Also because Wayland forces every compositor to be an unmodifiable monolith instead of following the UNIX philosophy. For example I’m currently running i3 inside of Xfce because the de, wm, compositor, and every other part are doing their own thing and can be replaced. With Wayland I’d need to fork the compositor and spend a ridiculous amount of time on something that’s trivial in xorg.

      And let’s not forget the garbage pile of tools that got abandoned a week after release because Wayland introduces breaking changes on a regular basis. You want unified shortcuts across multiple compositors like with sxhkd? Tough luck, the only tool was abandoned after the first version and doesn’t work anymore. On the other side you’ve got 15 rofi alternatives you need to dig through to find out which ones are still maintained and might work on your device.

      On top of that Nvidia GPUs have so many issues, and while that’s not solvable by Wayland, it’s still a major issue that still hasn’t been fixed after 15 years, but might maybe soon™.

      Finally, the security improvements have gave me nothing but headaches whenever I tried using Wayland. No matter the distro or compositor, screen sharing and recording never worked for me. Give permissions, share whole screen or just window, it’s either black or the program is not showing I’m trying to share ate all.

      You can’t blame it all on xorg when Wayland is still simply far worse for a large part of the community.

      • Possibly linux@lemmy.zip
        link
        fedilink
        English
        arrow-up
        1
        ·
        8 months ago

        The Wayland protocol board can never agree on anything. It takes them years to decide to consider adding something.

        Also Wayland is just a protocol at the end of the day so implementation is up to the software developers. I also think that the Unix philosophy holds back software that could be good. You shouldn’t prioritize it over good battery life and low overhead.

        • Shareni@programming.dev
          link
          fedilink
          arrow-up
          2
          ·
          8 months ago

          I also think that the Unix philosophy holds back software that could be good.

          IMO the UNIX philosophy is the reason why Linux survived. Imagine if every distro had a single DE, or you had issues with pulseaudio and couldn’t replace it with pipewire.

          You shouldn’t prioritize it over good battery life and low overhead.

          And why would separating functionality into different tools cause you to have a worse battery life? You don’t get to have tlp on other OS because it’s all integrated

    • 1_4M_N008@programming.dev
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      8 months ago

      It seems an opportunity to ask my stupid questions.

      Q1. If I am going to build my minimum linux installation without a GUI, does this require a display manager?

      Q2. is there other way to interact with my machine other than tty

      • macaroni1556@lemmy.ca
        link
        fedilink
        arrow-up
        10
        ·
        edit-2
        8 months ago

        Q1: No, it does not require X. But some software even if not graphical, requires X libs for whatever reason (e.g. Using Qt)

        Edit: to answer Q2: I don’t think there is technically a way to interact with the system without a TTY but thats technicalities. Your more practical answer is to use SSH to log in and interact. This is how most IoT things work which run Linux and have no display capability at all.

      • infeeeee@lemm.ee
        link
        fedilink
        arrow-up
        24
        ·
        8 months ago

        It’s not os based, usually you can switch between the 2 on your login screen. To check if you are in a wayland session, type this in a terminal:

        echo $XDG_SESSION_TYPE
        

        The answer should be wayland or x11

    • Possibly linux@lemmy.zip
      link
      fedilink
      English
      arrow-up
      3
      ·
      8 months ago

      Wayland isn’t software as it is just a set of protocols. The desktops and window managers take the place of X on Wayland. That’s why it has better performance.

      • roflo1@feddit.nl
        link
        fedilink
        arrow-up
        45
        ·
        edit-2
        8 months ago

        Initial release of xorg was 2004

        Yeah, but XOrg was forked from XFree86.

        or in meme form

        • Pennomi@lemmy.world
          link
          fedilink
          English
          arrow-up
          35
          ·
          edit-2
          8 months ago

          And the X11 Protocol was released in 1987. We’re not replacing Xorg specifically as much as we are replacing X11.

      • wildbus8979@sh.itjust.works
        link
        fedilink
        arrow-up
        15
        ·
        8 months ago

        Xorg is from 2004, but it is an implementation of X11/X Windows which dates as far back as 1984. Wayland replaces both of that.

      • rtxn@lemmy.worldM
        link
        fedilink
        English
        arrow-up
        5
        arrow-down
        3
        ·
        edit-2
        8 months ago

        That hill has a name. GNOME. Wayland’s governance on the whole is a fucking disaster (alternatively, the best sitcom you’ll ever see), but GNOME is a particularly malignant growth on the project’s taint, with completely baseless NACKs that have delayed some protocols by months, and missing/incomplete features in Mutter.

  • shrugs@lemmy.world
    link
    fedilink
    arrow-up
    82
    arrow-down
    1
    ·
    8 months ago

    I’ll try to explain:

    In the past we only had text terminals without a graphical interface ~1990 (sh / bash / tty). so the display server (Xorg / formaly known as X11) was born. it’s a piece of software that allows programs to not only print text to screen but to draw complex geometrical shapes. This allowed for gui programs that use frameworks like qt or gtk or motif… to draw buttons and shit using Xorg.

    For having mutliple “windows” / “programs” running they invented a window manager, that drew a border around the windows with some min / max /close buttons and the modern gui was good to go. btw. the next step are desktop environments like kde or gnome but that would be too much for this post.

    Back to display server (Xorg) and window manager (kwin, mutter, metacity, dwm, awesome, i3…): the design of xorg is super old and has many shortcomings like hdr, variable refreshrate or security: every window can read the contents of or produce input for other windows which is a nightmare for todays security standards.

    So wayland was invented to use state of the art concepts and design. Here comes the big problem: State of the art concepts required wayland to not be a display manager like Xorg. wayland is more like a protocol that defines how to draw windows, resize and close them or how they are allowed to talk to each other. Since wayland is only a protocol+ the window manager now needs to do the heavy lifting of coordinating this protocol, drawing and stuff like that, which in turn results in way less window managers that support wayland because they are complex as hell.

    Since modern software needs to support a heck of a lot of different ways for applications to interact with each other rewriting these functionality for wayland needs time. thats the reason desktop sharing/recording or muting your mic with a keyboard shortcut when the webex window was not in focus wasn’t possible at first. new solutiones needed to be developed for that (pipewire for example). Many programs would run in an xorg window that was implemented as a wayland window (xwayland) which made transitioning to wayland much easier but introduced new problems.

    At the moment we are in a transitional phase. many programs already work without problems, but many software still require features wayland doesn’t have and might never implement. Everyone needing that software is hating on wayland. everyone needing variable refreshrate, fractional scaling or security prefers to use wayland. And the fighting begins.

    Disclaimer: There might be errors, simplifications or misunderstandings on my side but thats the way i understood if. Feel free to correct any mistakes on my part.

    • danekrae@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      8 months ago

      I read this with the voice of the narrator in the Animatrix movie.

      For having mutliple “windows” / “programs” running they invented a window manager (and for a time, it was good)

  • Count Regal Inkwell@pawb.social
    link
    fedilink
    arrow-up
    78
    arrow-down
    1
    ·
    edit-2
    8 months ago

    XOrg and Wayland are two different programs that serve the same purpose, which is to act as a sort of middleman between the graphics driver, the window manager(s), and the many programs you’re running.

    XOrg is ancient. Early 80s ancient. It’s been added to since those days as need arose, and is therefore full of weird messy legacy stuff and jury-rigs. But it is also what Linux has used for a very, very long time, and is therefore like. Ol’ Reliable workhorse, yanno?

    Wayland is a new and bold step that rewrites the entire system from the ground up to address the shortcomings of XOrg (don’t ask me to specify, I actually don’t know), it has, however, been criticised for not having (and devs downright not wanting it to have) certain features that XOrg has. But it can also run applications that expect XOrg with a thing (jargon escapes me) called XWayland.

    Personally I’ve used both. And… Uh…

    Wayland was a bit faster and smoother maybe? But it also caused some specific applications to misbehave and get all crashy-buggy. But that was a personal experience and may well have been my fault.

    • azvasKvklenko@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      12
      ·
      edit-2
      8 months ago

      Wayland is not a single program. It’s specification and set of basic client/server libraries that can be used to implement a compositor. Compositor are implementations of the Wayland protocol and there are multiple such programs that are different one from another, but generally serve the same purpose and are compatible with the same clients. General idea behind Wayland compositor is that it blends images from different clients into single frame that is then sent to kernel

    • havokdj@lemmy.world
      link
      fedilink
      arrow-up
      8
      arrow-down
      1
      ·
      edit-2
      8 months ago

      Wayland is a lot more secure and the way it handles clients is a lot more sane in todays age, but thing is, it is a hell of a lot more complicated if you come from a window manager background, and your choice of applications is incredibly small. Sure you can run a lot of your stuff in XWayland, but what exactly is the point of running wayland if you are going to run less secure X apps with 94% of the same vulnerabilities?

      X is less secure, but the security of your system from the outside is far *faaar more important than the security on the inside. Only when an intruder actually infiltrates your system do you have a real concern, and that’s only talking about remote access. Physical access given enough time is root access.

      A lot of people tout X as being considerably more bloated than wayland which is why the project is basically in maintenance mode, wayland is definitely a lot quicker than X, but X has many reasons including support from literally every single linux application out there, something wayland is very likely never going to acheive even with XWayland.

      • flying_sheep@lemmy.ml
        link
        fedilink
        arrow-up
        10
        ·
        edit-2
        8 months ago

        what exactly is the point of running wayland if you are going to run less secure X apps with 94% of the same vulnerabilities?

        When running Wayland, one X server is started per X application. So that application won’t be able to e.g. keylog others.

        I personally don’t care about security here, it’s all about a flicker free Multi-monitor experience with different refresh rates per monitor. X just can’t do that under any circumstances.

        • havokdj@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          8 months ago

          I run X in a multi monitor setup with different refreshrates AND resolutions and it is flicker free, I think that honestly is something that comes down more to your window manager or even your graphics rather than just X itself.

          That particular vulnerability is one of the 6% that Wayland doesn’t have.

          • Sethayy@sh.itjust.works
            link
            fedilink
            arrow-up
            1
            ·
            8 months ago

            I mean I’d be happy to hear the other vulnerabilities then, cause I find it fairly unbelievable you can know how they’re handled on every single Wayland compositor

            • havokdj@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              8 months ago

              You’re missing the point. When you run an x client in wayland, you are still running an x server. Every vulnerability an x server has, xwayland has. I don’t need to name anything specific because you can legitimately go and look this up yourself.

              Don’t think you are fully safe from keylogging in xwayland either, you are only safe from keylogging in wayland apps, xwayland clients can keylog other xwayland clients because x servers can see other x servers, in other words, they are all still very much running seperate PIDs on your system which means at the very least they can still touch each other. XWayland, by default, does not really sandbox clients because why exactly would it need to? Do you realize exactly how much of a feat that would take to truly isolate an x server from the rest of your system? That is an inherent flaw with X itself because X never set out to acheive those goals in the first place.

              If you are at the point where you have to be worried about protecting your xsession or wayland session, you need to make a fresh install and tighten your security accordingly. All that tightening down your window manager does is make an attacker go for a lower hanging fruit on your system, that’s why you should make your machine unfeasible to even attack in the first place. You can go run around and try to tighten every little nook and cranny, but if someone is determined to get into your system, they will eventually get in. The malicious parties we are trying to defend against with general security practices are not nation state hackers, they are skids and standard malware.

          • ReveredOxygen@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            1
            ·
            8 months ago

            Do you have separate scaling factors on the two monitors? I need 100% scaling on one and 175% scaling on the other, which I’ve not been able to figure out under x11

            • havokdj@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              8 months ago

              Yes, one is scaled 2x, I have a 4k60 and a FHD165. I’d recommend doing this with your autostart script using xrandr

              • ReveredOxygen@sh.itjust.works
                link
                fedilink
                English
                arrow-up
                1
                ·
                8 months ago

                Ah, right. That’s fine with integer scaling, but if you try to use fractional scaling with xrandr, it gets all blurry. I’ll consider 2x scaling though

      • Limonene@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        8 months ago

        This is false. X is not less secure than Wayland. It does have a different security model, which can become insecure if you misuse it. I don’t think people really care about situations where multiple user accounts access the same display.

        In my opinion, the benefits of xdotool far outweigh any benefits gained by Wayland’s security model. It’s impossible to make xdotool in Wayland, because of its security model.

        • havokdj@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          8 months ago

          X is inherently less secure due to the fact alone that, given enough time, new vulnerabilities will come out that will not be patched because X11 is EOL. Yes it has a different security model, but that security model is not very well implemented because X has an enormous code base that, at the end of the day is still not bug free (nothing is). There is a lot of legacy code contained in X that legitimately does not even have a function because there is nothing around today to use it.

          Larger codebase = more moving parts = more code to exploit. That’s the benefit to wayland aside from active support by the X/Wayland devs.

    • Possibly linux@lemmy.zip
      link
      fedilink
      English
      arrow-up
      7
      arrow-down
      1
      ·
      8 months ago

      Wayland is not a program, it is a protocol. The implementation is in the desktop or Window manager.

    • infeeeee@lemm.ee
      link
      fedilink
      arrow-up
      47
      ·
      8 months ago

      The important part that they are a bunch of new commands. We had old commands for this things, but they were written a long-long time ago, and computers evolved a lot since that, we can’t fix the old commands anymore.

  • yesman@lemmy.world
    link
    fedilink
    arrow-up
    58
    arrow-down
    2
    ·
    8 months ago

    Waland is the British half of the mega corp Waland-Yutani. Sometimes called Wa-Yu, or simply “the company”

    Founded by Charles Bishop Wayland, the totally not evil billionaire industrialist, Wayland LLC was known for energy production, computer technology, and planetary terraforming before it was acquired in a hostile takeover by the Japanese Yutani corp in 2099.

  • knightly the Sneptaur@pawb.social
    link
    fedilink
    arrow-up
    25
    ·
    edit-2
    8 months ago

    Super-short version:

    The system that Linux uses to draw anything on the screen (showing the desktop, your windows, their contents, etc) is called a display server.

    Linux has been using a display server called the X Window System (or x11) since its inception, but it’s ancient and has limitations that can’t be fixed without breaking everything that depends on it.

    The Wayland compositor is the new display server that will be replacing x11, improving security and adding support for newer features like HDR. It’s nearly ready for a full release now, and is already the default for some Linux distributions.

    • schnurrito
      link
      fedilink
      arrow-up
      10
      ·
      8 months ago

      Since the 80’s, Linux has been using a display server called the X Window System

      This is, of course, not true, given that Linux did not yet exist in the 1980s.

      Unix-like systems that predate Linux did already use it in the 1980s.

      • AA5B@lemmy.world
        link
        fedilink
        arrow-up
        7
        ·
        8 months ago

        That’s an important point for the youngsters here who think Linux was always a thing: x11 far predates Linux

    • Possibly linux@lemmy.zip
      link
      fedilink
      English
      arrow-up
      3
      ·
      8 months ago

      Wayland is not a server or a program. It is a set of protocols implemented by the desktop. Basically your desktop draws to the display and then your apps connect to the desktop

  • Björn Tantau@swg-empire.de
    link
    fedilink
    arrow-up
    18
    arrow-down
    2
    ·
    8 months ago

    It’s a standard to display programs and let them interact with each other. The old way is X11 which is a big program handling all of that. With Wayland every desktop and window manager (like KDE, Gnome, i3wm, Sway, etc) take up the role of Xorg themselves, giving them better control.

    Every program has to be changed to work with Wayland. Those that don’t run through Xwayland, a program mimicking the old X11 standards on Wayland.

  • Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    15
    ·
    8 months ago

    What is Wayland? It is such a basic concept I don’t need to explain it to you. Of course I understand it.

  • sabin@lemmy.world
    link
    fedilink
    arrow-up
    11
    ·
    8 months ago

    In short it’s essentially a protocol that defines what type of requests must be sent between applications and a compositor.

      • Telodzrum@lemmy.world
        link
        fedilink
        arrow-up
        8
        ·
        8 months ago

        It draws on the screen what programs and the desktop environment tell it to – including opacity, tiling, clicks, drags, updates, etc. Everything you visually perceive on the monitor is the product of the compositor.

        • Psythik@lemmy.world
          cake
          link
          fedilink
          arrow-up
          5
          ·
          8 months ago

          Okay but why is it seemingly always associated with gaming? Anytime someone mentions Linux gaming, I often hear people asking them if they’re using Wayland.

          • Telodzrum@lemmy.world
            link
            fedilink
            arrow-up
            4
            ·
            8 months ago

            I’ll step aside for a longer answer on this one. But, I can say that for my usecase (which is mainly gaming on my home PC on an all AMD build with KDE on Arch) it is noticeably and measurably faster than X11. We’re talking 2-15 (the median is around 4 or 5) FPS depending on the game on 144hz screens.

  • sorrybookbroke@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    10
    ·
    8 months ago

    Wayland is a display protocall. What does that mean? Well, it describes how a program on linux tha displays graphics to a user should work. Examples of programs which do this include kwin, mutter, and sway. It’s why you see stuff on your monitor and why when you open an app, it’s in a window, which can be moved.

    All that along with a good amount of supplementary tools, makes up wayland.

    Currently we are transitioning from a 40 year old protocal called X11 which has many issues and few people willing to work on. Wayland offers a codebase without the spaghetti, more security, easier feature development, and to a point backwards compatibility.