Other Sway is an i3-compatible Wayland desktop for Linux and FreeBSD

That sentence caught my eye in the blog post Announcing the release of sway 1.0 by Drew DeVault, because I could not find any further information, tutorial or blog posts about installing, configuring and using Sway on FreeBSD.

Everything including the especially created tools (except one) is available in a current version from ports:
  • x11-wm/sway: i3-compatible Wayland compositor
  • x11-toolkits/wlroots: Modular Wayland compositor library
  • x11/swayidle: Idle management daemon for Wayland
  • x11/swaylock: Screen locker for Wayland
  • mako: notification daemon (missing because depends on systemd or elogind for the sd-bus library) -> What would be an equal replacement?
  • x11/grim: Grab images from a Wayland compositor
  • x11/slurp: Select a region in a Wayland compositor
  • multimedia/wf-recorder: Screen recorder for wlroots-based compositors
  • x11/waybar: Highly customizable Wayland bar for Sway and wlroots-based compositors
  • x11/virtboard: Basic keyboard, blazing the path of modern Wayland keyboards
  • x11/wl-clipboard: Command-line copy/paste utilities for Wayland
  • x11/wallutils: Utilities for handling monitors, resolutions, wallpapers and timed wallpapers
I assume that should make a nice desktop environment that has no reason to hide behind the equivalent on any GNU/Linux distribution, but how to get there on FreeBSD?

Is x11/xorg, x11/xorg-minimal or x11-servers/xorg-server required? And what about x11-servers/xwayland?

Somebody here surely must be already using Sway, so what's the experience? Any advantage over x11-wm/i3 or x11-wm/i3-gaps or better stick to Xorg for the time being?

