this post was submitted on 17 Aug 2024
161 points (97.1% liked)

Linux

48622 readers
1412 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Wayland seems ready to me but the main problem that many programs are not configured / compiled to support it. Why is that? I know it's not easy as "Wayland support? Yes" (but in many cases adding a flag is enough but maybe it's not a perfect support). What am I missing? Even Blender says if it fails to use Wayland it will use X11.

When Wayland is detected, it is the preferred system, otherwise X11 will be used

Also XWayland has many limitations as X11 does.

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 64 points 4 months ago (1 children)

Blender's Wayland support is not great because they're doing stuff from scratch. They're not using an existing toolkit like GTK, Qt, Electron, or even something like SDL to get Wayland support.

But if you're using an existing toolkit things are much easier and support is automatically there, you just need to do testing to ensure everything works.

The common biggest things that still use Xwayland are Chromium based apps and programs running under wine/proton. Chromium has an experimental Wayland mode that works well enough, but definitely has some bugs, especially around windowing. Wine Wayland is in the works.

[–] [email protected] 10 points 4 months ago* (last edited 4 months ago) (1 children)

Thanks for the insight.

Yeah Blender seems like an exception.

Also that means I play lots of Wine/Proton games and many web apps / Electron don't care.

[–] [email protected] 9 points 4 months ago (1 children)

Wine and Proton have actually put a ton of work into Wayland support, it's very far along. I wouldn't be surprised for Proton to have a native Wayland version soon.

[–] [email protected] 5 points 4 months ago

Great to hear that!

[–] [email protected] 47 points 4 months ago (2 children)

You're asking the Linux community to agree on something

[–] [email protected] 26 points 4 months ago (1 children)
[–] [email protected] 9 points 4 months ago

Don't tell me what to agree with!

load more comments (1 replies)
[–] [email protected] 38 points 4 months ago (1 children)

for better and worse, XWayland works perhaps too well

load more comments (1 replies)
[–] [email protected] 31 points 4 months ago (1 children)

Also XWayland has many limitations as X11 does.

If an app has only ever supported X11, then it probably doesn't care about those limitations (the apps that do care probably already have a Wayland version). And if an app doesn't care about the extra stuff Wayland has to offer, then there's not really a reason to add the extra support burden of Wayland. As long as they work fine in XWayland, I think a lot of apps won't switch over until X11 support starts dropping from their toolkit, and they'll just go straight to Wayland-only.

[–] [email protected] 5 points 4 months ago (3 children)

Yeah I agree. Maybe some day X11 will be seen as something legacy that needs to be deprecated. But not now...

[–] [email protected] 11 points 4 months ago (2 children)

Plasma deprecated their X11 session in v6 pending removal in the future, and Redhat has already dropped it in Fedora & will do for EL in the next release.

[–] [email protected] 6 points 4 months ago (1 children)

Plasma didn't deprecate X11. Though some developers hinted that the Xorg session will probably be dropped before Plasma 7 and before Qt drops X11. But nothing concrete.

[–] [email protected] 8 points 4 months ago

Oh indeed not deprecated, my bad. Wayland is default and "preferred" (how they're deciding what to prefer I can't imagine), and X11 is confirmed to be removed in a future release.

load more comments (1 replies)
[–] [email protected] 7 points 4 months ago* (last edited 4 months ago)

xwayland covers most use cases already anyway

load more comments (1 replies)
[–] [email protected] 30 points 4 months ago (5 children)

Because it doesn't matter for most apps. XWayland works fine.

Even Blender says if it fails to use Wayland it will use X11.

What are you trying to say? Of course it does. Pretty much every Linux app still supports X11, because a lot of people are still using X11. Only exception I'm aware of is Waydroid.

load more comments (5 replies)
[–] [email protected] 26 points 4 months ago

Because Wayland is fundamentally very different from the older X protocol, and many programs don't even directly do X. They leverage libraries that do it for them. Those libraries are a huge part of the lag. Once GTK and Qt and the like start having a stable Wayland interface, you'll see a huge influx of support.

A big part of the slowness is why Wayland is a thing to begin with. X hid a lot of the display hardware from apps. Things like accessing 3d hardware had to be done with specialized display clients. This was because X is natively a remote display tool. You can use X to have your program show its display somewhere else. Wayland won't do that because that's not the point. Applications that care will have goals for change. Applications don't care will support it once someone else does it for them.

