
The future of Wayland, and Sway's role in it - ingve
https://drewdevault.com/2017/10/09/Future-of-sway.html
======
kiddico
As an i3 user who harbors a non-zero amount of hatred for X11 it's exciting to
see sway has (nearly!) reached 1.0! I had the checklist for feature parity
with i3 bookmarked so I could check in on it but I've forgotten to look at it
recently, so it's nice to have this reminder pop up here!

Looks like i3-gaps support is basically done so I have no excuse not to switch
over now. Good work SirCmpwn and everyone else who helped!

~~~
baldfat
I just wish there was a way to use it on Windows and Mac OS! i3 and Window
Tiling is such a better user interface for my work flow. I have having to use
the mouse or track pad.

~~~
Sir_Cmpwn
That's by design ;) try using better operating systems!

~~~
baldfat
When work hands you a Macbook and you go ewww gross I get looks :) I HATE Mac
OS user interface. It is so convoluted and decisions based on things that were
wierd 15 years ago.

I doubt I'll get permission to install it on the mac. The mac is super locked
down.

Windows 8 was a decient compromise for me but I am in the tiny minority that
liked the Windows 8 interface it was the closest thing to a tiled window
manager.

~~~
Sir_Cmpwn
If you work somewhere that doesn't respect your autonomy enough to let you
work with the tools you like, then you should work somewhere else.

~~~
DesiLurker
Did you just suggest somebody leave their job because their employer wont let
them install a software package on their mac-book?

~~~
Sir_Cmpwn
Yes.

~~~
baldfat
You have a job for me? In the North East or West Virginia?

~~~
Sir_Cmpwn
There's loads of jobs on the east coast! And plenty of remote work even if you
can't move. Start looking, who knows what you'll find.

------
georgewsinger
See also Simula, a Wayland-based VR Linux compositor:
[https://github.com/SimulaVR/Simula](https://github.com/SimulaVR/Simula)

It's very close to be able to be working with the HTC Vive. With this, you
could put on a headset and see 50 terminals in front of you, next to your 50
web browsers :)

~~~
jMyles
I thought that the primary constraint here was hardware, and specifically
resolution?

Is it actually possible with current hardware to have a workable development
environment... err... ... world?

~~~
georgewsinger
Text resolution is the main issue; on current hardware, it's still not good
enough to use for extended periods of time, but I think this is partially
because nobody has bothered to optimize 3D text rendering to the extent that a
viable 3D Desktop would require it.

Does working in VR sound appealing to you?

~~~
jMyles
> Does working in VR sound appealing to you?

Heck yeah!

Not only because of feature-richness (a debugger that lets me climb up and
down the execution stack sounds rad) but also for space-saving: I live in a
school bus, so a 3-monitor standing desk isn't really a very viable option.

But if a VR or AR headset can turn a hallway into that, I'm in!

~~~
gravypod
Off topic but where do you park?

~~~
jMyles
This page has coords for many of the places we've parked over the course of
the past year:

[http://thisisthebus.com/travels.html](http://thisisthebus.com/travels.html)

------
farresito
Can anyone share his/her experience with Wayland? I'm on Arch, using i3wm, and
have thought about switching to Wayland, but I'm not sure what problems I will
encounter, and I would love to not have to spend a weekend to fix or revert
back to X11 if things are still immature. Has anyone used it daily for a
decent amount of time?

~~~
phkahler
I run it on Fedora 25. It's nice, but Firefox still uses xwayland and tends to
crash the entire session too often. This may be my ancient video card, or it
may be xwayland or some combination. Everything else works quite well and I'm
looking forward to Fedora 27 which will hopefully fix my issue.

Firefox IMHO really needs to get native Wayland support out of the box. Not
sure if Fedora is using the wayland version of LibreOffice, but it should be
by now.

~~~
Sir_Cmpwn
Please report bugs. "Crashes the entire session" is something we need to hear
about.

~~~
phkahler
I used the automatic reporting tool. Reproduction is simple. Run firefox on
NV44 (Ben used to have one. I have a spare with less RAM if anyone cares about
nouveau on that any more). Bring up cookie clicker in the browser and let it
run for a bit. It will crash.

More recently gnome crashes right after login, but then doesn't when I login a
second time. I don't think the automatic reporting is working for this one.

I figure at this point I'll let it slide until I upgrade and then get more
vigilant about reporting problems. Unfortunately the auto-upgrade didn't work
for me this time, so I'll reinstall 26 or 27 from scratch.

~~~
Sir_Cmpwn
Automatic reporting tool? We don't have one of those. Your report probably
went to /dev/null.

Hacker News isn't the right place for your bug report, though, please file a
GitHub issue here:
[https://github.com/swaywm/sway/issues/new](https://github.com/swaywm/sway/issues/new)

~~~
ibotty
I am pretty sure it's abrt, this reports to downstream. I don't know whether
they get passed upstream, but sometimes they do.

------
apetresc
I'm getting confused about the term 'compositor'. I thought it was something
like Compton, which sat between the application and X to combine layers on the
GPU. The word has a similar meaning when talking about, say, browser
rendering.

But sway is much more than that – it manages windows, handles input, etc. Why
does it refer to itself as a compositor everywhere?

~~~
Sir_Cmpwn
A simplified view follows:

Previously: displays & input devices -> xorg-server -> compton -> window
manager -> X11 protocol -> X11 clients

Now: displays & input devices -> wayland compositor -> wayland protocol ->
wayland clients

~~~
apetresc
So does that mean that if you wanted to port, say, Xmonad to Wayland, you
would have to reimplement compositing logic again? (Since the existing
compositing-logic implementation also handles things like window placement
that you would want to override)

~~~
Sir_Cmpwn
In theory, yes. In practice, you could build something on top of wlroots,
which does a lot of the work for you. In fact, check this out:

[https://github.com/swaywm/hsroots](https://github.com/swaywm/hsroots)

~~~
apetresc
Thank you for the clarifications :)

------
kevin_b_er
Alas, I've still seen no news of X11 forwarding or an equivalent capability.
I've heard that it isn't wayland's job anymore, but nothing to replace that
major feature yet.

~~~
Sir_Cmpwn
Forwarding isn't going to happen, but we have plans to implement RDP. X
forwarding via Xwayland actually still works on Wayland, by the way.

------
mrweasel
Are there any sort of dead simple Wayland compositors, like MWM or OpenBox,
for people who doesn't want the full KDE or Gnome desktop, but still prefer a
tiling windows manager.

~~~
craftyguy
Sway?

~~~
mrweasel
Sorry, that should have been “non-tiling”.

------
coffeeaddicted
First time I hear about wlc. And I'm curious about something. Does wlc only
help to write compositors or can Window/3D libraries also access that? For
example when writing a 3D library which should run on Wayland - do I have to
write support for every compositor out there to get things like input and
copy-paste working or is there a common base-library I can use (like wlc
maybe)?

~~~
Sir_Cmpwn
It only works with compositors. For an introduction on the client perspective,
I have another article you can read:

[https://drewdevault.com/2017/06/10/Introduction-to-
Wayland.h...](https://drewdevault.com/2017/06/10/Introduction-to-Wayland.html)

For rendering clients will generally either use shared memory and dump pixels
buffers into it, or will use shared EGL handles.

------
sevensor
I've been happily using sway everywhere I've found it to be stable. At the
moment that's every machine I have access to that has intel or AMD graphics. I
think my one system with nouveau graphics may be ready to convert from i3
also, since I've been trying it periodically and it seems to be OK. The one
machine I'm still scared to touch has to use nvidia because it flat-out
refuses to work with nouveau. At any rate, I'm quite pleased with sway. It's
compatible with i3 to the point that I often forget which one I'm using.

------
snvzz
Being a happy i3 user, as promising as sway is, I was disappointed last time I
tried it, due to usability concerns to do with very basic functionality.

Specifically, the necessary hops for just setting the keymap.

~~~
Sir_Cmpwn
It's just an environment variable. If you can't set an environment variable
then power user tools probably are not for you.

~~~
snvzz
>It's just an environment variable.

Sure. Which needs to be in the env sway gets passed. Which makes for some
seriously ugly wrapper script needed, just to pass the stupid variable.

>If you can't set an environment variable then power user tools probably are
not for you.

I think you're missing the point. It'll be a shame if sway 1.0 is released
like this.

~~~
Sir_Cmpwn
Sway 1.0 will have a different means of configuring the keyboard, but only
incedentally. I think that there's nothing wrong with the environment variable
approach _or_ with writing scripts.

~~~
pmoriarty
On i3, to reconfigure the keyboard you just edit the config file and in your
terminal type "i3-msg" reload.

Can you do the same with sway without restarting it?

~~~
Sir_Cmpwn
i3 doesn't have any keyboard configuration options, so... unless you're just
talking about keybindings, which you can totally reconfigure in Sway and
reload without restarting. What you can't do in either is set the keymap on
the fly without restarting. This is something you can do on i3 but it's an X
thing, unrelated to the i3 config. On sway you can configure multiple keymaps
ahead of time and switch between them without restarting, but cannot change
the configured keymaps on the fly.

Changing your keymap at runtime is something we hope to have in sway 1.0. We'd
also like to support multiple keyboards with different keymaps and even
configuring which keymap you use on specific windows.

~~~
pmoriarty
Yes, I was talking about keybindings, and it's reassuring that Sway is just as
capable as i3 in this area.

I'm looking forward to giving Sway and Wayland a try.

------
hprotagonist
largely unrelated, but why is this and its reference compositor named after
adjacent metro boston towns?

~~~
kragniz
Red hat have offices near there

~~~
Jasper_
Yep. Kristian Hoegsberg was driving through MA towns and just thought Wayland
"sounded cool". Weston was named later.

------
runiq
I would have loved switching to Sway back when I tried it months ago, but what
held me back was the clipboard story between X and Wayland apps being either
finicky or nonexistent. Has this been solved yet, as in, is there a way to
copy-paste between X and Wayland apps?

------
erik_seaberg
> Communicating with Wayland clients

> Xwayland (X11) support

Is this still the only way to use Wayland that doesn't require running
everything on a single machine? I still don't understand why Wayland is
getting so much attention when it doesn't seem to have any native clients.

~~~
simcop2387
While I'd be surprised if it doesn't work for that, Xwayland support is more
for running older X11 programs that either haven't or won't receive a wayland
port. It'd the way for backwards compatibility so that it's not an all or
nothing endeavor.

~~~
erik_seaberg
When an app has been ported to Wayland, how does it work? At the risk of
sounding dumb, how do the pixels get from the datacenter to the framebuffer if
not by Xwayland?

~~~
simcop2387
The wayland protocol itself doesn't handle network transparency like X11 tries
to (i say tries because there are issues with it). My understanding is that a
large portion of it is done through shared memory, unix sockets and other
things like that.

A detailed overview of it is here,
[https://en.wikipedia.org/wiki/Wayland_(display_server_protoc...](https://en.wikipedia.org/wiki/Wayland_\(display_server_protocol\)#Overview)
.

Essentially the client connects to the socket created by the compositor and
asks it to pass a surface (basically the same as a frame buffer) back that
matches what the client wants to draw. The client then draws on the surface
(via GL, raw pixels, cairo, etc.) and then tells the wayland compositor that
the surface is ready to display. The surfaces can have a number of things set
about them, such as the color depth, if they're hardware (gl, vulkan etc)
capable and other things like that.

This is why it's hard to make wayland network transparent because the
compistor and the client are much more intertwined than X11 and it's clients
were. This enables better performance and eliminating tearing and a few other
problems that X11 just isn't equipped to do normally. It does mean however
that you should be able to make a wayland compositor that forwards the
surfaces from itself to another wayland compositor similar to how X11
forwarding works, but this isn't specified as part of the wayland protocol
itself.

My expectation for what will work best for that is something that allows using
modern video and image compression to allow the transfer to occur without
using as much bandwith as modern X11 apps require when forwarding them. This
would also mean then that clients have to use the hardware available to them
rather than the hardware available to the display server. With X11 it's
possible to do GL remotely (i've never had that work well) but it'd be much
more difficult to set this up over wayland.

------
lgunsch
I've used i3 for many years now. It's wonderful to see a tiling WM for Wayland
with near feature-parity to i3. It probably makes it much easier when i3 has
avoided feature creep, and has clean readable code.

------
s0l1dsnak3123
Is there any sense of if/when nvidia's proprietary drivers will work with
Wayland? I built a new machine with an Nvidia 1080Ti less than 4 weeks ago.
I'd rather not have to switch...

~~~
Sir_Cmpwn
You are making bad choices as a consumer by spending all of that money on
flashy new graphics cards from Nvidia. I'm not interested in supporting a
company that treats Linux as poorly as Nvidia does. Buy cards that have good
open source driver support. The burden is not on sway to support Nvidia, but
on Nvidia to support sway. AMD and Intel seemed to manage it just fine.

------
galonk
"Sway is a tiling Wayland compositor, if you didn’t know."

Let me just say thank you very much for adding this sentence :)

I feel like 50% of headlines on HN are written like "New version of qx58g" and
somehow none of the headline, the comments, or the linked article will give
any indication what qx58g is.

~~~
stephengillie
/s/qx58g/GenericPhrase

"New version of Pandora Nexus released."

Great - is this any relation to the 2 Pandoras or the several Nexuses? Does
this play music on my phone or move assets into a VM? Neither, it syncs
bookmarks between browsers.

~~~
ethbro
_> Pandora ... Nexus_

Eventually we're going to run out of fancy nouns.