I know that fractional scaling (like on my 28" UHD monitor currently set to 150%) works better on Wayland, but especially problems with copy&paste and (ungoogled-)Chromium with broken VAAPI-support in the ozone-build for Wayland made me go back to Gnome in Xorg Session on my current setup in Arch Linux (I'm still not using FreeBSD, just evaluating everything for the intended move and trying to read up on FreeBSD desktop/laptop related things as much as I can on a daily bases).
 
How to using sway with wayland on FreeBSD?

We have a drop in replacement for Sway called i3. Our version of i3 much more advanced than Sway in that it is "network" aware, which means that it can be rendered across different machines via a smart network protocol called X11.
This also makes it much more portable to other operating systems.

Importantly, our version of i3 is built upon an abstraction layer known as xcb which allows it communication with the X11 renderer known as Xorg. What is also fantastic about this is that i3 can utilize high quality components (i.e xrandr, glxinfo, xbacklight, xset) for a multitude of tasks to interact with our advanced window system.

It has taken many *many* years for us to get here but we are well ahead of Linux at this point.

Wayland is extremely immature in comparison; so unlike that, we have meticulous documentation covering the entire system (https://www.x.org/releases/X11R7.6/doc/). You should definitely check it out. Documentation is the most important part in my opinion.
 
not much on reddit.
Truer words were never spoken. If you want info, ask here or on the mailing list and, then, https://unix.stackexchange.com/ Reddit is only for when all hope is lost and 15-year old gamers are your only hope.

EDIT: I'm going to backtrack a little bit on that statement. Only about 80% of the people there are 15-year old gamers so you might get lucky and get a response from one or two who might guess at the right answer or even actually know the answer. In any case, reddit should always be your choice of desperate, last resort.
 
More precisely, the problem with questions on /r/freebsd is that there are dozens of aggressively clueless people ready to leave a comment on any topic within 5 minutes of thread creation. By the time an actually competent person has any chance to see the question (those are busy people and they don't check Reddit that often) there is a huge pile of dumb answers and everyone has already moved on.

Oh, by the way, afaik Wayland is mostly discussed on the FreeBSDDesktop Gitter chat.
 
Could you please elaborate on this?
(I'm just curious about it - I use MATE, which doesn't support Wayland for the moment, so I haven't had to learn about Wayland yet.)

Wayland is basically a set of communication guidelines that allow applications to connect with a window manager (called a compositor). Unlike X11, programs connect to the window manager directly rather than through a standard intermediate (such as the Xserver). This unfortunately means that the window managers are complex! They need to implement a lot of functionality themselves (even as far as xrandr, xproperty atoms, etc.). Unfortunately, a developer with a cool usability idea is often not the same kind of developer that has the appropriate skillset to develop anything like the features found in xorg. This means we will get either lame compositors in terms of usability, or they will be implemented extremely poorly/insecurely.

Plus there is no specification in Wayland (yet!) for compositors to handle things like the equivalent to XDMCP. It is always said that it is "out of scope" (until they can come up with the solution). For this reason you will not get enterprise functionality (such as a standard multi-user display system) for many years to come. Yes, you will get it with Gnome/Wayland at some point, but not with Sway/Wayland, or visa versa. It is going to be messy. It is also going to be directed to "Linux consumers and gamers" which means enterprise functionality will be the very bottom of priority.

In theory I like the idea behind Wayland and it is a good thing to have but it is *not* a replacement to Xorg for workstations. By design, it never can be in the same way that a maximized XTerm cannot be.
 
In theory I like the idea behind Wayland and it is a good thing to have but it is *not* a replacement to Xorg for workstations. By design, it never can be in the same way that a maximized XTerm cannot be.
Thanks for the provided information, I have already ticked off Sway/Wayland and will stick to Xorg. Now I only have to find a way to get fractional scaling done properly in Xorg or buy a new monitor suitable for UHD without scaling.
 
Now I only have to find a way to get fractional scaling done properly in Xorg or buy a new monitor suitable for UHD without scaling.

I used to have a hi-res monitor. I was not a massive fan, it wasted too much energy and made everything needlessly sluggish.
Graphics are wasted on me though. I am sure 3D modelling, photo editing are really nice with it!

I used to get round all the broken software by using:

Code:
$ xrandr --output <lcd> --auto --scale-from 2048x1024

or

Code:
$ xrandr --output <lcd> --scale 1.25x1.25
 
Code:
$ xrandr --output <lcd> --auto --scale-from 2048x1024
or
Code:
$ xrandr --output <lcd> --scale 1.25x1.25
Unfortunately that's only half the solution. Do get proper fractional scaling one needs to first zoom in with a larger even DPI setting and then zoom out using xrandr with the desired fractional scale. Here is a nice summary of the procedure.

The info from the Arch Linux Wiki was most useful for this. For Gnome on Xorg I currently use a patched mutter with the experimental fractional scaling patch from Ubuntu, which kind of works but has inconvenient side effects (slowdown and screen tearing, full-screen video not working). But I intend not to use a full DE in the future anymore but just a WM.
 
A bit off topic perhaps. but what is fractional scaling? I use FreeBSD with x11-wm/fluxbox on a Dell Ultrasharp 34" 4K monitor at 3440x1440. Not "true" 4K but close enough. The system is fast and responsive and I have not implemented any type of scaling; no xorg config, everything just works. Fonts prior to starting xorg are a bit small but still perfectly readable. I have run enumerable Linuces and both DE's and WMs on this set up and not had any performance or visual issues in terms of font size or dialog/control size issues.
 
Dell Ultrasharp 34" 4K monitor at 3440x1440.
As shkhln already wrote, that's a perfectly fine panel size to resolution ratio to work without scaling and nevertheless have everything perfectly readable. My current 28" UHD monitor (what a mistaken investment) is unusable without scaling, which I currently have set to 150% to make any sense (which effectively reduces its resolution to 2560 x 1440 pixels and again not enough screen estate). For UHD (3840 x 2160 pixels) it would be a 43" panel, but since that size is not available as a curved version, I'm still eying the size of curved 38" with 3840 x 1600 pixels, because having to use (fractional) scaling is just wrong and complicates things a lot.
 
Back
Top