Right now, the only things that would benefit from Wayland are games and apps that make heavy use of certain types of hardware. Half of those don't care about linux, while the other half is OK with X and xwayland.

[–] [email protected] 24 points 4 months ago (8 children)

Wayland does not work with screen readers like Odilia or Orca. Because Wayland leaves blind users behind, it's a total non-starter.

[–] [email protected] 5 points 4 months ago
load more comments (7 replies)
[–] [email protected] 24 points 4 months ago

good is the enemy of excellent. X11 works for most users (almost all the users?) well. You can see that with the adoptions of other standards like the C++ standards and IPV6 which can feel like forever.

Another thing I think one of the X11 maintainers mentioned iirc is that they have been fairly gentle with deprecation. some commercial company could have deprecated X11 and left you with a wayland session that is inferior in some ways.

[–] [email protected] 21 points 4 months ago* (last edited 4 months ago) (2 children)

As someone who tries to look under the hood for a lot of the open source software I run, one thing that I have noticed is that there are a lot of cases where the general sentiment seems to be port to what. Wayland still doesn't support a number of things that some applications require. A lot of developers that I have interacted with would rather have the app run through XWayland rather than have a wayland version of the app with less features or certain features grayed out.

In the case of one project in paticular, that being the Sunshine game streaming project. I have personally witnessed. Them implementing a solution for wlroots based compositor. Having that solution eventually break as wlroots based projects deprecate the protocol they were using in favor of a new one and now that protocol is looking like it too is old news and is going to be deprecated in favor of a newer and better protocol. What I am getting at here is that protocols not existing isn't the only problem, but things are still very much in development. Even applications that implemented wayland support are being put in positions where they need yet another rewrite because things are far from finalized and still moving pretty fast.

[–] [email protected] 13 points 4 months ago (3 children)

In the case of one project in paticular, that being the Sunshine game streaming project

That's a terrible example, because they completely ignore the many many years old standardized APIs (screen casting and remote desktop portals) that they could use, in favor of doing hacky and broken things that require root access instead.

load more comments (3 replies)
[–] [email protected] 7 points 4 months ago

So summarizing Wayland is not ready yet for everyone and current Wayland support can easily be broken with newer releases?

[–] [email protected] 17 points 4 months ago (2 children)

It is not enough to make a better product.

It is not enough to create all tooling and libraries to seamlessly migrate to the new product, but it helps.

There also needs to be a great big positive reason to make the change. Paying developers, huge user base, the only hardware support, great visuals, etc.

Until I cannot run software on X11, I won't switch over knowingly.

[–] [email protected] 14 points 4 months ago (14 children)

Once the desktops switch to Wayland and all distros ship with Wayland by default, support should slow.

Ideally, developers stop improving xwayland over time and go into maintenance mode for a bit. Once it goes into maintenance mode, developers should naturally fall off as it winds down.

If every desktop makes a very public announcement about the xwayland protocol being put into maintenance mode, actively supported apps should switch over. It's up to the public how long they want to keep maintaining xwayland (open source etc).

load more comments (14 replies)
[–] [email protected] 12 points 4 months ago (8 children)

Until I cannot run software on X11, I won't switch over knowingly.

Please explain

[–] [email protected] 14 points 4 months ago* (last edited 4 months ago)

Most people use their os to run their programs. So if their programs don't work without x11 people won't switch.

load more comments (7 replies)
[–] [email protected] 16 points 4 months ago (6 children)

Because Wayland is STILL lacking a lot of things that people need.

[–] [email protected] 12 points 4 months ago (1 children)

It's the opposite for me. X11 is unusable on my laptop because it doesn't support fractional scaling well, whereas on my desktop it doesn't allow for a multi monitor setup with different refresh rates. Both dealbreakers are not present with Wayland. Though your point still stands; NVIDIA GPUs continue to suck more with Wayland than X11 for example.

load more comments (1 replies)
load more comments (5 replies)
[–] [email protected] 13 points 4 months ago

