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)
Oct 1 2024, 7:37 PM
Unknown Object (File)
Oct 1 2024, 11:28 AM
Unknown Object (File)
Oct 1 2024, 5:49 AM
Unknown Object (File)
Sep 27 2024, 6:50 PM
Unknown Object (File)
Sep 27 2024, 1:25 PM
Unknown Object (File)
Sep 25 2024, 4:56 PM
Unknown Object (File)
Sep 25 2024, 2:34 PM
Unknown Object (File)
Sep 24 2024, 11:48 PM

Details

Summary

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
Lint Skipped
Unit
Tests Skipped

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
documentation/content/en/books/handbook/x11/_index.adoc
1645

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.

1651

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".)

1653

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.

1654–1656

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

1664

s/And a/A/

1668

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

1669

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.)

1674

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

1686

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

1696

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.

1697

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

1712

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.)

1713

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

1714

Which scenario, tmpfs or ZFS+XDG_RUNTIME_DIR?

1718

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?

1719

s/now,/now/

1727

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?

1734

Beauty is in the eye of the beholder.

1753

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

1759

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

1765

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

1795

Is it usable as a compose key?

1798

s/nless/Unless/

1808

s/was/is/g maybe?

1809

s/the default/default/

1822

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

1831

s/maybe/may be/

1844

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

Pausing now, will look at the Sway section later.

documentation/content/en/books/handbook/x11/_index.adoc
1854

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?

1854–1855

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

1857

Link to a specific manual page.

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

1858

The/This Hikari installation

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

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

1872

"To start configuring Hikari, create..."

1890

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

1891

s/it should be noted/please note/

1892

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.

1893

I'd just call it "the Windows key" or maybe "the left Windows key", consistent with question 11.5 in https://docs.freebsd.org/en/books/faq/#X11.

1894

"requires"

"to be created for each"

1917

s/button/key/

1919

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/).

1923

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

1924–1925

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?

1926

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.

documentation/content/en/books/handbook/x11/_index.adoc
1946

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

1974

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

1975

"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).

1976
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
end FB_INFO

(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"?

1980

Link to the actual manual page you mean.

1981

s/customing/customizing/

1983

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

1984

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

1985

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

1997

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

1998

"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#."

2000

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

2002

s/logo //

BTW, you can use kbd: for key combinations: see https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/#ex-kbd.

Done with the first round. For the second one, if you don't use https://wiki.freebsd.org/Phabricator#Create_a_Revision_via_command_line_.28if_using_git.29 but prefer https://wiki.freebsd.org/Phabricator#Create_a_Revision_via_Web_Interface, 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/.

documentation/content/en/books/handbook/x11/_index.adoc
2025

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

2026

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.

2038

s/recommened/recommended/

2046

s/build/built/

2047

A link to the ports section would be good.

2065

s/use // maybe?

2090

Why wayland-1 here and :0 above?

2094

Is that a trou

2100

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

2103

s/ information//

2119

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

2124

Missing ]

2126–2131

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

2169

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

2171

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

2181

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

2183

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.

2188

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

2196

s/,/;/
s/import/important/

2212

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?

2214

s/At minimal/At a minimum/

2218

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

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

2221

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"?

2229

"supporting"? Does waybar use PulseAudio?

2254

[.programlisting]

2261

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 https://reviews.freebsd.org/D32436/#inline-212355 (I think it would break doc build), https://reviews.freebsd.org/D32436/#inline-212373 (same) and https://reviews.freebsd.org/D32436/#inline-212353 (command and output text inconsistent) need to be fixed before committing this. https://reviews.freebsd.org/D32436/#inline-212362 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.

documentation/content/en/books/handbook/x11/_index.adoc
2094

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.