r/linux • u/nbHtSduS sway/wlroots Dev • Feb 18 '19
We are the sway & wlroots developers. Ask us anything!
Hiya! We're making our way towards sway 1.0 and thought it'd be nice to stop by and answer any of your questions about sway, wlroots, or wayland in general. We just released sway 1.0-rc3! Answering your questions are:
- /u/nbHtSduS, aka Drew DeVault: maintainer of sway & wlroots
- /u/emersion_fr, aka Simon Ser: core contributor to sway & wlroots
- /u/redsoxfan-devel, aka Brian Ashworth: core contributor to sway
- /u/ascent_wlr, aka Scott Anderson, core contributor to wlroots
Many of us work on other projects - feel free to ask about those, too. We'll be here answering questions for the next 3 days or so. Ask us anything!
Edit: thanks for your questions, everyone. We're signing off!
427
Upvotes
77
u/Travelling_Salesman_ Feb 18 '19
I know this subreddit has a fair share of people that are skeptic (or more then skeptic) about the whole concept of Wayland, so it would be nice to get some thoughts from people that have hands on experience.
Why is wayland better then X11?
81
u/girst Feb 18 '19 edited May 25 '24
.
40
u/[deleted] Feb 18 '19
Is the Vulkan renderer for wlroots still on the roadmap ?
30
u/adrianvovk Feb 18 '19
Do you think Nvidia is going to crack and finally support GBM?
I'm building a Linux distro with Wayfire as the only graphical environment, and I'm concerned about Nvidia support
24
u/[deleted] Feb 18 '19
Thank you for wlroots and sway!
One of the main reasons for moving to Wayland is the improved security compared to X11. Where does sway stand on that front? For example, I see that it's possible to take screenshots using the wlr-screencopy protocol. Can any client use this protocol or is that restricted somehow?
24
u/wedontgiveadamn_ Feb 18 '19
Thanks /u/emersion_fr, you do cool things.
22
u/silentstorm128 Feb 18 '19
Thanks for all the great work you've put into this!
I really like how you've separated out wlroots to a library, so that other projects can base off it.
Along those lines, it seems GNOME and KDE are each doing their own thing for wayland. Do you think it would be fruitful to try to put together some sort of collaborative effort with them, on a base library like wlroots?
I ask because, in general, it's better to try to share code, than to re-implement it in several different places. Or is the point of wayland, that there's not one way to do it?
16
u/RAZR_96 Feb 18 '19
Is color management on the roadmap?
32
u/[deleted] Feb 18 '19
Much love guys. Thanks for your contributions!
13
u/TheNinthJhana Feb 18 '19
An April 2018 article about terminal emulators latency provided nice benchmarks for Xorg thanks to "Typometer" . Article said, it was not possible to benchmark under wayland at the moment.
is the absence of a "Typometer" under wayland a security constraint, do you think it's feasible to add it, and actually my real question, do you think latency under wayland is good?
thanks!!
10
u/conaclos Feb 18 '19
Thanks a lot for your amazing work!
Is a stable release of wlroots planned?
10
u/[deleted] Feb 18 '19
Congratulations for making it into Debian Experimental (finally)!
Is sway going to be just like i3 or are planning on adding some new features or quality of life changes as your project moves more towards completion?
18
u/that1communist Feb 18 '19
What don't you like about wayland?
9
u/pereira_alex Feb 18 '19
Hi,
Like i said in a post a few days ago, https://www.reddit.com/r/swaywm/comments/arlb7f/new_to_tiling_but_loving_swaywm/ , I am loving swaywm, and its way of working ( tiling wm and wayland ).
So, since I have never used i3wm or other tiling wm's, may I ask what will happen when sway gets i3wm "feature parity" ? will it only be maintance or will it have features not found on i3wm ?
Also what is the best way of scripting ? I am getting to have alot of bash scripts already. In one way I love it, the "customizing by coding", but I fear that for everything I do, instance a sh/bash shell and exec bash code. Is there a better way to do things ? In the same area, is dbus a banned thing from swaywm/wlroots ?
Thanks, been very happy with swaywm since latest betas/rcs ! and becoming completly sold on the "tiling" wm thing !
9
u/kubq Feb 18 '19
Do you think Wayland is on it's way to replace X11 completely, or do you think that they will continue to live side by side?
9
u/[deleted] Feb 18 '19
Will something like xprop ever have a standard replacement on wayland? I don't care if it's part of the core protocol, but some standard replacement is needed. Otherwise a lot of software that people reply on now will simply be impossible to port to wayland.
9
u/Mrs403 Feb 19 '19
Just wanted to say thanks for Sway and pretty amazing to see /u/nbHtSduS for working as a full time free software. Hope the transition was smooth and thanks to all others contributors for working on Sway.
16
u/Suero Feb 18 '19
Drew, can you reveal the hidden ingredient that you used when cooking during the livestream?
7
u/MatiasConTilde Feb 18 '19
If I understood correctly, if a client application was not compiled with wayland support, it still needs an X server to run that interfaces with a kind of proxy that then communicates with wayland, so in most cases, it's still needed to run a whole bloated Xorg to use some applications, and with that in mind, is it even worth using the more simple and lightweight wayland?
Please correct me if I'm wrong, I might not have understood it well, and despite this kind of rant, I really think that wayland is a very good system and hope it gets adopted more widely, and relating to that, your work on wlroots and sway really is very helpful for the whole community, so thanks a lot for developing it to all of you!
7
u/ShinyRice Feb 18 '19
Can I fiddle with the keybindings in the config file enough so that sway behaves like dwm or is that something requiring source code tinkering? I imagine having the most basic features I'm after can't be hard, but I have to learn more C first.
7
u/slartiwhoop Feb 18 '19
At first thank you very much for your effort. I'm enjoying sway & wlroots the last few weeks on my laptop with a HiDPI configuration and I'm really looking forward for 1.0 and the further development!
As I'm more a high level language programmer what are some good entry points for developing "native" sway/Wayland applications (e.g. with HiDPI support) such as a simple tray or launcher using Python for example?
7
u/stef9998 Feb 18 '19
I read, that sway is i3 compatible now. So can I just copy paste my config and I'm good to go? Are there any downsides of switching?
6
u/wfrced Feb 18 '19
Thank you for the amazing work. I've been using
swaysince the switch to wlroots, and the words cannot describe how happy I am with it. I still remember pressing 'f' inmpvfor 5 minutes straight, comparing it to the artifact ridden XWayland version - one of my warmest memories.Kind of a stupid question - I can't help but notice that the cusor is not nearly as smooth as on Windows in
sway(especially when using a trackpoint). Is it a problem of input system, or is it render-related? Is it a known problem at all?11
u/YaLTeR Feb 18 '19
What's the progress on moving some of the more established and thoroughly tested wlr-protocols to wayland-protocols?
5
u/wedontgiveadamn_ Feb 18 '19
Are there significant battery usage gains to be had by switching over to wayland? I'm not so keen on reworking all my setup just yet since the benefits aren't so obvious to me, but this might convince me.
5
u/sitilge Feb 18 '19
Do you plan supporting static workspaces?
5
u/ivosaurus Feb 19 '19
What terminal emulators would you suggest to use that are wayland native?
Since this is typically old, complex and archaic software I have found not very much attention has been paid to this area even though having a terminal emulator to type in cli commands is a core part of the linux experience [some of the time].
Which emulators do you use (whether native or not)? The thing that came with the distro, or you customized?
4
u/LastFireTruck Feb 19 '19
Hi, thanks for all your work. My one persistent obstacle in using Sway is the way it renders on a 4k display. It's sort of strange. When it boots into the desktop everything is clear and crisp. But open a browser and everything renders sort of fuzzy and out of focus, as if the 4k resolution is just an upsized 2k or 1k. And strangely, say I open a terminal window or some other app, at first everything is crisp, but as soon as any window is resized, it goes fuzzy low-res like the browser window, and never recovers the crisp 4k res rendering. I'm hoping the hidpi issues were paid attention to in developing ver. 1.0. I know at some point it was on the bug/feature list. But I installed the daily build from the git repo recently, and didn't see any improvement, so I'm not hopeful at this point.
4
u/[deleted] Feb 19 '19
Sway is awesome, i use it for quite some time now without any major hicupps, thanks for making that possible :D
I would love to contribute and i realy appreciated the wlroots Tutorials... are there any additional ones in the making ?
4
u/PureTryOut postmarketOS dev Feb 19 '19
Not really a question, but more a request: please make wlroots (or at least the rootston binary) work with ConsoleKit2 as well. It would make my life porting Phosh to postmarketOS a whole lot easier :D
4
u/OneTurnMore Feb 21 '19
What's coming soon in Wayland that's worth getting excited about? What's been on my mind is
But is there any project which you think is awesome (one of your own or not) which is worth keeping tabs on this year?
Thanks for sway and wlroots, I just ported my i3 config this week!
8
u/[deleted] Feb 19 '19
At risk of sounding like a zealot: why did you guys pick C instead of Rust for making wlroots? Did the project start before rust was stable?
3
u/KillerBerry42 Feb 18 '19
Is there a standard way in wayland for mixing and matching different hotkey deamons with different window managers similar to what bspwm does on X11? My understanding is that both need to be handled by the compositor and therefore this functionality would need to be standardized outside of the core wayland protocols.
3
u/pizzalovingnerd Feb 18 '19
What advice would you give to Linux users switching to a tiling wm from a DE for the first time?
3
u/CosmosisQ Feb 19 '19
I know some C, but my experience working on anything related to compositing and window management is nonexistent. How can someone like me help out?
P.S. Sway and wlroots are beyond spectacular! Thank you so much for all of your hard work!
3
u/SupersonicSpitfire Feb 21 '19
Can one of the shaders from shadertoy.com theoretically be used as a live wallpaper, by modifying swaybg?
2
u/musicmatze Feb 18 '19
Hi. First: Thanks for all your work. My question: I want to move from my X+XFCE setup to something more minimal. My idea is to go to X+i3 or Sway, but with a minimal config, where I have only two "tags", one for a terminal (+tmux) and the other for firefox. On my desktop I have three screens (ATI graphics), so four tags there. Other GUI programs I run are telegram and zathura, but besides that I use terminal programs for everything. Everything is fullscreen all the time with minimal or no window deorations.
Should I try sway or stay with the environment I know (I used i3 before for several years)?
2
u/[deleted] Feb 18 '19
Is there a good resource for people that want to learn more about how display servers, compositors, Wayland (and etc) work? Btw, thanks for the great work guys :)
2
u/How2Smash Feb 19 '19
How does sway differ from i3? Of course, Wayland, Wayland and Wayland, but is there any users facing differences?
2
u/SnappGamez Feb 19 '19
My current setup is Manjaro i3. How can I switch over from i3 to Sway?
2
u/scientific_railroads Feb 19 '19
Thanks for your work. Do you think that Wayland as protocol is complete enough or is there some other parts that in ideal world should be also standardized?
2
u/Dutch_Mofo Feb 21 '19
Is there a way to disable the power button? I have a laptop where the power button is just a key above backspace. I tried
input "0:1:Power_Button" events disabledbut it doesn't work.2
u/multigunnar Feb 26 '19
Any idea when we can expect to just apt install sway on Ubuntu or Debian?
21
u/blackcain GNOME Team Feb 19 '19
This is really admirable. After a lot of FUD on wayland, you guys come out and do an AMA. Excellent.
10
u/zenolijo Feb 19 '19
I am a maintainer of the project ActivityWatch and we are unable to support Wayland because it's lacking the ability to expose window IDs and titles to other applications.
We just heard from a user that it is possible to get this information in sway specifically with
swaymsg -t get_treewhich is awesome, but we really want to avoid implementing WM-specific code.I also found a gnome-shell branch which tries to do the same thing because of some Flatpak requirement, but that branch has been stale for a while.
So my question is: as you guys have been talking with both KDE and Gnome devs about Wayland, can you please help create and push a xdg-desktop-portal protocol which supports this? Our application is cross-platform but our development efforts are really Linux-first as all main developers on the project primarily use Linux and we really don't want to be unable to support Wayland as we see it as a great improvement for the Linux desktop.
I don't really expect you guys to actually care about a use-case like this as it's pretty specific, but it's worth asking.
Here are the github issues:
https://github.com/ActivityWatch/aw-watcher-window/issues/18
https://github.com/ActivityWatch/activitywatch/issues/92
7
u/valgrid Feb 25 '19
If sway crashes does it restart and do I lose my work? (Similar to gnome shell on x vs. Wayland.)
6
u/[deleted] Feb 25 '19
Hey I think I must have used you program for like 10 hours today. It handles HiDPI really well. I have 2 questions:
5
u/roothorick Feb 19 '19
Based on a code example I saw (I can dig it up if needed) it seems like DRM leasing is based around the leasing application going directly to GBM when it comes time to establish graphics contexts and actually render. But what of an application that wants to mirror to a desktop window? SteamVR, for example. If, hypothetically, it supported Wayland, what relationship would its Vulkan instance have with the running Wayland compositor? How difficult is it to render once and display both on the leased display and on the desktop?
5
u/sincerelyyours- Feb 19 '19
I've been out of touch with recent Wayland development, but I recall that there was at one point a lot of discussion about how to standardize window decorations. When I last looked into it, every application/GUI toolkit had its own decoration style, leading to a messy and inconsistent looking desktop. This was one of the main things that scared me away from switching.
I was just wondering if this was still a problem for Wayland? Is it something addressed by wlroots?
Also, while I understand that 3rd-party hotkey daemons are currently not supported, has there been any discussion about how to add support for them moving forward?
Thank you!
5
u/nixd0rf Feb 19 '19
Why do you use GLES 2.0 instead of modern OpenGL 4+ or Vulkan?
4
u/StevenC21 Feb 19 '19
So I hear lots of people talking about X11 programs not working with Wayland.
Is this a thing? Do you have to rewrite a program for Wayland?
If so, how do you expect Wayland to become popular?
If you could shed some light for me that would be great!
4
u/StupotAce Feb 19 '19
So, I'm super late to the party, but I do have an area where I'm interested in developers' thoughts. What are your thoughts on having the Wayland protocol define everything required as a replacement for X11 vs splitting it up into multiple protocols/applications in places where it makes sense? Projects like pipewire come to mind, and the concept of clipboards come to mind. Do we really need the display server/compositor to define how clipboards should work universally?
Do you think Wayland extensions should be used to define separate protocols for things that can be separated?
Lastly, if you decide to respond, can you attempt to separate your answer into technical arguments and political arguments (i.e. getting all the DE's to agree on something)
4
u/[deleted] Feb 20 '19
Perhaps late but question from us artsy-fartsy people: Wacom and tablet support in wlroots/sway, I think most of us understand that this is hardly high up on the list of things to-do, but just out of curiosity is it something that may happen in the near future and should we hold our breath or just simmer down and be supportive from the other side of the fence for the foreseeable future?
4
u/bojanz Feb 20 '19
What's the FreeBSD support like nowadays? How difficult is it to support a non-Linux target?
3
u/m_deff Feb 22 '19
Thanks for you amazing job! Sway & wlroots are both great to use daily and drivers of innovation in wayland.
The one feature I'm missing (to the point of starting a parallel X11 session with i3) is output mirroring (e.g., for live programming on laptop + beamer). I saw https://github.com/swaywm/sway/issues/1666, which is more general but seems stuck due to its complexity. May we have simple mirroring first, even if limited to displays with the same resolution?
3
u/TheyAreLying2Us Feb 24 '19
Is there a way I can implement a completely dynamic Fibonacci/xmonad tiling layout?
2
u/CorgiDude Feb 20 '19
If there were issues with wlroots or sway on 32-bit systems, or big endian systems, would patches be accepted?
2
u/balr Feb 21 '19
Will sway handle backwards compatibility with X11 applications (through XWayland I suppose, but I have no idea how that works)? Will it be seamless to the user? For preservation's sake, it's important to keep being able to run all those legacy programs which may never be ported to Wayland (video games are a good example).
Thanks for the hard work you guys put into this project, I'm very grateful!
2
u/shibe5 Feb 21 '19
How do I configure keyboard layouts and how do I switch between them?
2
u/MagicClover Feb 21 '19
Does sway support a "night light" feature, like GNOME and KDE on Wayland?
2
u/nixd0rf Feb 28 '19
I know I'm a bit late, but the post is still sticky, so...
With upcoming Linux 5.0 and Mesa 19.0 releases, AMD finally brings VESA adaptive sync support to Linux. AFAIU, Wayland prevents tearing by design. VRR (variable refresh rate) would be a nice addition to that to decrease lag and potentially save power. Has VRR been a topic in Wayland? Would it require the clients to request VRR (afaiu, that's the case with X right now) or could the compositor do it automatically?
In case you don't know, here is a brief description of adaptive sync:
It allows with variable vblank intervals to sync the display refresh rate to the actual frame rate of the GPU. The most relevant use case is to draw video games smoothly to the screen without v-sync stuttering or tearing when the GPU can't constantly deliver as much FPS as the monitor's refresh rate.
It can also be used to play "weird" (but common) video formats with 23.976, 24, 48, ... FPS perfectly smooth on a 60 Hz screen, which would otherwise require interpolation and/or pulldown techniques etc.
Nvidia was first in VRR with their proprietary G-Sync, requiring a proprietary Nvidia hardware module in the monitor. AMD answered with what they call "FreeSync" and made the VESA standard "Adaptive Sync" at the same time. Intel confirmed that they'll be supporting VESA adaptive sync as well. In fact, the merge to Linux and MEsa took quite long because Intel and AMD devs wanted to have it as a vendor independent solution.