User: Password:
|
|
Subscribe / Log in / New account

Fedora 25 to run Wayland by default

The Fedora engineering steering committee has agreed that the upcoming Fedora 25 release should use the Wayland display manager by default. "There are still some bugs that are important to solve. However, there is still time to work on them. And the legacy Xorg session option will not be removed, and will be clearly documented how to fallback in cases where users need it." If this plan holds, it may be an important step in the long-awaited move away from the X Window system.
(Log in to post comments)

Fedora 25 to run Wayland by default

Posted Aug 19, 2016 18:59 UTC (Fri) by mattdm (subscriber, #18) [Link]

Point of bureaucracy... I mean, of order... while it's not quite obvious from the ticket, the decision here is to allow the Workstation Working Group to continue forward with the plan (it's on by default now in Rawhide), but they may decide that it's not ready during the alpha or beta. The FESCo decision is basically agnostic on whether they _should_ or not. This happened because the change was proposed for F24 but wasn't ready, and then was never formally re-filed for F25. This corrects that.

See the mailing list links in the ticket for background (and ongoing) discussion.

Fedora 25 to run Wayland by default

Posted Aug 19, 2016 20:27 UTC (Fri) by warrax (guest, #103205) [Link]

Still... here's to hoping that it *does* work out! :)

FWIW, I agree with the utilitarian position that Fedora also seems to adopt, but I so *wish* for a time where we can leave the absurdity of X11 behind... (Don't get me wrong, X11 was good *at the time*, but today it's... not.)

Fedora 25 to run Wayland by default

Posted Aug 19, 2016 20:52 UTC (Fri) by clump (subscriber, #27801) [Link]

Correct me if I'm wrong, wouldn't such a switch between display technologies be largely irrelevant to users? My understanding is that Wayland has a more modern and respected design however this wouldn't really matter from a features or functionality perspective.

Initially I see this becoming a painful change. When things don't work as expected users will have to deal with it.

Fedora 25 to run Wayland by default

Posted Aug 19, 2016 21:26 UTC (Fri) by mattdm (subscriber, #18) [Link]

> Correct me if I'm wrong, wouldn't such a switch between display technologies be largely irrelevant to users? My understanding is that Wayland has a more modern and respected design however this wouldn't really matter from a features or functionality perspective.

Well, there a number of fundamental design differences which trickle up to different behavior at the user level. Some of these can be worked around, others can't be, and others maybe shouldn't be. We're tracking this at https://fedoraproject.org/wiki/Wayland_features

And, of course, there are just plain bugs in any software, and despite the best work of testers, history says that we'll learn about most of those only after it's in the hands of users.

Fedora 25 to run Wayland by default

Posted Aug 19, 2016 23:43 UTC (Fri) by zuki (subscriber, #41808) [Link]

Wayland is drastically simpler than X. I guess one could go through https://cgit.freedesktop.org/wayland/wayland/tree/protoco... in a couple of hours and understand pretty much everything about Wayland, while X is a hodgepodge of complicated protocols and extensions. Right now we are facing various transition pains, and actually everything is slower and much more complicated because we have to support both protocols at the same time. But a bit down the road, where more applications have been converted, Wayland should be noticeable to users: slightly faster, slightly less buggy.

For example, each time I open a firefox menu I see painful tearing with some garbage contents while firefox ponders what should the bitmap look like. I really hope that this will be gone once firefox uses wayland natively.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 10:23 UTC (Sat) by xtifr (subscriber, #143) [Link]

Out of curiosity, what is this "tearing" that people keep talking about? I've been using X pretty much exclusively for many years, on a variety of systems, so I assume I've experienced it. Perhaps even fairly regularly. But I guess I'm so used to it—whatever it is—that I just don't notice.

Maybe you shouldn't tell me. If it's pointed out, maybe I'll start to notice, and then it'll start to bother me, and I doubt I'll be switching to Wayland all that soon. :)

I do want to switch eventually. X is a big, ugly beast with many warts. And in my brief tests, Wayland does seem to be slightly snappier in performance. But I'm in no rush to switch for good. And I want to give up as little functionality as possible when I do switch. I run a lot of older apps, so I'll be heavily depending on XWayland after I switch in any case.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 13:31 UTC (Sat) by joey (subscriber, #328) [Link]

Based on the grandparent comment, "tearing" may be getting repurposed to mean any display glitch, but it originally refers to one specific display glitch, which resembles torn paper. Depending on your hardware, you may not see it; I used an old and small netbook display for years and only got to experience tearing when upgrading to a more modern display.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 13:58 UTC (Sat) by zuki (subscriber, #41808) [Link]

Formally "tearing" is when a window displaying video shows a new frame in the upper part, and the old frame in the lower part (wikipedia has a clear example: https://en.wikipedia.org/wiki/Screen_tearing). When there's no synchronization between the producer of the frames and process that flings them to the screen, this will happen if the producer is slow for any reason.

Like joey said, I used the term more loosely, to describe the situation where a process is not fast enough and I get "garbage" in some surface, i.e. whatever was there in that buffer, before it manages to render the correct content. In the wayland protocol, the client signals when then the surface is ready, avoiding this kind of situation.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 14:22 UTC (Sat) by Wol (guest, #4433) [Link]

And I've started noticing this - my thunderbird window gets corrupted on my laptop. Minimising and re-windowing doesn't clear it, so the display buffer itself seems to be corrupt. Annoying but not serious, but I've never known this before.

Cheers,
Wol

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 19:33 UTC (Sat) by drag (subscriber, #31333) [Link]

Well that would just be corruption of the application's output, not really what people are talking about.

Used to be very common to having tearing on X because the applications were being rendered directly to the screen buffer. As you move the windows around they would need to be re-rendered for every frame of the display, but couldn't keep up. Nowadays it's not as bad. It's a lot easier for X to keep up with a 60hz display when you have a 4-core 2.6ghz processor versus 1 200mhz. You have to look really close to really 'see' it.

It tends to show up more with video playback and games. I notice it in normal applications in monitors I have turned 90 degrees. for whatever reasons since the tearing is now 'vertical' it's much easier to see.

This is one of those things that you don't really notice or pay attention to most of the time, but having a nicely rendered display makes for a lot 'smoother' appearance. People typically don't know what they are seeing, so they will try to describe a tear-free display as 'being very fast' or 'being smoother' or just things like 'it is more solid'.

I remember it very much from back in the day when OS X was still new. It was using compositing display without any sort of hardware rendering (pre-'quartz extreme'). It was extremely slow. So slow that when dragging windows around it couldn't keep up. Some even went as far as to accuse Apple of keeping the mouse acceleration much lower then that in Windows because it helps hide the lag in the display output.

Yet when comparing things side by side people would still say that OS X aqua display was much faster then X11 on Linux. Not because it was actually faster, but because it held together and was much more attractive then X did. X did flashing, tearing, menu drop downs and animations would 'erase' parts of windows and lines would scrape across the top of other windows.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 21:48 UTC (Sat) by ken (subscriber, #625) [Link]

If you want to see tearing I made a test video that alternates red/green. This makes it very easy to "see" any problem as even a single framedrop or half frame will have a big impact on the color.

video
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bu...

how it should not look
https://goo.gl/photos/rXNBQ5KR6ZMnhazB9

also made two youtube version. the 60Hz I never seen played ok on any linux system I tested on .
https://www.youtube.com/watch?v=LmaFs-MAWOg
https://www.youtube.com/watch?v=ynvJmyaazs4

Fedora 25 to run Wayland by default

Posted Aug 21, 2016 18:21 UTC (Sun) by flussence (subscriber, #85566) [Link]

The 60Hz video plays back fine for me (once I convinced youtube to actually load the 60fps video). That's on a 6 year old bottom-dollar Radeon card.

Fedora 25 to run Wayland by default

Posted Aug 21, 2016 18:46 UTC (Sun) by ken (subscriber, #625) [Link]

Good for you then. It do not play fine for me and I have a i7 6700k and a radeon fury x.

But are you sure it's really ok? If you stare like a mad man right at the video for the entire 20 second you don't see even a single color change /dropout?.

The only device that is 100% for me is my tv using the built in player and the mpeg file(not youtube). Next best is is samsung galaxy tab2. It has a periodic dropout but that is probably due to the display refresh rate is not exactly 60HZ and if the player keeps an error count it is going to result in a periodic frameskip/doubling.

Worst is the players that has totally random droputs all over. Strangest is nexus 6p that just simply refuses to do 60Hz and drops down to 30 showing a constant red or green picture for the video. Why even try playing in 60 if it just going to drop half the frames anyway?

Fedora 25 to run Wayland by default

Posted Aug 21, 2016 19:12 UTC (Sun) by flussence (subscriber, #85566) [Link]

It's consistently perfect without compton running - I normally keep the compositor disabled because it tends to ruin performance across the board. With it running I do get a few dropped frames.

For reference: Phenom II X3 CPU and Radeon HD 6450, DRI3+glamor enabled.

Fedora 25 to run Wayland by default

Posted Aug 23, 2016 17:02 UTC (Tue) by barryascott (subscriber, #80640) [Link]

You might be using a player that does vsync.

Fedora 25 to run Wayland by default

Posted Aug 21, 2016 7:08 UTC (Sun) by alecs1 (guest, #46699) [Link]

Hasn't tearing been a solved problem since the introduction of compositing on Linux too? I'm pretty sure that since around 2012 I haven't seen any system (including VM) on which X.Org+KWin didn't have compositing working properly.

Now, I only use compositing for window shadows (KWin's are of worse quality than those of Apple), since invisible window margins somehow work without compositing too.

I will also note that, when the computer is under heavy use, disabling compositing actually makes it feel that redrawing is just one tiny bit faster, be it with or without buffer/tearing glitches. Surprisingly, I get this impression for Windows systems too (minus the glitches).

Fedora 25 to run Wayland by default

Posted Aug 21, 2016 23:02 UTC (Sun) by drag (subscriber, #31333) [Link]

> Hasn't tearing been a solved problem since the introduction of compositing on Linux too?

It helps a lot because compositing reduces the numbers of rendering it takes.

However if the the display manager cannot sync up with the display then there is no guarantee that when the display manager refreshes it will be matched with the display.

> disabling compositing actually makes it feel that redrawing is just one tiny bit faster, be it with or without buffer/tearing glitches.

X should be a bit faster with compositing disabled. The reason for this is because the texture format output for X Windows is incompatible with the APIs that are used to accelerate the rendering of the display (opengl or whatever). So there needs to be copying and conversion of textures being rendered by X. So you end up with memory bandwidth being used and large textures being copied between GPU and CPU memory.

With Wayland the rendered output of the applications is compatible with the acceleration used for compositing/rendering the display. So if you are using DRI3 acceleration then the copying/conversion of the textures is replaced with copying the 'File Descriptor' used to reference the textures and texture memory management is handled in-kernel. No copying or conversion being done.

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 9:03 UTC (Mon) by ovitters (subscriber, #27950) [Link]

> So if you are using DRI3 acceleration

How can you determine if you're using DRI3? I have a NUC5PPYH, which is an Intel GPU (N3700). Not exactly sure what kind of graphics it has, specifications aren't clear: http://ark.intel.com/products/87261/Intel-Pentium-Process...

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 16:24 UTC (Mon) by drag (subscriber, #31333) [Link]

I am not sure. It seems that DRI2 is still the default.

as my desktop user I tried this:

journalctl -a|grep -i dri3

And saw messages of '/usr/libexec/gdm-x-session[2099]: (==) RADEON(0): DRI3 disabled'

The drivers that support it have 'dri3' boolean options you can stick in your X config to turn it on. Haven't tried it out yet, personally.

Fedora 25 to run Wayland by default

Posted Aug 21, 2016 11:47 UTC (Sun) by anton (subscriber, #25547) [Link]

Nitpick: In tearing, you see the part from the old frame on top, and the part from the new frame at the bottom. And it's not related to slowness, only to lack of synchronization; indeed, if some animation is very fast and renders several frames in the time it takes to display one, you may get several tearing lines per frame (although less pronounced ones, because the frames are not as different given the short interval between them).

Fedora 25 to run Wayland by default

Posted Aug 19, 2016 23:17 UTC (Fri) by robgssp (subscriber, #110335) [Link]

Ideally the main user-visible change will be that videos won't tear anymore. This is laughably hard to avoid on multi-monitor X.

Fedora 25 to run Wayland by default

Posted Aug 23, 2016 17:06 UTC (Tue) by barryascott (subscriber, #80640) [Link]

Multi monitor is hard because each monitors clock is free running.
So in a video wall you get tearing between monitors.
There are, expensive, solutions.

Fedora 25 to run Wayland by default

Posted Aug 23, 2016 21:33 UTC (Tue) by nybble41 (subscriber, #55106) [Link]

I don't realistically expect to be able to avoid tearing _between_ monitors, but it would be nice to at least be able to avoid tearing _within_ each monitor in a multi-monitor system. The current state-of-the-art is that you get to choose one connected display to sync to, and the others will tend to experience tearing. In principle a Wayland compositor could render to a separate framebuffer for each display, each one synced to that display's VSYNC signal. Applications which span monitors could receive fine-grained information about when VSYNC occurs for each subregion of the window and render accordingly, or else let the compositor take care of timing the buffer-swaps to minimize cross-monitor tearing.

Fedora 25 to run Wayland by default

Posted Aug 19, 2016 23:40 UTC (Fri) by jberkus (subscriber, #55561) [Link]

On the other hand, I have issues with xorg *now* (multi-display/suspend). So I'm eagerly awaiting Wayland in hopes that it can do better.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 0:12 UTC (Sat) by Lekensteyn (subscriber, #99903) [Link]

System sleep or runtime suspend? Are hybrid graphics on a laptop involved? I don't think that changing X11 to Wayland would solve that. Have you filed a bug report?

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 0:46 UTC (Sat) by error27 (subscriber, #8346) [Link]

I'm not the original poster but one issue is that in the X protocol you can't suspend when there is a pop-up window. So imagine your power goes out. The first thing that happens is that your wifi disconnects and brings up a pop-up. You're not in the office and your laptop can't sleep until you close the pop-up so the battery dies.

It's a known advantage of Wayland. There were many similar design flaws in X that make it insecure and degrade performance.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 4:14 UTC (Sat) by ken (subscriber, #625) [Link]

Really do you have any link to some documentation for This?

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 7:01 UTC (Sat) by Sylos (guest, #109852) [Link]

Is this by any chance related to it not being possible to use keyboard shortcuts when a pop-out menu is open? So, for example a menu from a menu bar or a right-click menu.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 14:39 UTC (Sat) by error27 (subscriber, #8346) [Link]

Yeah. The pop-up takes control of the keyboard and mouse input.

http://www.linux-magazine.com/Online/Features/Is-Wayland-...

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 21:16 UTC (Sat) by lsl (subscriber, #86508) [Link]

But how does this prevent your machine from suspending when you're not in your office? It'd prevent your key combination for "supend-machine-now" from working, yeah. It doesn't prevent the suspending of your machine through other means.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 8:11 UTC (Sat) by rsidd (subscriber, #2582) [Link]

>X protocol you can't suspend when there is a pop-up window.

I have never heard of such a thing. In fact I don't see what the X protocol has to do with suspending. Suspending is a hardware thing (ACPI). Perhaps there's some funny interaction of popup windows with the screen lock, if you enable screen locking for suspend.

Oddly though, our mac refuses to shut down sometimes because of open programs. If you just clicked "shutdown" and left the room, it may in fact stay on.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 14:25 UTC (Sat) by Wol (guest, #4433) [Link]

VirtualBox does this on linux - programs can intercept the shutdown request and cancel it. My wife had great difficulty in learning that she had to close Windows/VirtualBox before she could shut down linux.

On the other hand, trying to teach our grandkids not to shut down the system while other people are logged on - if my wife was running Windows and the grandkid said shut down, VirtualBox can't cancel someone else's shutdown command.

Cheers,
Wol

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 14:43 UTC (Sat) by error27 (subscriber, #8346) [Link]

The screensaver/suspend only activates if you haven't pressed a button or moved the mouse for a while. But since the popup window hogs the input we don't know if there has been any activity or not. We could make it shutdown whenever a program hogs the input for five minutes but then there would be no way to play computer games so that doesn't work.

Fedora 25 to run Wayland by default

Posted Aug 21, 2016 3:42 UTC (Sun) by rsidd (subscriber, #2582) [Link]

Ah ok, you mean idle-based suspend, rather than explicit suspend or lid-closing suspend -- I don't think idle-time suspend is enabled on my laptop! However, it hibernates when the battery is very low, and that seems to work reliably though the situation rarely occurs. (Also, the screen lock seems to be started when it resumes, not when it suspends/hibernates. This is XFCE.)

Fedora 25 to run Wayland by default

Posted Aug 26, 2016 20:55 UTC (Fri) by jberkus (subscriber, #55561) [Link]

In my case, the problem is that when my laptop comes out of suspend, if I have multiple displays it sometimes only detects one of them, and can't be made to connect to the others without a restart of the system (even a gnome-shell restart doesn't help).

And yeah, there's a bug filed, but it's hard to reproduce the issue consistently even on my system (it happens about 1 in 3-4 times), let alone on anyone else's. Other folks have other, similar-but-not-the-same issues with suspend and multi-monitor.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 0:46 UTC (Sat) by jhoblitt (subscriber, #77733) [Link]

I have been running wayland on one of my 3 regular use F24 boxes. The only real issues that has come up is with screencasting or desktop sharing software (eg, bluejeans) not being able to detect any windows.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 1:00 UTC (Sat) by SEJeff (subscriber, #51588) [Link]

That is a downside. The upside is that malware can't see what is on each window or what input happens on it. The same can not be said for X, where the security design is reminiscient of MS DOS 5.0.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 2:02 UTC (Sat) by lsl (subscriber, #86508) [Link]

Malware that already runs as your user or otherwise gained access to your X display and thus is already able to post your SSH keys to some IRC channel.

Being able to control the display as a normal program enables lots of useful things. Things that will all need direct compositor support in the Wayland world.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 3:01 UTC (Sat) by sbaugh (subscriber, #103291) [Link]

>Malware that already runs as your user or otherwise gained access to your X display and thus is already able to post your SSH keys to some IRC channel.

No. Suppose you're running an X application out of a sandbox, such that it doesn't have access to your home directory nor is it running as your user. You could have a complete sandbox; but X will break the sandbox.

Wayland, by not trusting applications, allows actually sandboxing applications.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 3:58 UTC (Sat) by wahern (subscriber, #37304) [Link]

Well, at least in several years, once the worst bugs are shaken out. Wayland communication is based on a primitive RPC mechanism, similar to XPC. XPC is the protocol used by NFS and portmap, services with implementations that were reliably remotely exploitable for decades. And because as a practical matter the big abstraction in Wayland is that clients inject variable sized and opaque data by invoking routines inside the compositor through the very thin RPC layer, don't be surprised if there are several years of exploits.

If your goal is security, you either want something as simple as VNC--passing a gigantic buffer over a simple protocol with simple commands--or you want something like X as it was originally conceived--small, declarative drawing commands. Wayland was designed based on the needs of 1) fast and responsive compositing, and 2) getting a proof-of-implementation up as quickly as possible. The former was based on years of experience and headache, the latter looks almost like an after thought, and arguably a poor reaction to the complexity of the modern X protocol.

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 2:29 UTC (Mon) by torquay (guest, #92428) [Link]

    ... getting a proof-of-implementation up as quickly as possible ... looks almost like an after thought, and arguably a poor reaction to the complexity of the modern X protocol.

There is nothing "modern" about the X protocol. It's a piece of crap from the 1980s. People have kept on "extending" it, to the point that it's a Byzantine mess which is essentially unsecure and unmaintainable. Many of the developers who worked on X know this very well, and this is why they moved to develop Wayland.

Wayland is not exactly a case of "proof-of-implementation as quickly as possible". It has been in development since circa 2008. It's first official release was in 2012.

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 11:39 UTC (Mon) by anselm (subscriber, #2796) [Link]

I don't think the claim is that the X11 protocol is “modern” – it is that the “modern X11 protocol” as opposed to the original X11 protocol from the 1980s, IOW the original X11 protocol from the 1980s plus a large variety of extensions to that protocol ranging from the essential to the long-deprecated, is “complex”, which if anything is an understatement.

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 6:58 UTC (Mon) by neilbrown (subscriber, #359) [Link]

> XPC is the protocol used by NFS and portmap,

XPC? I know the NFS protocol as RPC or SUNRPC or ONCRPC, but not XPC. Do you have a reference?

> with implementations that were reliably remotely exploitable for decades.

That's because it used UDP with no crypto-security, which is trivial to exploit. This is not a reflection on the protocol but on the transport. wayland uses unix-domain-sockets for a transport which cannot be exploited in the same way at all.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 10:11 UTC (Sat) by xtifr (subscriber, #143) [Link]

So Wayland won't support stuff I do (screencasting, desktop sharing), but provides some extra security if I do something I have never considered doing or ever had a desire to do? Wow, way to really sell it to me! :)

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 14:29 UTC (Sat) by Wol (guest, #4433) [Link]

Except, in a hostile environment, X is *broken* *by* *design*. On a multi-user system, separation between users is impossible, so the untrusted app running as user guest can snoop on your sooper-seekrit root admin session, AND IT CANNOT BE STOPPED.

So yes, it may break loads of things you use, but unfortunately the reason those things work is that they rely on the fact your "house" has no locks. In today's world, that's no longer tenable in most places :-(

Cheers,
Wol

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 21:00 UTC (Sat) by lsl (subscriber, #86508) [Link]

> On a multi-user system, separation between users is impossible, so the untrusted app running as user guest can snoop on your sooper-seekrit root admin session, AND IT CANNOT BE STOPPED.

Bullshit. You can't snoop on another user's X session unless they specifically allow you to connect to their display.

This whole discussion is about isolation between clients within the *same* X session, i.e. between your browser and your xterm.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 16:05 UTC (Sat) by jhoblitt (subscriber, #77733) [Link]

Wayland certainly does support screen scrapping operations. For example, Gnome screen recording works. However, virtually every other app I have tried clearly has not been updated to support Wayland. This isn't surprising as I expect a rather small percentage of the Linux desktop market is currently running Wayland.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 21:04 UTC (Sat) by lsl (subscriber, #86508) [Link]

There's no way to update a screen scraping program to "support Wayland".

That Gnome thing is implemented directly in gnome-shell (acting as a Wayland compositor) and you need to speak a gnome-shell-specific API (dbus, I think) to interact with it.

Fedora 25 to run Wayland by default

Posted Aug 21, 2016 16:52 UTC (Sun) by jhoblitt (subscriber, #77733) [Link]

Screen recording is also part of weston, presumably gnome-shell's implementation is based upon that. One would hope that at some point there will be a freedesktop standard to cover this functionality.

Fedora 25 to run Wayland by default

Posted Aug 21, 2016 19:31 UTC (Sun) by eru (subscriber, #2753) [Link]

Screen recording is also part of weston, presumably gnome-shell's implementation is based upon that. One would hope that at some point there will be a freedesktop standard to cover this functionality.

Hopefully sooner than later, else the Year of the Linux Desktop keeps receding. Where I work (a large tech company), practically all meeting involve someone sharing a screen (using Webex), because often all participants are not at the same site (often not even in the same country). OK, everyone now uses Windows for this purpose, but at least in the past, there was Linux Webex software as well. But it sounds like current Wayland would not allow it, except in the Gnome-specific way mentioned above. It is unlikely vendors would bother making DE specific versions of such software.

Security problem or not, the possibility of screen sharing is a very important requirement for professional desktop use.

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 6:40 UTC (Mon) by drag (subscriber, #31333) [Link]

Linux has fallen massively behind for corporate desktop 'remote desktop' purposes and the reason is X.

Windows remote GUI has blown Linux away for many many years now. Webex is just the tip of the iceberg.

The ironic thing is that they'll use Linux in the 'thin clients' and they'll run the Windows desktops in Linux-managed virutal machines, but the actual GUI technology you will see is Windows gui. Nobody voluntarily uses X for this.

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 5:58 UTC (Mon) by drago01 (subscriber, #50715) [Link]

No they are not based on each other. The gnome-shell recorder is the same it offers in X11. It is not wayland specific in any way. It just happens that the process that draws everything on screen (the compositor) can easily implement such a feature (also on X11).

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 13:12 UTC (Sat) by krake (guest, #55996) [Link]

> Suppose you're running an X application out of a sandbox, such that it doesn't have access to your home directory nor is it running as your user.

Another example is something like a SSH connection with X forwarding.
Someone might have access to the remote side's X socket (e.g. the remote system's priviledged user) but not to your local files.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 17:18 UTC (Sat) by cortana (guest, #24596) [Link]

In theory the -X option to SSH enables the use of the X11 SECURITY extension to prevent the forwarded apps from doing anything too malicious. Some distros patch it out though, but you can re-enable it by setting 'ForwardX11Trusted no' in your config file.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 17:42 UTC (Sat) by alkadim (guest, #104623) [Link]

What about the X Security Extension [0]?

I've been using untrusted X cookies for "less trusted" [1] applications since the first time I read xauth's man page.
Something like: $ xauth generate :0 . untrusted timeout 500

[0] https://www.x.org/releases/X11R7.6/doc/xextproto/security...
[1] For really untrusted stuff I just use a different machine.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 22:33 UTC (Sat) by welinder (guest, #4699) [Link]

> Wayland, by not trusting applications, allows actually sandboxing
> applications.

Meanwhile, in the real world, we are seeing end-to-end attacks
on ssh from one VM against another running on the same hardware.
And not because of bugs in the hypervisor.

https://www.usenix.org/system/files/conference/usenixsecu...

The idea that under Wayland you can safely run untrusted code is
wishful thinking.

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 6:46 UTC (Mon) by drag (subscriber, #31333) [Link]

You run untrusted code on your desktop every single day. Unless you never use the internet. Your browser continously downloads and executes all sorts of code from all over the internet.

Also do you audit your applications before you download and install them? Because I can pretty much guarantee your distro doesn't.

Just because security is hard and will never be perfect doesn't make security improvements pointless.

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 6:34 UTC (Mon) by drag (subscriber, #31333) [Link]

> Malware that already runs as your user or otherwise gained access to your X display and thus is already able to post your SSH keys to some IRC channel.

Like Adobe Flash?

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 18:38 UTC (Sat) by wx (guest, #103979) [Link]

Right. Thankfully, key loggers are impossible with Wayland. Oh, wait. Nevermind.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 20:06 UTC (Sat) by bronson (subscriber, #4806) [Link]

No, that's an attack on KWin, not Wayland. It's a good example of how X's massive insecurity has led to clients becoming complacent toward security themselves. It appears that Wayland is fixing that.

Or am I misunderstanding your point?

Fedora 25 to run Wayland by default

Posted Aug 21, 2016 23:10 UTC (Sun) by lsl (subscriber, #86508) [Link]

From Martin's descriptions, that keylogger works only by compromising the compositor process itself and the code it relies upon, e.g. through presence of malicious plugins/modules or by LD_PRELOADing evil code into it.

If an attacker is able to own your environment that bad, it's really game-over, regardless of X or Wayland.

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 5:06 UTC (Mon) by bronson (subscriber, #4806) [Link]

Well, apparently they're fixing it by restricting KWin' plugin permissions. Doesn't seem to be a Wayland issue. (to my cursory understanding anyway)

True, exploiting LD_PRELOAD just means you've already been owned somehow.

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 13:29 UTC (Mon) by wx (guest, #103979) [Link]

> No, that's an attack on KWin, not Wayland.

As a potentially affected user, why should I care? I've been owned. Worse yet, I've been owned through a very obscure KWin "feature" of a) supporting loadable plugins and b) giving them carte blanche access to everything. The exact attack scenario doesn't matter though. Critical infrastructure linking against a behemoth like Qt is simply asking for trouble no matter what you do. The attack surface becomes so large that it's next to impossible to guarantee security.

> It's a good example of how X's massive insecurity has led to clients becoming complacent toward
> security themselves. It appears that Wayland is fixing that.

I'm not sure Wayland is helping here. A lot of people appear to assert that Wayland will magically get rid of these attack vectors. Martin's approach was different. He took a step back and asked the right question: "Wayland promises protection against key loggers. Does it deliver?" Not everyone would have done that, much less made an attack vector in their own code public.

Perhaps surprisingly, it turns out that at the end of the day Wayland doesn't actually deliver. The attack vector now simply lies elsewhere. As Martin points out, you need to have some of the functionality somewhere to give users the interface they expect. Wayland doesn't provide any facilities to handle global keyboard shortcuts or screen scraping (for legitimate screenshots/screencast). Thus, presently, the complexity is moving where you don't want it: in desktop environment-specific components.

Your response to my comment highlights the bigger issue - a pure "not my fault/problem" mentality isn't going to solve this. As a consequence of Martin's findings our resolution shouldn't be "This isn't Wayland's fault. We just need to harden KWin to mitigate this type of attack.". We should ask the question "How do we fix Wayland (the architecture, not the protocol) to make it impossible in the first place and irrespective of which desktop environment is in use?"

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 13:44 UTC (Mon) by micka (subscriber, #38720) [Link]

Someone else's problem is important because you can actually fix the problem in someone else's program.
You can't fix it in Wayland because Wayland itself doesn't have the problem, you fix it in another program.
With X, you _can't_ fix the problem, not in X, not in another program.

Fedora 25 to run Wayland by default

Posted Aug 23, 2016 4:00 UTC (Tue) by drag (subscriber, #31333) [Link]

This is correct.

There is a massive difference between being able to stop a particular attack vector versus making sure that the software is perfect and that no exploit could ever exist.

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 14:12 UTC (Mon) by farnz (subscriber, #17727) [Link]

On the contrary, Martin's post is optimistic for the future.

Instead of the vulnerability being baked into Wayland protocol (and thus unfixable without breaking applications, as is the case in X11), it's part of the KWin codebase.

Wayland, in this case, delivers, by moving the vulnerability from the protocol design (hard to fix - every application using Wayland needs auditing to ensure that it does not depend on the protocol bug) to a bug in the compositor (easy to fix - only KWin and its plugins need fixing).

Note, too, that the same vulnerability existed in the X11 version of KWin - it's just that there, it was worthless because you could just as easily abuse X11 protocol as load a dodgy plugin. And, if you look up Martin Peres's work, Wayland protocol has been analysed from this point of view - the Wayland architecture is securable without a protocol break, even if it's going to be a long, hard slog to get all the implementations to secure themselves.

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 14:53 UTC (Mon) by wx (guest, #103979) [Link]

I thought I'd made it obvious but to clarify: I was referring to Wayland as an architecture. Wayland the protocol does not attempt to solve the issues I was getting at so it cannot be affected.

> the Wayland architecture is securable without a protocol break, even if it's going to be a long, hard slog
> to get all the implementations to secure themselves.

Yeah, except the fact that there are multiple implementations is a mistake. So is the possibility to have an insecure implementation in the first place. Once the initial port is done the incentive to fix non-trivial security issues may not be as large as you may think.

My point was that the functionality in question should not be part of KWin/gnome-shell. "Privileged" operations such as screen scraping or globally listening to keyboard events should not live in the same process as all the other fancy stuff the compositor may be doing. The respective code should be shared and its use mandatory.

It's great that Wayland as an architecture makes good behavior of implementations possible. I'm asking for it to make bad behavior impossible.

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 14:58 UTC (Mon) by farnz (subscriber, #17727) [Link]

The same applies to X11, though - anyone can reimplement X11, and do so badly if they so wish. It happens that the remaining users of X11 have largely settled on X.org's implementation, but that's just chance. Indeed, the same applies to all Free Software; you cannot be Free Software and prohibit me from reimplementing you badly.

And I don't see how Wayland can make it impossible for bad behaviour to happen. In the KWin case, the compositor needs access to kernel event devices (it can't get input otherwise), and had a design flaw that meant that an attacker had access to anything that the compositor (KWin) had access to. Could you outline how Wayland fix it such that processes that legitimately need access to a device cannot have bugs that permit an attacker to have access to that device?

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 21:12 UTC (Mon) by wx (guest, #103979) [Link]

The underlying assumption is that much of the code in KWin (anything involving graphics, transition effects, other bling) does not need access to input at all yet it constitutes the largest attack surface. So, it'd make sense to move all the input rerouting to a small separate process. If anything goes wrong in the graphics process it might still intercept keyboard shortcuts but not your passwords.

The part where this approach gets somewhat involved is when focus changes. This would need to be initiated from the input process which suddenly needs an idea of window geometries. However, this could be abstract data without any actual graphics code. It's certainly non-trivial which is why I suggested for this to be shared across desktop environments but I would hope it's doable. Combined with Capsicum/seccomp it would lead to an architecture that limits potentially harmful access as much as possible.

Granted, the other option is that I've just reinvented X (now that I've spelled it out the above sounds a lot like what a window manager did in X) and that in a couple of years we'd go full circle if anyone were to follow through on my suggestions :) In any case I learned a thing or two about Wayland today and am looking forward to it now. I'm glad that people do in fact care about this sort of thing, people who've had more time to look into the gory details than myself. So, keep up the good work everyone!

Fedora 25 to run Wayland by default

Posted Aug 23, 2016 8:26 UTC (Tue) by farnz (subscriber, #17727) [Link]

Nothing in Wayland's architecture prevents this - you can separate out into a large number of small processes if that's what you need to get the security guarantees you want to promise. You could, for example, have a single process handling the scene graph, telling the separate rendering process how to draw, and receiving input from the separate input handling process (which will hopefully use libinput to handle raw devices). Then, you have private IPC between the bits; this is where it differs from X11, where the IPC for a window manager is (by design) available to all clients, and thus all clients are the same security risk as the window manager. In Wayland, only the window manager is special - everything else is using IPC that pretends that there's only one visible client, except when doing drag and drop and the like.

And Wayland compositors have a lot in common with X11 window managers - they're basically a combination of an X11 WM, an X11 compositor, and the important bits of X11 protocol.

Fedora 25 to run Wayland by default

Posted Aug 23, 2016 22:21 UTC (Tue) by mathstuf (subscriber, #69389) [Link]

> "Privileged" operations such as screen scraping or globally listening to keyboard events should not live in the same process as all the other fancy stuff the compositor may be doing.

They don't have to. The compositor just needs to be sure of what code is on the other side (e.g, it could open a domain socket and fork/exec a special program and communicate over that socket with the program to do screen recording). ISTR there being plans for permission dialogs to ask if it's OK for programs to do certain kinds of actions.

Fedora 25 to run Wayland by default

Posted Sep 14, 2016 10:35 UTC (Wed) by makomk (guest, #51493) [Link]

No, it's not easy to fix because the problem isn't just the KWin codebase - it already knows not to load its plugins from untrusted directories. Unfortunately, Mesa is also plugin-based and the directory its plugins are loaded from can be modified by an environmental variable, and of course Wayland compositors all use Mesa because that's currently the OpenGL implementation which supports the functionality requierd by Wayland. KWin is just the only one that cares enough about security to check.

Fedora 25 to run Wayland by default

Posted Aug 20, 2016 17:31 UTC (Sat) by kloczek (guest, #6391) [Link]

Sill c&p is only working in X11 session.

Fedora 25 to run Wayland by default

Posted Aug 21, 2016 18:07 UTC (Sun) by flussence (subscriber, #85566) [Link]

That would be the deal-breaker for me. I've got a long list of keyboard shortcuts/scripts relying on xclip (“copy the selection from my desktop's screen to my netbook”, “open this youtube link in mpv”, “open that URL on the machine that can cope with an obese Modern Browser”, etc.)

Fedora 25 to run Wayland by default

Posted Aug 21, 2016 18:42 UTC (Sun) by rahulsundaram (subscriber, #21946) [Link]

copy/paste seems to work fine in Wayland for me. OP has to be more specific.

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 6:39 UTC (Mon) by kloczek (guest, #6391) [Link]

Misinformation.
Generally c&p is working.
It is not working c&p on middle mouse button :)

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 7:15 UTC (Mon) by phg (subscriber, #96794) [Link]

> It is not working c&p on middle mouse button

Not running Wayland here but the Fedora wiki claims
that the selection buffer issue has been resolved:
https://fedoraproject.org/wiki/Wayland_features#BLOCKER:_...
If not, that would indeed be show stopper.

Middle click paste

Posted Aug 22, 2016 8:27 UTC (Mon) by swilmet (subscriber, #98424) [Link]

I was also in the camp who defend middle click paste. Nowadays I try to use it only in a terminal. Because with other apps, I often get the middle click paste wrong, either the selection has changed or I don't click at the right place (with a keyboard shortcut, I can first position the cursor at the right place, while with a click there can be a mouse movement at the same time).

With Ctrl+C/Ctrl+V, it always works.

Middle click paste

Posted Aug 22, 2016 9:57 UTC (Mon) by tao (subscriber, #17563) [Link]

If you use Shift+Ctrl+C/V you can cut'n'paste in consoles too.

If you're like me you're gonna have to disable the Firefox debugger and change the adblock shortcut to Ctrl+Shift+U though, due to muscle memory confusion :)

Middle click paste

Posted Aug 22, 2016 21:43 UTC (Mon) by xtifr (subscriber, #143) [Link]

> If you use Shift+Ctrl+C/V you can cut'n'paste in consoles too.

Not according to my testing. Do you mean in a terminal window? If so, that would depend on the terminal app you're using.

At the actual Linux console (the one you get if you don't launch X), shift-ctrl-c is interpreted as ctrl-c; it sends SIGINT. Even if you have gpm installed. But if you have gpm installed, middle-paste works just fine at the console. Without X (or Wayland or anything).

At least on my system.

(I'm actually a little disappointed to find this doesn't work.)

Middle click paste

Posted Aug 23, 2016 6:59 UTC (Tue) by tao (subscriber, #17563) [Link]

Yes, I'm referring to a terminal window. I see little point in doing cut'n'paste between X/Wayland an the Linux console -- why would you switch back and forth? I can definitely see the utility of working from the Linux console from time to time, even though I do most of my work from a terminal window, but copying from X/Wayland to the Linux console, or vice versa?

If you're only copying from Linux console to Linux console the Wayland behaviour won't affect you.

FWIW I use gnome-terminal (but I'm guessing that anything that is backed by libvte will behave the same way).

Middle click paste

Posted Aug 23, 2016 18:51 UTC (Tue) by xtifr (subscriber, #143) [Link]

Well, this is semi-moot, since others have indicated that Wayland does support middle-mouse paste, or will soon. So I'm not particularly worried.

And you're right, it wouldn't affect me, *except* that I'm used to middle-mouse paste, and do it without thinking, everywhere, because it currently works *everywhere*. (Unlike ctrl-c/v.) So I've got that muscle-memory stuff to deal with. And no incentive to change to something that often doesn't work.... :)

(And, by the way, when I mention apps that don't support ctrl-c/v, I'm not talking about terminal apps.)

Another thing to think about: if you have middle-paste and ctrl-v, you have two separate things you can paste. I don't know about you, but I can and have taken advantage of that, and found it very handy (even if it only works in apps which support ctrl-v, and has some obvious limitations). It's probably saved me several hours of my life, all told. Without middle-paste, that utility goes away.

Middle click paste

Posted Aug 24, 2016 0:59 UTC (Wed) by whot (subscriber, #50317) [Link]

Whatever time I saved by having two separate buffers for middle click and ctrl+c/v is well offset into the negative by the amount of times I had to go back and re-highlight something to paste it with middle click :)

Middle click paste

Posted Aug 27, 2016 7:33 UTC (Sat) by jospoortvliet (subscriber, #33164) [Link]

I use this a lot, even more so with Klipper - ctrl-C a bunch of things and paste them somewhere else, relying on clipboard history. I write lots and lots of text and having separate buffers and a clipboard history is so important for my productivity I will not use something without those...

Middle click paste

Posted Aug 22, 2016 21:25 UTC (Mon) by xtifr (subscriber, #143) [Link]

Too many of the apps I use don't support Ctrl-C/Ctrl-V. Which makes your "it always works" claim somewhat overblown. It always works *in apps which support it*. Whereas middle-button paste *actually* always works, even if it can be (I admit) a bit trickier to use on occasion.

Of course, you're free to laugh at me for continuing to use the sort of older apps that don't support Ctrl-C/Ctrl-V. I don't mind. But I also don't plan to change. :)

Middle click paste

Posted Aug 23, 2016 14:31 UTC (Tue) by sdalley (subscriber, #18550) [Link]

We have lots of ancient X applications here. As an alternative to middle-click-paste, shift-INSERT also pastes the SELECT buffer, and seems to work in all of them.

Middle click paste

Posted Aug 23, 2016 16:22 UTC (Tue) by lsl (subscriber, #86508) [Link]

> Because with other apps, I often get the middle click paste wrong, either the selection has changed or I don't click at the right place (with a keyboard shortcut, I can first position the cursor at the right place, while with a click there can be a mouse movement at the same time).

If you can, you might want to get a mouse with a proper paste button instead of just a clickable mouse wheel. They can be a bit hard to get nowadays, but are worth every penny.

Fedora 25 to run Wayland by default

Posted Aug 23, 2016 2:41 UTC (Tue) by luya (subscriber, #50741) [Link]

Running Gnome Wayland on Fedora 24. Copy and Paster is working fine on middle mouse button and even touchpad.

Fedora 25 to run Wayland by default

Posted Aug 22, 2016 19:30 UTC (Mon) by meyert (subscriber, #32097) [Link]

I tried to use gnome Wayland in Fedora 24 with eclipse neon. But eclipse shows many strange glitches and behaviour under Wayland. Under x11 gnome everything works correctly. So I'm back to x11 for now.


Copyright © 2016, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds