Page MenuHomeFreeBSD

Add section for Wayland in the x11 chapter
Needs RevisionPublic

Authored by trhodes on Oct 10 2021, 5:40 AM.
Referenced Files
Unknown Object (File)
Wed, May 3, 7:48 PM
Unknown Object (File)
Apr 9 2023, 1:48 AM
Unknown Object (File)
Mar 9 2023, 3:47 PM
Unknown Object (File)
Feb 28 2023, 7:14 PM
Unknown Object (File)
Feb 16 2023, 11:44 AM
Unknown Object (File)
Feb 12 2023, 6:09 PM
Unknown Object (File)
Jan 6 2023, 5:43 PM
Unknown Object (File)
Dec 15 2022, 8:44 PM



This change:

  • Adds a section about installing Wayland to FreeBSD;
  • Adds subsequent sections covering three compositors (Wayfire, Sway, and Hikari);
  • Works like a quick start guide covering major configurations and getting a screen lock working;
  • Adds a small section on Wayland utilities that might be useful.

Would like feedback on:

  • Anything else to add;
  • Check the flow of the information;
  • Validate I'm using the new tools properly;
  • Added Glen in case I can push this in before release. :P
Test Plan

This patch fully builds, has been proofread, and tested.

Diff Detail

Lint Skipped
Tests Skipped

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Should this be under X Window, or a chapter of its own? Having the former when the section begins with "not the same at all" feels awkward.


s/a new/new/


I would rewrite the 2nd sentence as "Xorg includes both the X11 protocol used to run remote displays and the X server which accepts connections and displays windows."

Also, I'm not at all familiar with Wayland, but I don't understand the first sentence. Are you trying to say:

  • there's no metaport for Wayland equivalent to xorg or xorg-minimal
  • the architecture of Wayland means there cannot be any such metaport
  • or something else?

1 sentence per line, and s/utilize/use/ (the latter being arguably taste).

Clarification request: I have no idea what "Wayland can manage composite communications between clients and a compositor" means. What are composite communications? Didn't you imply above ("intermediary between clients using a different mechanism") that the compositor was a client too? (In that case, perhaps ise "between applications and a compositor" or, if only one compositor can run on a given computer, "the compositor".)


It's what, 13 or 14 years old now? I would rewrite that in terms of "not all software has native support" or some such, without mentioning its age.


Is the description of architectural differences the right place to discuss a start-up option?


s/And a/A/


Does the comma after May need to be here? I thought it was only used when a day was present, like "May 8, 2021".


Again, this seems to be about using it - or perhaps describe support by existing DEs - so perhaps divide the whole Wayland section into general description and support by other software, installing, using, and troubleshooting? (Assuming that content is present below - getting ahead of myself.)


What's that functionality, and why would I want to use it or not use it?


I have no idea what that means, not even enough to try guessing possible intended meanings.


Since there was a discussion of (I think) several compositors earlier, this may be already part of the installing section if you go along with my suggested division.


Bourne. And sh(1) isn't the Bourne shell anyway, so I'd change this to man:sh[1].


s/the tmpfs file system/man:tmpfs[4]/
s/command and/command;/

I'd also add an example to keep the user from guessing or fumbling, perhaps

tmpfs /var/run tmpfs size=(whatever) 0 0