Wayland for better or for worse is still in development, it's actively changing and a lot of developers can't (or don't wanna bother) keeping up...

[–] [email protected] 12 points 4 months ago

In my opinion, that's because X11 lacks proper abstract for many things like screenshot, screencast, color managerment and etc, so the applications have to use many X11 implementation details to implement these features. It leads to high-coupling code with X11 so move their code to wayland and ensuring it works correctly and is consistent with the old behavior is difficult.

[–] [email protected] 12 points 4 months ago

Until recently, Wayland development was rather slow, especially in the areas where more specialized software run into issues that force them to stick with X11. Since Wayland does a lot less than X11 and is more componetized across multiple libraries designed to be swappable, some of these areas simply do not have solutions. Yet.

And, as always with FOSS, funding is a big part of the problem. The recent funding boosts the GNOME foundation received have also led to some increased funding for work on Wayland and friends. In particular, accessibility has been almost nonexistent on Wayland, so that also means that if an app wants to ensure certain levels of accessibility, they can't switch to Wayland. GNOME's Newton effort is still very alpha, but promising.

While big apps like blender and krita get good funding, they can't necessarily solve the problem themselves by throwing money at it, either. But the more funding Wayland gets to fill in the feature-gaps and ease adoption, the sooner we'll be able to move away from xwayland as a fallback.

Wayland and its whole implementation process certinally aren't without fault. There's a lot of really justified anger and frustration all around. Even so, staying on X11 isnt a solution.

[–] [email protected] 10 points 4 months ago (1 children)

Wayland isn't even adopted by every desktop environment yet. xfce, cinnamon, mate, lxqt, and all the ancient window managers all use x11, and all have their users.

If it works on xwayland, chances are it won't be switched for a long time.

[–] [email protected] 6 points 4 months ago

Xfce4 and cinnamon are close to wayland support.

[–] [email protected] 10 points 4 months ago (3 children)

So software like CAD is funny. Under the surface, 3d CAD like FreeCAD or Blender is taking vertices and placing them in a Cartesian space (X/Y/Z - planes). Then it is building objects in that space by calculating the mathematical relationships in serial. So each feature you add involves adding math problems to a tree. Each feature on the tree is linearly built and relies on the previously calculated math.

Editing any changes up tree is a massive issue called the topological naming problem. All CAD has this issue and all fixes are hacks and patches that are incomplete solutions, (it has to do with π and rounding floating point at every stage of the math).

Now, this is only the beginning. Assemblies are made of parts that each have their own Cartesian coordinate planes. Often, individual parts have features that are referencing other parts in a live relationship where a change in part A also changes part B.

Now imagine modeling a whole car, a game world, a movie set, or a skyscraper. The assemblies get quite large depending on what you're working on. Just an entire 3d printer modeled in FreeCAD was more than my last computer could handle.

Most advanced CAD needs to get to the level of hardware integration where generalizations made for something like Wayland simply are not sufficient. Like your default CPU scheduler, (CFS on Linux) is setup to maximize throughput at all costs. For CAD, this is not optimal. The process niceness may be enough in most cases, but there may be times when true CPU set isolation is needed to prevent anything interrupting the math as it renders. How this is split and managed with a GPU may be important too.

I barely know enough to say this much. When I was pushing my last computer too far with FreeCAD, optimising the CPU scheduler stopped a crashing problem and extended my use slightly, but was not worth much. I really needed a better computer. However looking into the issue deeply was interesting. It revealed how CAD is a solid outlier workflow that is extremely demanding and very different from the rest of the computer where user experience is the focus.

[–] [email protected] 6 points 4 months ago

It's true what you write, but it's not related to Wayland/X11.

But this is the reason CAD software can't use multiple cpu cores for geometry calculations. The next calculation needs the result of the previous one, it can't be parallelized.

load more comments (2 replies)
[–] [email protected] 8 points 4 months ago (2 children)

Some applications, such as those with tablet demands, are not met by current wayland des with proper tablet support and xwayland is currently the better option. This may have changed in the last year or so, but this is roughly my recollection of certain big art programs.

[–] [email protected] 14 points 4 months ago (1 children)

Xwayland doesn't get input in some special way, it uses the exact same Wayland protocols to get input events as native Wayland apps. All claims about it being more complete or anything like that are nonsense.

Krita forces Xwayland because they have some X11 specific code they haven't bothered porting away from, that's all.

load more comments (1 replies)
[–] [email protected] 7 points 4 months ago

Some many specific issues with Wayland... Maybe that's a reason. X11 is a huggeee dependency for a long time.

[–] [email protected] 6 points 4 months ago (1 children)

I heard wayland is hard to develop for and xwayland work a little too well, idk I'm not a programmer

load more comments (1 replies)
load more comments
view more: next ›