this post was submitted on 11 Apr 2024
162 points (95.0% liked)

Linux

48062 readers
915 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
 

I'm curious how software can be created and evolve over time. I'm afraid that at some point, we'll realize there are issues with the software we're using that can only be remedied by massive changes or a complete rewrite.

Are there any instances of this happening? Where something is designed with a flaw that doesn't get realized until much later, necessitating scrapping the whole thing and starting from scratch?

you are viewing a single comment's thread
view the rest of the comments
[–] PseudoSpock@lemmy.dbzer0.com 4 points 7 months ago (4 children)

Wayland could already do with a replacement.

[–] Max_P@lemmy.max-p.me 37 points 7 months ago (4 children)

Wayland is incomplete and unfinished, not broken and obsolete and hopelessly bad design. PulseAudio was bad design. Wayland is very well designed, just, most things haven't been ported for it yet and some design by committee hell, but even that one is kind of a necessary tradeoff so that Wayland actually lasts a long time.

What people see: lol Firefox can't even restore its windows to the right monitors

What the Wayland devs see: so how can we make it so Firefox will also restore its windows correctly on a possible future VR headset environment where the windows maintain their XYZ and rotation placement correctly so the YouTube window you left above the stove goes back above the stove.

The Wayland migration is painful because they took the occasion to redo everything from scratch without the baggage of what traditional X11 apps could do, so there is less likely a need for a Wayland successor when new display tech arrives and also not a single display server that's so big its quirks are now features developers relied on for 20 years and essentially part of the standard.

There's nothing so far that can't be done in Wayland for technical implementation reasons. It's all because some of the protocols aren't ready yet, or not implemented yet.

[–] pete_the_cat@lemmy.world 11 points 7 months ago

Agreed, Wayland has a monumental task to do: replacing a 30+ year old windowing system.

[–] atzanteol@sh.itjust.works 4 points 7 months ago* (last edited 7 months ago) (1 children)

X11 is 40 years old. I'd say it's been rather successful in the "won't need to be replaced for some time" category. Some credit where due.

There's nothing so far that can't be done in Wayland for technical implementation reasons. It's all because some of the protocols aren't ready yet, or not implemented yet.

I mean .. It doesn't matter why it can't be done. Just that it can't be done.

[–] Max_P@lemmy.max-p.me 8 points 7 months ago

40 years old is also what makes it so hard to replace or even reimplement. The bugs are all decade old features, everything is written specifically for Xorg, all of which needs to be emulated correctly. It sure did serve us well, it's impressive how long we've managed to make it work with technology well beyond the imagination of the engineers in the 80s.

There's this for the protocols: https://github.com/probonopd/wayland-x11-compat-protocols

It can be done, it's just nobody wants to do it. It's not really worth the effort, when you can work on making it work properly in Wayland instead. That way you don't need XWayland in the first place, but also XWayland can then implement it using the same public API everyone else does so it works on every compositor.

[–] PseudoSpock@lemmy.dbzer0.com -1 points 7 months ago (2 children)

There’s nothing so far that can’t be done in Wayland for technical implementation reasons.

Then make it fully X11 backwards compatible. Make Wayland X12. C'mon, they already admitted NVidia was right and are switching the sync and working to finally support the card they've been busting a hate boner over the driver simply because they're bigots against the licensing. Time to admit breaking the world was a mistake, too.

[–] Max_P@lemmy.max-p.me 2 points 7 months ago (1 children)

It's slowly happening. KDE can now do global Xwayland shortcuts, they also implemented XWaylandVideoBridge and compositor restart crash recovery for apps. We're getting proper HDR, we have proper per-monitor refresh rates and VRR, I can even hotplug GPUs. Some of that stuff works better in XWayland because we can just run multiple instances with different settings. For the particularly stubborn cases, there's rootful XWayland. X12 would have to break things too, and I doubt an Xorg rewrite would be all that much further than Wayland is. Canonical had a go at it too with Mir which was much less ambitious.

NVIDIA was right on that one indeed, but Wayland also predates Vulkan and was designed for GLES, pretty much at the tail end of big drivers and the beginning of explicit and low level APIs like Vulkan. They could very well have been right with EGLStream too, but graphics on Linux back then was, erm, bad. But in the end they're all still better than the kludge that is 3D in Xorg.