(check my syntax, and I have no idea how much to give it - du says it uses 59K on my laptop, but that doesn't include metadata, and my use case (X11+XFCE) has little in common with Wayland.)


Since you mention ZFS, I assume this is an alternative to tmpfs. I'd make that explicit.


Which scenario, tmpfs or ZFS+XDG_RUNTIME_DIR?


For traditional X11 managers such as Plasma and GNOME , seatd is not needed, but ...
s/need enabled/need to be enabled/ (may confuse non-native readers)
Is a compositor environment the same as a compositor? Or is it the Wayland equivalent of a DE?




I thought from the description at the start of this section that a compositor was more lie a X server? Or did you mean "compositor environment" here?


Beauty is in the eye of the beholder.


Famous to who? I have no idea what that is.


Please tell me there's a way to autoconf like with xorg.


s/hertz/refresh rate/ (Or is that the dot clock? I don't know what unit it uses. kilohertz? millihertz?)


Is it usable as a compose key?




s/was/is/g maybe?


s/the default/default/


s/valuable enough/used often enough/ (if that's what you mean, otherwise clarify)


s/maybe/may be/


Be sure to back up [.filename]#wayfire.ini# so all changes can be restored.

Pausing now, will look at the Sway section later.


One sentence per line.

I'm confused at the terminology here (having never heard of hikari before), so someone trying this for the first time will likely be as well. If "views" are windows, I'm not sure why use another word than the one consecrated by usage.

And I understand, sort of, that a sheet and a group are both a collection of windoows, but what is the difference between them and why does it matter?


Aren't the last 2 sentences saying the same thing?


Link to a specific manual page.

s/utilizing/using/ (or better, with)


The/This Hikari installation

s/comprise of/contain/ (or better, "use")

I'd make alacritty package:x11/alacritty[] for consistency.


"To start configuring Hikari, create..."


"the key bound to it" maybe? And which key is that?


s/it should be noted/please note/


It it L or L+Return? (Also, isn't "Enter" the preferred name?)

By "is actually", do you mean you just need to press the Windows logo key and Enter? Or the Windows key+L letter key chord?

"previously discussed" where? If you mean in "using the bound key press", I would call that a mention, not a discussion.


I'd just call it "the Windows key" or maybe "the left Windows key", consistent with question 11.5 in



"to be created for each"




Link to specific manual page (I assume man:hikari[]).

s/documentation it should be read/documentation; read it/ (or at least s/documentation/documentation and/).


s/kbd:[L] (Windows logo key)/kbd:[Windows]/


Without some explanation of how (and why) to mark a view public or not public, this is confusing and probably not useful here.

If they're hidden, how can they expose sensitive information?


It's discussed in the next section, not this one. Also, an intradocument link would be good.

One thing this is sorely lacking is accessibility options. The three areas that need a mention are:

  • sticky keys: for some people (eg, those with motor disabilities affecting fine motor control, arthritis, or other joint problems including various forms of joint pain) holding the Windows, pressing and holding shift, and finally pressing return isn't an option.
  • screenreader support.
  • voice control for people unable to type at all.

Done with sway (for the first read-through anyway), XWayland is next, after a message from our sponsor.


I'd suggest "For a basic configuration, make your own copy of the default sway configuration file and edit the copy:"


"The example above loads... and sets..." (and at the risk of repeating myself, I'd just call that key "the Windows key").


"Next, it selects alacritty as the terminal emulator and defines a screen lock command, as explained in more detail below." (with "as explained in more detail below" a link to where you explain more).

output "My Workstation" mode 1366x786@60Hz position 1366 0
output * bg ~/wallpapers/mywallpaper.png stretch

From this, I assume you mean something like:

The first output line sets the video mode and position, and the second sets background wallpaper and stretches it to fill the screen.

This leads me to the following questions:

  • What does "My Workstation" represent?
  • Can I tell Sway to use the largest display size the hardware support and if so, how?
  • If I can't do that, how do I find the exact parameters to supply? That is, how do I go from
VT: Replacing driver "efifb" with new "fb".
start FB_INFO:
type=11 height=1080 width=1920 depth=32
cmsize=16 size=8294400
pbase=0xb0000000 vbase=0xfffff800b0000000
name=drmn0 flags=0x0 stride=7680 bpp=32
cmap[0]=0 cmap[1]=7f0000 cmap[2]=7f00 cmap[3]=c4a000

(or whatever excerpt from /var/run/dmesg.boot holds the relevant info) to what I would need to use instead of "mode 1366x786@60Hz position 1366 0"?


Link to the actual manual page you mean.




s/the Windows logo key (mod)/kbd:[Windows]/
s/the kbd:[d] key/kbd:[d]/


Swap around to active, eg "Use the keyboard arrow keys to navigate the men.u"


"See man:sway-bar[5] for information on setting the layout of the bar and adding a tray."


s/using the combination of holding the Windows logo key/by holding the Windows key/


"Installing Sway from a package or using the (magic words for link to section 4.5) the FreeBSD Ports Collection also installs a default man:pam.conf[5] file under [.filename]#/usr/local/etc/pam.d#."


I'd remove that sentence unless you mean something else than the pam.conf manual page. (If you do, link.)


s/logo //

BTW, you can use kbd: for key combinations: see

Done with the first round. For the second one, if you don't use but prefer, can you make sure to use -U999999? That way, reviewers should be able to suggest changes directly instead of through a long seriess of s/foo/bar/.


Maybe explain why -devel? What are the pros and cons, eg for someone who privileges stability over features?


Either "way to (en|dis)able" or "method for (en|dis)abling"

Also, since the reader presumably wants to use it with their compositor, they likely care about enabling more than disabling, if at all about the latter. I wouldn't mention that - or not here anyway.






A link to the ports section would be good.


s/use // maybe?


Why wayland-1 here and :0 above?


Is that a trou


Should be "grep X11" (or "grep -i x11") to output the lines below.


s/ information//


Can you confirm it should be run as non-root?


Missing ]


Is that displayed in the terminal window where the failed instance was run? /var/log/Xorg.(mumble).log? Both?


Does the wayvnc documentation explain how to generate them? Are there any extra utilities involved?


s/overwritten/overridden/ unless you really mean running the server will change the file contents.


Trick I learned from hanging around on Wikipedia: add "2022" or "February 2022" to help readers ask or check whether that's still true.


I would remove at least this sentence, lest the reader think they should request that and flail because they have no idea how or who the port maintainer is. I would also consider removing the previous one, but I'm less positive there.


Comfort levels vary, but having to change /etc/gettytab and /etc/ttys isn't what I could call "minimal".




Where will it appear? ttyv1? Will vt switch to that automatically the way it switches to ttyv8 when running xdm -nodaemon on it in /etc/ttys?


s/At minimal/At a minimum/


s/setting ttyv0 up/setting up ttyv0/ (or better, "using ttyv0").

kbd:[alt+F1] should work. Same as the Windows key combo above.


s/swap/scroll/ maybe?

Do you mean "compositors"? I thought, based on the above, that Wayland didn't have window managers.

Also, "supported"? Did you mean "installed"?


"supporting"? Does waybar use PulseAudio?




Will it always be eDP-1? I have no idea what that is, other than the first of several similar lines in /var/run/dmesg.boot on my laptop.

This revision now requires changes to proceed.Feb 28 2022, 4:33 AM

Any update on this? Would love to show the world that FreeBSD supports Wayland to the degree that is described here.
We can then add stuff later once we already have a basic handbook chapter.

In D32436#791757, @bcr wrote:

Any update on this?

Are you and I waiting for each other to do something, or are you asking someone else?

In D32436#791757, @bcr wrote:

Any update on this?

Are you and I waiting for each other to do something, or are you asking someone else?

In general. There were some changes proposed which would still need to go into a new patch.
But I'm thinking if they are not too critical, then we should think about getting a Wayland chapter into the handbook in the first place and the do the fixes in a followup commit. That would not stall this initiative (having the info in a public place) and also enable others to contribute their own work.

In D32436#792520, @bcr wrote:

In general. There were some changes proposed which would still need to go into a new patch.
But I'm thinking if they are not too critical, then we should think about getting a Wayland chapter into the handbook in the first place and the do the fixes in a followup commit. That would not stall this initiative (having the info in a public place) and also enable others to contribute their own work.

I think (I think it would break doc build), (same) and (command and output text inconsistent) need to be fixed before committing this. probably should as well, as it feels misleadingly incorrect to me. Others may be able to wait for a follow-up, but I don't see the benefit of doing that, since this needs some changes anyway IMO.


I think I meant "a troubleshooting section", or maybe "a troubleshooting question/paragraph/whatever".

Sorry - I am always so busy, then I tell myself to look at this and never do because something always comes up in life. Anyway, how about I submit a new review where the section is migrated to a new chapter? Then we can continue improving and adding to a chapter instead of a section. I should have free time this weekend. Thanks! And sorry I go missing all the time! :(

Since a few people requested this be put it a single chapter, I created D35099. There are no content changes with this change, it just moves the current version to a single chapter. Then, I would like to work with everyone who has made comments here and make sure they are addressed. Thank you for your patience with me, my free time is not as abundant as we would like.