10 ms·
As a regular linux user should I switch to wayland from xorg? will I notice performance improvements?
by miguelmota 7y ago
As a regular linux user should I switch to wayland from xorg? will I notice performance improvements?
- mcovey 7y agoAs a regular linux user, no, don't worry about whether you're using wayland or xorg, just use whatever comes with your distro. Let the maintainers worry about those things and just be a user.
- danieldk 7y agoUpsides: more secure (in X.org every client can read every other client's keystrokes, pointer position, and do screen grabs), generally smoother rendering, better support for mixed-DPI setups. Current downsides: worse support for screen recording/sharing (e.g. not supported in Skype), a bug in the compositor (e.g. GNOME Mutter) can bring your whole session down, not-as-good NVIDIA support (also depending on the compositor). I have been using Wayland for two years or so an wouldn't want to go back. I do miss wide screen sharing support, because I am working remotely and Skype is the primary means of communication.
- jchw 7y agoIsn’t modern Skype using WebRTC that would be supported at least in beta with xdg-desktop-portal?
- tsar9x 7y agoDid you try to use WebRTC PipeWire for screen sharing?
- danieldk 7y agoYes, it works with some applications, like Jitsi. No luck with Skype so far.
- TacticalCoder 7y agoHaven't switched yet. Under Wayland, can users which are not owning the session display an app on the Wayland session/server? (e.g. under X I can do something like "xhost +" and then have any user display an app on the X server). I'm not asking about the security implications of doing that under X (as you already mentioned, X is less secure and an app can read another app's screen content etc.): just if it's doable or not under Wayland?
- floatboth 7y agoWhoever has access to your wayland socket can display applications. Root already has access to all the things so for running apps as root (e.g. wireshark) you just need to configure sudo/doas/whatever-you-use to keep XDG_RUNTIME_DIR and WAYLAND_DISPLAY. e.g. in my doas.conf: permit setenv { HOME LC_ALL TERM XDG_RUNTIME_DIR WAYLAND_DISPLAY } greg as root and I can just run 'doas wireshark'.
- TacticalCoder 7y agoVery interesting, thanks a lot. I'll definitely give Wayland a try soon!
- Bnshsysjab 7y agoWhat about running a GUI from a local or remote ssh session? Eg previously I would execute DISPLAY=:0 mplayer foo.avi to play remotely or ssh -X root@foo xcalc to display xcalc on my local monitor but execute on rhost
- slightwinder 7y ago> Upsides: more secure (in X.org every client can read every other client's keystrokes, pointer position, and do screen grabs) What if i want this as a feature? Does wayland allow this per app?
- sp332 7y agoThe screen-grabbing app would have to interface with the compositor instead of the display server. For example, krfb is adding Wayland screen sharing support with KDE.
- jandrese 7y agoIs this better from a security standpoint? Does the compositor verify clients in a more secure fashion? Presumably screenshotting is still a thing on Wayland so this has to be a solved problem.
- Bnshsysjab 7y agoThe point is apps can’t grab other apps input/output. If you run the app in an otherwise secure manner (eg execute in a perfect security chroot/container). A malicious application on your host can still do anything at the executing privilege level (read .ssh, inject malware into .bashrc) but can’t sniff your gksudo password
- michaelmrose 7y agoWhy would you assume it's a solved problem? Basically every compositor has to implement this feature.
- kelnos 7y agoThe idea is that the compositor can then pop up a dialog saying "App X wants to record your screen. Allow?"
- sp332 7y agoIt could also limit recording to certain windows, or heck even redraw the whole screen any way it wants, like pretending sensitive windows aren't there.
- jhoechtl 7y ago> a bug in the compositor (e.g. GNOME Mutter) can bring your whole session down, True for Gnome, no issue for KDE. Their arguably better design decisions led them to proceed slower though.
- smt923 7y agoI've found wayland still has strange input, if there's a lot of CPU usage going on (something compiling or whatever) then the mouse and keyboard input will 'lag' and get stuck, plus it feels worse in games to me but the benefits seem really good, I hope wayland can keep improving so I can switch without it feeling worse for me
- some-guy 7y agoI use Wayland on a single-monitor desktop with a modern AMD card and Freesync, and I have had zero problems. I run all kinds of software and games (under Wine or otherwise) and everything just works out of the box. I hear other configurations have more issues.
- any1 7y agoThere is no screen tearing. That is quite noticeable.
- kevin_thibedeau 7y agoX doesn't have screen tearing. Broken video drivers do.
- trulyrandom 7y agoAre all (Intel, AMD and Nouveau) drivers broken, then? I experience tearing on X with all of them.
- pengaru 7y agoX definitely has screen tearing, otherwise we wouldn't have the Present extension. Core Xlib is entirely ignorant of vsync or anything relating to completed frames. It's an immediate mode rendering model in that everything you draw just gets thrown on-screen by the display server whenever. Compositors were then bolted on w/redirect and damage extensions and basically randomly snapshot the client window contents before compositing a desktop frame, within that snapshot you can easily have tearing of half-drawn updates. Further extensions and hacks have tried to fix this like Present and frame clocks from the gtk/gnome folks, but it's all opt-in by X clients and non-uniformly supported by compositing WMs or not at all in classical non-compositing WMs where the X server just draws things directly on-screen as the protocol requests arrive from clients.
- kevin_thibedeau 7y agoThese are all driver issues. Xorg and commercial servers on Windows don't have these problems. Intel and AMD drivers don't either unless misconfigured. It is not X's responsibility to handle low level hardware implementation details.
- pengaru 7y agoEverything I just described is implemented in userspace at the X protocol level. You clearly don't know what you're talking about.
- sprash 7y agoPerformance was worse than X11 for a long time[1] and is finally catching up for some singular compositors. However most compositors still have worse performance and every single compositor has different quirks. Latency still seems to be worse across the board. In my test not one Wayland compositor could beat xterm input/output latency on X11 because of enforced global vsync. 1.:https://www.phoronix.com/scan.php?page=article&item=gnome-326-x11way&num=2 https://www.phoronix.com/scan.php?page=article&item=gnome-32...
- floatboth 7y agoYeah, mutter/gnome-shell was pretty awful. Weston and wlroots (Sway/Wayfire/etc) never had the issues Gnome had. In fact Weston since 2015 has had a clever delay algorithm that allows clients to hit the very next frame if they sync to presentation-time feedback: https://ppaalanen.blogspot.com/2015/02/weston-repaint-scheduling.html https://ppaalanen.blogspot.com/2015/02/weston-repaint-schedu... (And Sway has a configurable delay; since Sway is so simple to render, the recommended max_frame_time value is 1ms — i.e. the compositor has the very last millisecond before vblank to composite, and everything before that is for the apps.) Not really fair to compare with non-vsync systems — tearing is completely unacceptable ;)
- sprash 7y agoWhy is X11 able to be tear free (if drivers a configured properly) and still allows single applications to disable vsync? I still don't understand why I need Wayland.
- cycloptic 7y agoYou probably don't need it, but you can use it if you really want. If you're using a fullscreen compositing WM in X11 then single applications can't disable vsync, it's the same situation as with Wayland.
- PlutoIsAPlanet 7y agoWayland compositors can have something called direct-scan out, which passes the buffer for the full screen application to KMS, which should be superior to Xorg unredirection (Wayland doesn't "redirect" windows in the first place though).
- jhoechtl 7y agoDepends on the window manager you are using. If you are coming from i3 the move to sway is a no-brainer and works great (sway is wayland only). Firefox, thunderbird, Libreoffice all work great and look great, i.e. sharp when you need scaling for example. Sway is to thank for base work they did for other distros like a wayland clipboard protocol all the others are using. Second comes Gnome. No issues. Gnome laid the gruntwork of porting gtk3 to wayland which works great. Third maybe KDE. Still two years to come. KDE plasma is suffering from arguably better design decisions like client side decorations vs. Gnome serverside decorations but as many users use GTK based apps those GTK apps do not yet play nicely with the KDE design decisions. As such the brave KDE folks have to implement things themselves while those relying on GTK are done. QT is fine with wayland but not everything is QT. That's all only true if you are not using NVidia hardware.
- tinza123 7y agoFYI GTK apps look native now under plasma 5.18
- e12e 7y ago> If you are coming from i3 the move to sway is a no-brainer and works great It may work great, but it's not as well packaged by/for upstream as i3. I recently started running wayland+gnome (rather than i3) on my Ubuntu 18.04 at work - because less bad support for fractional scaling looks a bit better on my two 24" with different dpi. But there didn't appear to be a "no effort" way to install sway (yet). Especially not with automatic (security) patches. I'm hopeful it'll be in 20.04?
- Kaze404 7y agoCompiling sway is literally three commands (not counting cloning the repository).
- e12e 7y agoSure, the instructions are clear. But since there isn't a build ready for 18.04 - that kind of makes me wonder about the versions/state of dependencies too - that is - the packaged dependencies in 18.04. They'll generally be frozen at the point 18.04 was frozen - so api and versions from 2017 or so. With 20.04 around the corner, I'd rather wait than faff around.
- briffle 7y agoI want to, but I use two computers at my desk and run Synergy so I only need one keyboard/mouse. (bought a copy twice) Synergy does not yet support Wayland. I really hope they come around and support it soon.
- znpy 7y agoAnother question: I don't take advantage of X network transparency all the day every day, but it is very handy when it's needed. Will there be an equivalent in the Wayland (or, should I say, post-Xorg) world?
- floatboth 7y agohttps://gitlab.freedesktop.org/mstoeckl/waypipe https://gitlab.freedesktop.org/mstoeckl/waypipe
- erik_seaberg 7y agoI find lack of remoting to be a showstopper for a lot of apps that belong in datacenters, but a web browser is one of the few where it's reasonable to always run on your desktop (attached to the GPU and display, which Wayland can't live without).
- sp332 7y agohttps://github.com/udevbe/greenfield https://github.com/udevbe/greenfield This is kind of a joke answer but the real answer is: This depends on the compositor you're using. So Wayland may not be network transparent, but it's possible to implement equivalent functionality on another layer of the stack.
- kllrnohj 7y agoDo keep in mind that just because you might be using X11 doesn't mean you get any network transparency at all. The network transparency only "works" if the GUI applications you're running actually use X's 2D rendering system. Which many things don't do because it's old and terrible and slow. QT5's scene graph backend, for example, doesn't have a X renderer anymore. So those GUI apps already lost network transparency (and did anyone even notice?) On the other hand it turns out streaming video is super easy, entirely agnostic of the actual rendering stack in use, and not really that expensive in terms of bandwidth anymore.
- znpy 7y agothat is not really an answer. regarding the video streaming: meh, i can do X forwarding out of the box with just ssh, mostly out of the box, no other software required.
- gentleman11 7y agoDoes each individual application have to convert to wayland, or does wayland allow you to use old xorg apps without modification?
- Spivak 7y agoYes and no. - Apps which use toolkits like GTK and QT will “just work” since they did the porting grunt work. - X11 apps can run unmodified using XWayland but this just runs an X.org server and directs the output. But the literal answer is “no”. Wayland and X11 are incompatible and apps will need to port.
- joelthelion 7y agoNo more screen tearing is a nice one.
- michaelmrose 7y agoIf you use a distro with up to date kde/gnome you may want to. If you use i3 you may want to try sway. If you use Nvidia gpus don't bother.
- Polylactic_acid 7y agoIf you use a nvidia GPU just sell it and by an AMD one. You will save yourself a mountain of headaches.
- fourmyle 7y agoI run clamshell mode on a regular dpi monitor and the laptop is hi dpi. Everything rescales when switching between clamshell mode and laptop mode on Wayland (Sway). I tried to get it to work as well with xorg i3 and xrandr but I couldn’t. I would always need to close everything and restart my workflow when switching between modes.