It's getting a lot of momentum and a lot of things are getting fixed lately. It went from unusable to "I can't believe it's not Xorg!" just this year for me. It's very nice when it works well. We'll get there.

[–] PseudoSpock@lemmy.dbzer0.com 1 points 7 months ago

At this point they could make it the best thing in the world. Won't ever fix the resentment they earned against us NVidia users, might fix some of the resentment from x11 folks... but that it needs a separate XWayland will always be a pain point. That's a kluge.

[–] atzanteol@sh.itjust.works -1 points 7 months ago

I can't up-vote this enough. The "architectural purists" have made the migration a nightmare. Always blaming everyone else for simply not seeing their genius. I'm honestly surprised it's gotten as far as it has.

[–] UmbraTemporis@lemmy.dbzer0.com 3 points 7 months ago (5 children)

Seriously, I'm not a heavy software developer that partakes in projects of that scale nor complexity but just seeing it from the outside makes me hurt. All these protocols left-right and center, surely just an actual program would be cleaner? Like they just rewrite X from scratch implementing and supporting all modern technology and using a monolithic model.

Then small projects could still survive since making a compositor would almost be trivial, no need to rewrite Wayland from scratch cause we got "Waykit" (fictional name I just thought of for this X rewrite), just import that into your project and use the API.

[–] SMillerNL@lemmy.world 8 points 7 months ago

That would work if the only problem they wanted to solve was an outdated tech stack for X. But there are other problems that wayland addresses too, like: how to scale multiple monitors nicely, is it a good idea to give all other apps the keystrokes that you do in the one in focus (and probably a lot more)

[–] possiblylinux127@lemmy.zip 5 points 7 months ago

Wayland and X are very very different. The X protocol is a protocol that was designed for computer terminals that connected into a mainframe. It was never designed for advanced graphics and the result is that we have just built up a entire system that balances on a shoe box.

Wayland is a protocol that allows your desktop to talk to the display without a heavy server. The result is better battery life, simplified inputs, lower latency, better performance and so on

[–] dsemy@lemm.ee 2 points 7 months ago

I agree in the sense that Wayland adoption would have definitely gone quicker if that was the case, however in the long run this approach does make sense (otherwise you will eventually just run into the same sorts of issues X11 had).

Btw what you're describing is not that far off from the normal way of using Wayland protocols in development - you use wayland-scanner to generate C source files from the protocols, and you include those to actually "use" the protocols in your programs. Admittedly all my Wayland development experience has been "client-side", so I really don't know how complex it is to build a compositor, but dwl (minimalist Wayland compositor) is only around 3k lines of code (only slightly more than dwm (minimalist X wm)).

[–] LeFantome@programming.dev 1 points 7 months ago* (last edited 7 months ago)

It is complex to build a Wayland compositor. When none existed, you had to build your own. So it took quite a while for even big projects like GNOME and KDE to work through it.

At this stage, there are already options to build a compositor using a library where most of the hard stuff is done for you.

https://github.com/swaywm/wlroots

https://github.com/CuarzoSoftware/Louvre

There will be more. It will not be long before creating Wayland compositors is easy, even for small projects.

As more and more compositors appear, it will also become more common just to fork an existing compositor and innovate on top.

One of the longer term benefits of the Wayland approach is that the truly ambitious projects have the freedom to take on more of the stack and innovate more completely. There will almost certainly be more innovation under Wayland.

All of this ecosystem stuff takes time. We are getting there. Wayland will be the daily desktop for pretty much all Linux users ( by percentage ) by the end of this year. In terms of new and exciting stuff, things should be getting pretty interesting in the next two years.

[–] sepulcher@lemmy.ca -1 points 7 months ago (1 children)

It's what happens when you put theory over practicality.

[–] deadbeef79000@lemmy.nz -3 points 7 months ago (3 children)

What we wanted: Wayland.

What we needed: X12, X13...

[–] possiblylinux127@lemmy.zip 4 points 7 months ago (1 children)

The X standard is a really big mess

[–] deadbeef79000@lemmy.nz 1 points 7 months ago (1 children)

