this post was submitted on 13 Jun 2023
45 points (95.9% liked)

Linux

48352 readers
1920 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
45
X11 vs Wayland (lemmy.ml)
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

I'm a seasoned Linux user, but mostly for servers and services, not really for desktop use.

I've dabbled in some desktop distros on my personal rig a few times in the past, but ultimately due to specific games, I've gone back to Windows.

I recently installed Arch and KDE. Upon initial boot I noticed it was defaulted to Wayland. Every time I would try to log in it would just go to a black screen then cycle back to the login screen. Picking X11 would bring me to the desktop.

Basic Specs:

  • AMD Ryzen 7 5800X 3D
  • nVidia RTX 4090

I have been doing some reading into this and it looks like the issue is due to the proprietary nVidia drivers, but there are solutions to work around this.

I know nothing of Wayland other than its supposed to be more secure. My question is, is it worth the time/effort to get Wayland working? I primarily use my system for gaming. X11 seems to be working just fine for me right now.

Forgive me if I'm using some of the terminology wrong, still learning.

EDIT - Selling my gpu is not an option. I knew ahead of time that AMD has superior Linux support, but the 4090's performance can't be matched by anything AMD has. Maybe next upgrade I'll go back to AMD if they have the top performer.

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 11 points 1 year ago (2 children)

I love Wayland but I'm not using Nvidia. I really hope th3y figure that Nvdia stuff out soon because it's such a roadblock to many people when it comes to Wayland

[–] taj 4 points 1 year ago

This. I haven't had Nvidia in years. On Amd and/or Intel, ime Wayland is perfect.

[–] [email protected] 1 points 1 year ago

Nvidia is the one who had things to figure out. Their poor support for GBM and closed drivers are the reason the Wayland developers have not been able to improve the experience on NVIDIA

[–] [email protected] 9 points 1 year ago* (last edited 1 year ago) (4 children)

X11 is deprecated, it's been removed from RHEL, and hasn't had dedicated maintainers for years. You might as well switch to Wayland (and xwayland if needed) now, it's not really the case that you have an option.

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

In your situation, I would say to stick with X11. I'm still using X11 for gaming, but Wayland for most other things. Maybe try Wayland again in a few years. And when it's time to buy new hardware, maybe avoid Nvidia.

If you want to have another go at getting it working, check out what the Arch wiki says for KDE:

If you are an NVIDIA user with the proprietary nvidia driver, also enable the DRM kernel mode setting. If that does not work, too, check the instructions on the KDE wiki.

As for the question of security, I want to emphasize that X11 is not increasing your risk of getting hacked. If one of your applications is compromised, then X11 acts as one method by which an attacker could further their attack or extract information, but other methods would usually be easier for an attacker. You could use flatpaks or firejail to mitigate those other methods, but only after you've done that would Wayland provide a meaningful security benefit.

load more comments (1 replies)
[–] INeedMana 8 points 1 year ago (1 children)

I'm using Arch, Wayland, AMD GPU, Discord, Steam (Proton, so xWayland) for playing. I don't remember when I switched to Wayland, might be even more than a year.

I remember that I liked something about configuration and internal logic but mostly, for me, it just works. I don't see much difference from purely user perspective.

[–] jarredpickles87 4 points 1 year ago (2 children)

Does Wayland allow desktop/app streaming via discord natively? I remember trying to screen share in discord last year on Ubuntu and it didn't work because of Wayland. I read that there were workarounds, but I didn't have the time to invest in that then.

[–] INeedMana 3 points 1 year ago (1 children)

They fixed this sometime this year. Camera and screen sharing in Discord work, OBS works too

[–] jarredpickles87 3 points 1 year ago (1 children)

Oh, that's awesome! Now I have a follow up question: does Mint use Wayland because that's what I'd be using on my gaming PC if I move over. (Which I'm currently assessing my use cases)

[–] INeedMana 2 points 1 year ago

Not out of the box, it seems. But I haven't used Mint for some time now

load more comments (1 replies)
[–] [email protected] 6 points 1 year ago

Wayland is the future. But I live in the present so I use X11 :)

Just kidding I use Wayland on my work laptop (and maybe I should revert it to X11?! I have an issue with switching to an external monitor). I have both installed but overall I think I've had fewer issues with X11 than with Wayland.

I'm hoping one day soon it'll be amazing but until then I see everyone's pushing for it and in my experience so far it's not ready yet.

[–] [email protected] 6 points 1 year ago

I tried Wayland a few times and kept running into issues. I just figure at this point I'll stick with X11 until it fades away and I don't have a choice. I'm not a gamer though, so I can't say much about that.

[–] ForynGilnith 6 points 1 year ago

I had many issues running Arch+Wayland+nvidia because, as a long-time i3 user, I figured that migrating to Sway would be the best choice based on so many people in the community talking about it. I tried moving over several times, every few months to see if the experience had improved but each time I got frustrated with how terrible and buggy the environment was.

