12 ms·
The future of Wayland, and Sway's role in it
- hprotagonist 9y agolargely unrelated, but why is this and its reference compositor named after adjacent metro boston towns?
- Sir_Cmpwn 9y agowlroots -> wayland roots rootston -> pun on weston, the official wayland reference compositor
- wizbright 9y agoWell, if you dug a bit deeper and checked out the github repo it stands for: "SirCmpwn's Wayland compositor" I think the reference you are trying to draw is unrelated. Edit: Found it on Wikipedia. Ignore me but the Sway acronym still stands.
- kragniz 9y agoRed hat have offices near there
- Jasper_ 9y agoYep. Kristian Hoegsberg was driving through MA towns and just thought Wayland "sounded cool". Weston was named later.
- chimeracoder 9y ago> largely unrelated, but why is this and its reference compositor named after adjacent metro boston towns? They were driving through Wayland when they came up with the idea for the project. (Wayland and Weston are neighboring towns and sports rivals, so it sort of fits to use Weston as the name of the reference implementation.)
- kiddico 9y agoAs 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!
- wizbright 9y agoIt hasn't gotten there yet but it will soon! Release canidates are out at the moment as he just released 0.15-rc2
- kiddico 9y agoOoh, so close. I think I'm gonna count it. At least it's on my mind now, so I'll remember to check back in soon.
- wizbright 9y agoAfter he releases 1.0, they are doing to focus on wlroots which he does mention in the post. It is looking really promising and even now sway is still very usable.
- kiddico 9y agoI've always wanted to try my hand at making a window manager(or what is now called a compositor I think), so I may use wlroots as my base when it's done(or at least more done). The article confused me a bit, is the goal to have wlroots 'done' for the 1.0 release, or to release the 1.0, and then at some point move it over to wlroots?
- Sir_Cmpwn 9y agoWe're releasing sway 0.15 based on wlc. It will be the final wlc-based release, and the final 0.x release. The subsequent release, 1.0, will be based on wlroots, which is nearing completion now. https://github.com/swaywm/wlroots https://github.com/swaywm/wlroots
- galonk 9y ago"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 9y ago/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 9y ago> Pandora ... Nexus Eventually we're going to run out of fancy nouns.
- Aloha 9y agoYeah. The "why do I care?" part if often missing from posts on HN. The other posts I see are the ones exclaiming "X is harmful" while often only presenting a very narrowly construed use case, that doesnt fit the norm - or making a big to do about a nothing - another trope is posts promoting YAPL (yet another programming language) and YAF (yet another framework) - without making it clear why this programming language or framework is any better than the eleventeen other ones.
- mjw1007 9y agoIt's helpful, but I still had to guess whether those are tiles as in tiled rendering or tiles as in a tiled window manager. I think you have to know that Wayland uses the word "compositor" in a slightly odd way to get the right guess first.
- bane 9y agoMy favorite ones are the projects with project pages that describe themselves in terms of other buzzwordy project and trend names. "Buzzy is a new rewrite of Salad using an extensible monad-free Vomit dialect based on modern neopatterns. (note you'll need FooQwang3.7.2.1-R2 extensions installed in your pillar-tab in order to use it interactively)" At least techno-babble [1] could make you feel intimidated. This word salad nonsense just makes me feel utterly lost and apathetic. 1 - https://www.youtube.com/watch?v=PnkT6C9Ose8 https://www.youtube.com/watch?v=PnkT6C9Ose8
- coffeeaddicted 9y agoFirst 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 9y agoIt 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.html https://drewdevault.com/2017/06/10/Introduction-to-Wayland.h... For rendering clients will generally either use shared memory and dump pixels buffers into it, or will use shared EGL handles.
- sevensor 9y agoI'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.
- farresito 9y agoCan 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?
- mastax 9y agoI tried using it on Fedora 26, where it's the default. It worked well. I tried to install binary Nvidia drivers since that's supposedly possible with some hackery, but couldn't get it to work.
- Tharre 9y agoIf you don't need any binary drivers, and can live with libinput (touchpad support is still really bad, mouse is fine though) I'd say go for it. I've been using wayland for ~6 months now and except for the aforementioned limitations it has been working flawlessly for me.
- phkahler 9y agoI 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.
- cat199 9y agostep 1: offer 'x compatibility' step 2: make 'x compatibility' terrible step 3: profit!
- shmerl 9y agoFirefox is undergoing a major redesign of the engine, so may be after its switch to WebRender, Wayland support will get some traction. I suspect it's the reason for several other features being stalled in Firefox now as well, like hardware accelerated video playback.
- georgewsinger 9y agoSee 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 9y agoI 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?
- kakarot 9y agoWith current resolution, I don't think it's worth it. Probably in a generation or two.
- georgewsinger 9y agoText 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 9y ago> 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 9y agoOff topic but where do you park?
- apetresc 9y agoI'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?
- kiddico 9y agoI believe this is a result of wayland. The window manager now includes what you think of as compositing in the world of X11. The compositor just also happens to do the window placement. I think. I do not yet understand wayland, so if someone knows more I'd love if they shared. edit: that was sort of correct. More info here: https://en.wikipedia.org/wiki/Wayland_(display_server_protocol)#Wayland_compositors https://en.wikipedia.org/wiki/Wayland_(display_server_protoc...
- bostik 9y agoFew years back when I was working with Wayland on a particular automotive project I came up with an explanation we could use with those outside the project. Wayland is a protocol, which isn't really instructive. But the reference implementation, libwayland, is easier to comprehend. You can think of libwayland as a library for writing window managers directly on the framebuffer. Sure - that's a lie, but it's a helpful lie.
- Sir_Cmpwn 9y agoA 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 9y agoSo 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)
- kevin_b_er 9y agoAlas, 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 9y agoForwarding 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 9y agoAre 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.
- erik_seaberg 9y ago> 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 9y agoWhile 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 9y agoWhen 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 9y agoThe 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_protocol)#Overview https://en.wikipedia.org/wiki/Wayland_(display_server_protoc... . 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 9y agoI'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.
- snvzz 9y agoBeing 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 9y agoIt's just an environment variable. If you can't set an environment variable then power user tools probably are not for you.
- snvzz 9y ago>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 9y agoSway 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 9y agoOn 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 9y agoi3 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.
- s0l1dsnak3123 9y agoIs 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...
- thomastjeffery 9y agoUnfortunately, no. It's entirely up to NVIDIA to fully support KMS and Wayland, since they make a proprietary out-of-tree driver, and it doesn't seem likely in the near future. This is, IMHO, the biggest advantage (other than hardware cost) that AMD has over NVIDIA right now.
- Sir_Cmpwn 9y agoYou 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.
- runiq 9y agoI 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?