That's kind of what I was trying to imply.

We needed a new X with some of the archaic crap removed. I.e. no one needs X primitives anymore, everything is its own raster now (or whatever it's called).

Evolving X would have given us incremental improvements over time... Eventually resulting in something like Wayland.

[–] possiblylinux127@lemmy.zip 0 points 7 months ago

You can't evolve something that old.

[–] UmbraTemporis@lemmy.dbzer0.com -2 points 7 months ago (3 children)

What was stopping X just undergoing some gutting? I get it's old and covered in dust and cobwebs but look, those can be cleaned off.

"Scoop out the tumors, and put some science stuff in ya", the company that produced that quote went on to develop the most advanced AGI in the world and macro-scale portable on-demand indestructible teleportation.

[–] melmi@lemmy.blahaj.zone 5 points 7 months ago (1 children)

I would rather X didn't get access to deadly neurotoxin, thanks

[–] PseudoSpock@lemmy.dbzer0.com 3 points 7 months ago

I dunno, sounds kinda cool.

[–] deadbeef79000@lemmy.nz 2 points 7 months ago

X12 it's got 15% less X11!

[–] possiblylinux127@lemmy.zip 1 points 7 months ago (1 children)

Because we no longer have mainframes in computer labs. Each person now has there own machine.

[–] atzanteol@sh.itjust.works 3 points 7 months ago (1 children)

And yet I play modern games on modern hardware with X just fine. It's been extended a little bit since the 80s.

[–] PrimalHero@kbin.social 2 points 7 months ago (1 children)

Yes it works but it everything is glued together with duct tape

[–] atzanteol@sh.itjust.works 1 points 7 months ago (1 children)
[–] PrimalHero@kbin.social 1 points 7 months ago (1 children)

What part of 40 year old code that is so messed up that it's not cleanable any more do you not understand.

[–] atzanteol@sh.itjust.works 1 points 7 months ago (3 children)

Of course it is. That's propaganda. It's hard, but possible. Probably not as hard as fighting Nvidia for 15 years either.

[–] nyan@sh.itjust.works 2 points 7 months ago (1 children)

Simply put, no one with the necessary skills has come forward and demonstrated the willingness to do the work. No programmer I've ever met enjoys wrestling with other people's crufty old code. It isn't fun, it isn't creative, and it's often an exercise in, "What the unholy fsck was whoever wrote this thinking, and where did I put the 'Bang head here' mousepad?" So getting volunteers to mop out the bilges only happens when someone really wants to keep a particular piece of software working. It's actually more difficult than getting people to contribute to a new project.

So getting rid of X's accumulated legacy cruft isn't impossible, but I suspect someone would need to set up the "Clean up X" foundation and offer money for it to actually happen. (I'm no happier about that than you, by the way.)

[–] atzanteol@sh.itjust.works 1 points 7 months ago

Aye - there was definitely a lack of motivation there. It seems the X teams (XF86 and later Xorg) sorta ran out of juice at some point. Maybe Wayland has reinvigorated them since it's much more exciting to write new code than fix old cruft.

[–] possiblylinux127@lemmy.zip 1 points 7 months ago

X is looking for maintainers

[–] PrimalHero@kbin.social 1 points 7 months ago (1 children)

Dude what are you smoking?
clean it up yourself if you love it so much

[–] atzanteol@sh.itjust.works 1 points 7 months ago* (last edited 7 months ago) (1 children)

clean it up yourself if you love it so much

Are we 12?

You're telling me a project that has taken 15 years and is just now getting decent nvidia support and which may someday allow applications to position their own windows is rousing success? Compared to a rework of an existing codebase? That has all the signs of a "we bit off more than we could chew".

It'll work, in the end. But 15 years of work on a migration from X11->"X12" or something would have likely been easier. Especially if they didn't ignore nvidia along the way.

[–] PrimalHero@kbin.social 1 points 7 months ago (2 children)

Says the guy that believes its propaganda 😂
Blaming the developers of wayland instead of the company, who refuses to cooperate with them. You are really smart.
Have you seen the codebase from x11. Multiple developers who have worked on x11 for decades say its not worth the time to fix it. It was not designed to run on modern systems. Yet here you are all knowing and you saying it they are wrong. You know better.
X11 is dead, get over it and move on.

[–] atzanteol@sh.itjust.works 1 points 7 months ago* (last edited 7 months ago) (1 children)

Blaming the developers of wayland instead of the company, who refuses to cooperate with them. You are really smart.

Look - they needed nvidia to be on board for this to succeed. Not wanted - needed. Yet they ignored them and moved ahead anyway and just blamed nvidia the whole time. And it works because nerds love to hate nvidia. But it's pretty poor project management to think that that would be okay.

Multiple developers who have worked on x11 for decades say its not worth the time to fix it.

By and large I believe them. The mistake is thinking a complete from-scratch rewrite that breaks all backwards compatibility to the point where the replacement isn't even feature-parity with the old system is the solution.

The #1 thing most people wanted was high DPI support and fractional scaling on multiple desktops. I believe they could have managed that in 15 years.

It was not designed to run on modern systems.

Neither was Linux. But proper management and migrations to newer platforms means after 30 years it's still running fine. Or do you want to just throw it out and replace it now that it's the same age X was when Wayland was started?

I mean - I get it. It's tempting to just redo everything "the right way" this time. I accept that Xorg needed lots of work. "Fix or replace" is never an easy question to answer. Replace may even have been the right answer, but Wayland has been a lesson in how not to do it.

X11 is dead, get over it and move on.

Child.

[–] PrimalHero@kbin.social 1 points 7 months ago (1 children)

I will take you seriously when you stop taking the side of a mega corporation. And stop calling someone a child because you don't like the truth. Good bye. Have luck staying on x11

[–] atzanteol@sh.itjust.works 1 points 7 months ago

I'll stop calling you a child when you stop acting like one.

[–] atzanteol@sh.itjust.works 1 points 7 months ago (1 children)

get over it and move on

I mean... I would if Wayland worked on my system. 😂

[–] PrimalHero@kbin.social 1 points 7 months ago

Then I hope your problems will gets fixed soon.

[–] PseudoSpock@lemmy.dbzer0.com -3 points 7 months ago (1 children)

No body wanted Wayland except the mad scientists and anti nvidia bigots that made it.

[–] TheGrandNagus@lemmy.world -1 points 7 months ago* (last edited 7 months ago) (1 children)

Imagine calling developers who have a cold relationship with Nvidia due to Nvidia doing the bare minimum for Linux development "bigots" lol

I think you must be a fanboy. "Bigotry" towards a multi trillion dollar company lmao. What an absurd thought.

[–] PseudoSpock@lemmy.dbzer0.com 1 points 7 months ago* (last edited 7 months ago) (1 children)

I'm no fanboy of any video card. I just have ton of laptops with NVidia in them, and the bigots making Wayland never gave a darn about our plight... and then they started pushing distros to switch before they did anything to fix it. Their callous attitude toward the largest desktop linux userbase is insulting and pushing the distros before they fix the problem should be criminal. Every one of them should be put away for trying to ruin Linux by abandoning it's largest desktop user base. We dislike them, dislike them so much.

Now, will it keep us from using that crap when it finally works? No. We don't have much choice. They've seen to that. x11 will go the way of the dodo. But can we dislike them forever for dragging us through the mud until they were finally forced to fix the darn thing? Yeah. Wish them nothing but the worst.

[–] TheGrandNagus@lemmy.world 1 points 7 months ago

Nobody is being "bigoted" to Nvidia lmao, get some perspective.

And if you're this butthurt Bout Wayland, don't use it. I've been using it for years without issue, because I didn't choose a hardware manufacturer that's actively hostile to Linux. Nvidia is too bigoted for me, unfortunately.

[–] possiblylinux127@lemmy.zip 2 points 7 months ago

It is so much better than X

[–] rollingflower@lemmy.kde.social 2 points 7 months ago (1 children)

Yup, Wayland is so old it already has old concepts. But it is also changing a lot

[–] PseudoSpock@lemmy.dbzer0.com 1 points 7 months ago

Needs to be replaced already. They're having to change to explicit sync, which they should have done from the start. So throw it out, start over, make X12.