Trying out Hyprland was a complete game-changer. I've been running it full-time for about 2 months and it's completely stable, supports everything I need to run, and is more efficient: the battery on my laptop lasts about 30% longer compared to my i3/picom/X11 setup.

So yeah, I highly recommend Hyprland if you've tried sway in the past and didn't get anywhere with it.

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago)

I would just wait if you're on a nvidia card, all of the problems with nvidia on wayland are nvidias fault, and they're supposedly releasing patches to fix this, but it's taking forever and nvidia sucks.

If possible, sell it and get an amdgpu

https://www.youtube.com/watch?v=mkfFvEeVC4w

It's honestly a good idea to just sell.

Wayland is fundamentally better designed from the ground up, but isn't extremely mature. Waiting is perfectly fine if you're comfy on x11, but once wayland is the default everywhere, the linux desktop will be a significantly better experience in more ways than just security.

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago)

I recommend to just use wayland unless you have a specific reason not to. The main two reasons not to are requiring global shortcuts and having an nvidia GPU that won't play nice.

You might just need to enable DRM KMS to get it working, in which case it may be worth using.

[–] kerneltux 5 points 1 year ago

I haven't used Nvidia since I switched to Linux 8 years ago. That's what my computer at the time had, and it definitely influenced the hardware I chose going forward (I switched to using AMD GPU's).

The X11 developers have moved onto working on Wayland, and I find my computers are more performant under Wayland. However, my use-cases don't require CUDA or anything else that Nvidia provides.

In the end, use the tool(s) that get the job done. I'm not going to say "switch to AMD & use Wayland," it's not my place to do that. X11 is fine until the Wayland experience on Nvidia improves.

[–] [email protected] 4 points 1 year ago

Enjoy your NVIDIA card in Linux, should bring you many surprises. Being much older now, i dont like surprises so I went with the AMD only solution. No more surprises!

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

Specifically with KDE and Arch, if you installed the meta package including the sddm display manager, make sure you're using sddm-git and not the stable release (19.x I think) because the stable version of sddm doesn't support Wayland. That could be why you're seeing a black screen, the drivers shouldn't be that bad. KDE is in the process of transitioning to being Wayland by default, some things are still WIP and you may have to account for that on bleeding edge distros like Arch. That's the fun thing about Arch, not only does it not stop you from shooting yourself in the foot, it cheerfully loads the gun for you.

[–] slapmefive 3 points 1 year ago

Didn't know about this, thanks for the tip

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

I run Wayland on my laptop (a Framework) and it works beautifully. But I still use X11 on my desktop where I'm a heavy Zoom user. The lack of a proper support for screensharing in Zoom is the primary blocker for me.

Wayland is great other than compatibility issues like that.

[–] [email protected] 1 points 1 year ago (1 children)

all electron stuff mostly doesn't work, neither wine stuff...

[–] [email protected] 1 points 1 year ago

just learned about electron.. is that thing where they glue a chrome + node.js ? that thing is bad.. !!

[–] [email protected] 4 points 1 year ago (2 children)

Just a head up to be careful with 7900 XTX if you do plan on getting an AMD GPU like other people on here are suggesting.

When I purchased 7900 XTX, AMD doesn't offer me any way to control the fan speed on 7900 XTX and it always get stuck on 5% speed. I literally tried everything from using hwmon mode setting to manual (it stuck on auto and refuse to switch to manual), literally modifying the AMD GPU driver in kernel to forcibly set the manual mode for fan speed, it doesn't work and instead it locks up the Kernel, and tried literally every application that exists for setting fan speed on 7900 XTX.

I tried to contact the manufacturer to refund me, they refused to pay me back in full and want me to reduce what I get back, I paid $1000 for it, they want me to pay $100 shipping and to only be qualified to receive $400 from them. I ended up keeping the 7900 XTX and basically went nuclear on fixing the GPU. This was literally within 1 week of receiving the GPU mind you. AMD is ranked far below Nvidia after my absurdly negative experience with them and I would rather go with Intel than AMD at this point and that is saying a lot, because it's not only my GPU that is a problem, but it also with their software and driver like ROCm that NEVER worked, ever.

I created a plastic strap via 3D printing on top of the GPU and create a negative pressure fan to cool it down, it can stay under 50 degree Fahrenheit at 100% utilization.

[–] [email protected] 4 points 1 year ago

I have that an 7900xtx too and mine works alright. I have the Sapphire Nitro+. Fans are off in the desktop and only turn on when playing a game, and I've monitored the temperature with mangohud and it's doing a good job.

So I wonder why you're having issues. Even if you have a different model, the driver should be the same?! Maybe your distro ships an older driver or kernel or something? You haven't mentioned what you use.

And btw you haven't mentioned if you used Wayland or X11. Whichever you're using, try the other maybe that helps? Though it might have nothing to do with it...

[–] [email protected] 2 points 1 year ago

Talk to a hardware youtuber, they might do a story on your shady GPU OEM

[–] [email protected] 3 points 1 year ago (1 children)

I would double check if you have options nvidia_drm modeset=1 in your modprobe.d. This is necessary for Wayland. I can login to KDE Wayland just fine with my 3090, but I still stick with X11 for now because of VRR and overall better input latency. The input latency issue isn't an Nvidia specific thing, although Nvidia does perform worse with Wayland than AMD in some cases.

And while you're at it add options nvidia NVreg_PreserveVideoMemoryAllocations=1 so that your GPU saves video memory when your system suspends.

[–] that_leaflet 2 points 1 year ago

This is the right answer. I can't even count the number of times people have shrugged off Wayland because Arch doesn't include this kernel parameter by default and they didn't read the Arch wiki.

[–] [email protected] 3 points 1 year ago

Just throwing in this https://arewewaylandyet.com/

I currently see no advantage in fighting the nvidia driver to get wayland to run - especially if you use your rig for gaming. If the argument is stability then a flaky wayland is no better than the ancient X11.

[–] [email protected] 3 points 1 year ago (1 children)

Little late to the party, but I'll chime in. I have a 3080, and for the most part, Wayland works, but there are a few problems that keep me from using it as a daily driver. G-Sync doesn't work at all, and when I put my PC to sleep, upon wake I end up needing to do a full reboot because of severe graphical issues. When it is running though, it's pretty smooth, with only a few graphical issues here and there. I still daily drive X11 though until the major bugs are fixed.

[–] [email protected] 2 points 1 year ago (1 children)

How'd you approach the G-Sync setup? I have a monitor capable of it but didn't think it'd be worth the trouble currently.

[–] [email protected] 2 points 1 year ago

I just stick to X11. Everything just works. I'll switch to Wayland once everything just works as well.

[–] [email protected] 2 points 1 year ago

This is a sore point. I understand that Wayland is the future, just as people adopt laptops instead of desktop machines.

Many years ago, I used Opera browser - I learned to close tabs using MOUSE gestures.... so instead of clicking on a little 'x to close a tab, I could press the RMB and draw an L shape.

With X11 (initially with the software Easy Gesture and later on with KDE's own Custom Shortcuts) I was able to do the same thing - but for ALL desktop apps.

So now, drawing an L does Ctrl+W - and I have dozens more gestures to do not only keyboard shortcuts, but also commands and scripts...

So just putting it out there that X11 isn't only for NVidia users or gamers...

[–] [email protected] 2 points 1 year ago

I’ve recently blogged about my transition with a similar setup as yours. I made some mistakes and took my a while to figure out, but now I got everything working:

https://danielpecos.com/2023/06/08/from-xorg-to-wayland/

Hope it helps

[–] [email protected] 2 points 1 year ago

If gaming is your focus I would suggestedtio stick to x11 for some time. If you want to try an arch based distro I would suggested to stick with archo orendeveross. Thy are for the normal userwazy easier then pure arch.I

[–] [email protected] 2 points 1 year ago

NVIDIA has been shit on wayland for a while now, wayland is coming along nicely though and there's already quite a bit happening in terms of expensions; but unless you need wayland for something there's no real need for it (and you can get wayland apps working on X11 just fine). The big thing right now is that we're in a transition period where we need to go from one ecosystem with tons of well used extensions (like xinput) to one where these extensions are still being developed.

What I'd say is that if you just stick to Gnome or KDE you won't have to worry about which one you're using yet, and if you have problems with wayland just stick to X11 until those get resolved. I'm in a similar ballpark where I'm still on X as I am waiting for several parts of the wayland ecosystem to mature (mainly nvidia support specifically for certain laptop configurations and tiling WMs (yes there's options, but I have multiple problems with most of them))

[–] [email protected] 1 points 1 year ago

X11, for now. I don't think I want to play Android games with WayDroid. I want my machine to obey my command, not the other way around.

[–] [email protected] 1 points 1 year ago

For me, I use Xfce so the decision is already made for me, Xfce does not support Wayland yet. I figure by the time Xfce does support Wayland it'll probably be ready enough for me to use in general.

[–] the_codifier 1 points 1 year ago

I've found compatibility lacks on programs like AnyDesk (does not support Wayland for remote connections). IMO, if you don't really need Wayland, stand with X11

[–] Ministar 1 points 1 year ago (1 children)

I am on Fedora KDE and run Wayland with Nvidia without any major problems daily. But if you have problems, i would rather just wait, especially if X11 is working for you. Nvidia should start fixing the wayland issues soon.

[–] [email protected] 2 points 1 year ago

I really hope they'll fix it soon, I want to use wayland for years already, but there are still a lot of small issues, so that I have always gone back to X11 (like weird glitches, or no support for gammastep etc.)

load more comments
view more: next ›