Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wayland chat
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
teika
Apprentice
Apprentice


Joined: 19 Feb 2011
Posts: 163
Location: YYYY-MM-DD, period. Have you ever used the Internet?

PostPosted: Sun Oct 03, 2021 12:51 pm    Post subject: Wayland chat Reply with quote

EDIT: The original post was titled "If you have never tried Wayland, first read this". But the thread has evolved into a Wayland chat. ;)

Q: Should I migrate to Wayland?
A: Not yet, as of 2021. Probably you can live in X, at least, until the end of 2023.

Here's what users should know first before switching from X to Wayland.

From a user's point of view, Wayland is nothing more than a framework. In particular, Wayland itself does not implement any display server that should correspond to the Xorg server. In Wayland, compositors are display servers. Moreover, a compositor also serves as X's window manager (and X's compositor).

This means users first have to choose a compositor, and via that compositor they "configure the server", i.e. set screen resolutions, input and video drivers options, etc.

The situation however is not totally random, by being up to each compositor - many compositors depend on the library "wlroots", which abstracts such common tasks. See below for more details.

N.B. The Wayland project themselves provide the compositor Weston, which is a reference implementation (Wikipedia article) of the Wayland compositor. Though meaningful for developers, Weston is not really meant for users' daily use.

The library "wlroots" provides common compositor tasks. It is aimed to be "unopiniotaned". First started as a subproject of the compositor Sway, now it is used by many compositors. Exceptions include mutter and KWin, i.e. GNOME and KDE, and weston, which is a minimal, reference implementation.

Disclaimer
The above explanation may have loose ends. (I haven't tried Wayland at all.) Sorry beforehand, and I'll fix if you point out some. (And my English is far from perfect.)

Rant
The above is what I posted to Arhclinux Wiki just now. It is what I myself want to have read years ago.
Nerds have copied and pasted the cliché "Wayland is a protocol" (A) zillions times. It is a terrible self-satisfaction, and totally wrong, even if the sentence (A) is correct. I'm fed up with such people who don't know how to communicate.

Edit: Added the top question and answer. (8 Oct)
_________________
Hack of easy Shift / Ctrl / AltGr etc; save your pinkies, type without drudgery: topic 865313

BTRFS - Biden & TRump, Fools Suck.


Last edited by teika on Sat Nov 06, 2021 5:43 am; edited 5 times in total
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20488

PostPosted: Mon Oct 04, 2021 6:18 pm    Post subject: Reply with quote

Thanks for the clarification. I tried to use sway years ago and couldn't get it to work. Some day I plan to give "Wayland" another shot, but I'd prefer to use something like dwm. As I understand other explanations, it isn't possible for something as simple as dwm to exist due to how "Wayland" works.

Do you understand that issue well enough to clarify why it isn't possible?

I currently use i3, but only because I haven't gotten around to switching to dwm (and making some basics configurable without recompiling).
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6160
Location: Dallas area

PostPosted: Mon Oct 04, 2021 6:38 pm    Post subject: Reply with quote

Code:
dwl - dwm for Wayland

Join us on our Discord server!

dwl is a compact, hackable compositor for Wayland based on wlroots. It is intended to fill the same space in the Wayland world that dwm does in X11, primarily in terms of philosophy, and secondarily in terms of functionality. Like dwm, dwl is:

    Easy to understand, hack on, and extend with patches
    One C source file (or a very small number) configurable via config.h
    Limited to 2000 SLOC to promote hackability
    Tied to as few external dependencies as possible


https://github.com/djpohly/dwl
_________________
UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20488

PostPosted: Mon Oct 04, 2021 8:10 pm    Post subject: Reply with quote

Thanks, I'll at least take a look at the code to see if I can understand the basic differences. If nothing else that suggests progress from however old my "can't be as simple as dwm" information is.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6160
Location: Dallas area

PostPosted: Mon Oct 04, 2021 10:12 pm    Post subject: Reply with quote

I've not used either dwm or dwl.

A resource list for various wayland tools/etc, https://github.com/natpen/awesome-wayland
_________________
UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20488

PostPosted: Tue Oct 05, 2021 1:40 am    Post subject: Reply with quote

Thanks. I've only used dwm briefly because configuring it requires modifying the code and recompiling it (my first goal would be to reduce that need). I'm mainly interested in it as I've long wanted to learn how to create a WM. dwm being minimal seemed like a good starting point. It's nice to know there's a similar reference point if X becomes untenable by the time the planets align.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
teika
Apprentice
Apprentice


Joined: 19 Feb 2011
Posts: 163
Location: YYYY-MM-DD, period. Have you ever used the Internet?

PostPosted: Tue Oct 05, 2021 4:44 am    Post subject: Reply with quote

Quote:
configuring it requires modifying the code and recompiling it (my first goal would be to reduce that need). I'm mainly interested in it as I've long wanted to learn how to create a WM.


How about Qtile, written in python, or Xmonad/Waymonad in haskell?

I use x11-wm/sawfish, which is mostly written in Lisp (more precisely a special Lisp dialect). It means you can often write a code and change the WM behavior on the fly. Xmonad/Waymonad may not be that dynamic, but anyway very flexible.

BTW
Quote:
...I've long wanted to learn how to create a WM.

Wayland compositors are not mere window managers, because they're the display servers in the first place.

For long, I had thought that a Wayland compositor corresponds to X's window manager. In fact, the Gentoo Wiki page Wayland Desktop Landscape says "A compositor in Wayland is the equivalent of a window manager in Xorg".

I guess such misleading hints exist everywhere. Unfortunately now there's the portage category "gui-wm". X|
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Tue Oct 05, 2021 2:33 pm    Post subject: Reply with quote

What is the purpose of wayland? Just "Not Invented Here"?
A more modern code implementation of the Xorg interface I could see. But throwing it all away, I don't.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6160
Location: Dallas area

PostPosted: Tue Oct 05, 2021 3:15 pm    Post subject: Reply with quote

A wayland compositor is just like an X11 wm (some of which had compositing built in, for others an add on) but both are combined in a compositor.
But the compositor also takes on some of the abilities that the X11 server had (kbd handling, talking to "graphics engine", etc), which is a necessity since there is no centralized server.

As far as the purpose of wayland, think of it as an evolution of X.
Unfortunately there was no way to cleanly undo the spaghetti code that X has turned into over the decades, thus starting out a new path, I suppose in a way wayland could be called X v2.0 or maybe X v3.0.

Anyway, no one is being forced to use wayland over X, even on gnome/kde which prefer wayland, you can make it stick to strictly X.
_________________
UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22711

PostPosted: Wed Oct 06, 2021 1:47 am    Post subject: Reply with quote

Tony0945 wrote:
A more modern code implementation of the Xorg interface I could see. But throwing it all away, I don't.
As in so many projects, the responsible parties decided that it was easier to throw everything away and "Do it right, from scratch" than try to incrementally unwind problems and deprecate the worst parts. Also, as in so many projects, that means some pieces that didn't need to be scrapped were, because nothing was drop-in compatible, and nobody has cared enough to reimplement those pieces in the new system, even though they were not a bad thing in the old system.
Anon-E-moose wrote:
I suppose in a way wayland could be called X v2.0 or maybe X v3.0.
Not X12R1?

I think Wayland as a concept offers some interesting improvements, but no one has rewritten my favorite window manager for it, and it's still missing some features I use regularly.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6160
Location: Dallas area

PostPosted: Wed Oct 06, 2021 7:08 pm    Post subject: Reply with quote

Hu wrote:
.
Anon-E-moose wrote:
I suppose in a way wayland could be called X v2.0 or maybe X v3.0.
Not X12R1?


Could have been that, I used the window world vernacular. :lol:

Quote:
I think Wayland as a concept offers some interesting improvements, but no one has rewritten my favorite window manager for it, and it's still missing some features I use regularly.


Just curious which wm do you use in X?
And which features are missing? (yes, I'm aware that wayland is not nearly a 100% replacement for X and likely will never be, but I've found replacements for many of the things that I used in X)
_________________
UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20488

PostPosted: Wed Oct 06, 2021 10:13 pm    Post subject: Reply with quote

teika wrote:
How about Qtile, written in python, or Xmonad/Waymonad in haskell?
I did briefly consider switching to xmonad, but having to learn Haskell to configure it didn't seem like a good approach for me. I'm unfortunately not a programmer, though I can fumble my way through some C, at least enough to configure dwm.

teika wrote:
Wayland compositors are not mere window managers, because they're the display servers in the first place.
I think that relates to why I had read something as simple as dwm couldn't exist with Wayland, so I was surprised to see that dwl appears to be just that, including the ~2k loc limitation, albeit with a different license.

teika wrote:
For long, I had thought that a Wayland compositor corresponds to X's window manager. In fact, the Gentoo Wiki page Wayland Desktop Landscape says "A compositor in Wayland is the equivalent of a window manager in Xorg".

I guess such misleading hints exist everywhere. Unfortunately now there's the portage category "gui-wm". X|
It's not that I thought they were equivalent, but that the "Wayland" world is different enough that direct comparisons are difficult at best. I vaguely recall that the original intent with Wayland was not to "duplicate" all functionality of X. And sometime after that, i'd read that Wayland was intended to more directly compare to "single user experience" (for lack of a better description. Essentially slightly less flexible, but lacking some of the complexity that X requires due to that flexibility).

I don't think the manner in which Wayland was designed / created helped to clarify the confusion. I don't recall how long it was before I realized that Wayland wasn't more or less X, but rather just a specification. To be honest, it remains as clear as mud to me, so I'm hoping there is a long period of co-existence with X.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22711

PostPosted: Sat Oct 09, 2021 11:24 pm    Post subject: Reply with quote

Anon-E-moose wrote:
Just curious which wm do you use in X?
FVWM. I tried switching to i3 after I read that there was a Wayland-compatible i3 work-alike (sway), but ran into a crash in i3 pretty quickly. Between that and finding the workflow awkward, I went back to fvwm. Maybe if i3 defaults were more like what I was expecting, or I had been more successful in configuring it to work like I wanted, I would have tried harder. As it was, after the third or so time I found myself recursively splitting a window I didn't intend to split even once, I got frustrated and went back to trying to use the computer for real work.
Anon-E-moose wrote:
And which features are missing?
Remote display. :) ssh -Y host x11-program works pretty well on a LAN speed connection. There may be other features I would miss, but I don't know. Since I haven't found even one window manager that (1) works on Wayland and (2) works like I want (or can be readily configured to do so), I never made it to the point of actually starting a full Wayland session. I've read that Wayland's improved security model precludes doing full-screen sharing. I don't often need or want to do that, but I can't entirely avoid it during the pandemic. I also sometimes need one application in the foreground and another monitoring for a specific hotkey. I think that Wayland would also break that, in the name of security. I can't say I've gotten far enough to experience that break personally though.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20488

PostPosted: Sun Oct 10, 2021 1:58 am    Post subject: Reply with quote

Hu wrote:
As it was, after the third or so time I found myself recursively splitting a window I didn't intend to split even once, I got frustrated and went back to trying to use the computer for real work.
If you'd gotten past that, one of your next hurdles would be saving and restoring sessions (not so bad) including getting i3 to "remember" the layout of split windows and what belongs in them (worse IMO than modifying dwm to change a font or font size, etc.).

Hu wrote:
Remote display. :) ssh -Y host x11-program works pretty well on a LAN speed connection.
I've managed to use that a few times across approximately half the US. Except for needing the GUI part, a 300 baud modem would have been better. As you mentioned full screen sharing with Wayland, I wonder how much that might impact adoption or affect change in their approach.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
JustAnother
Apprentice
Apprentice


Joined: 23 Sep 2016
Posts: 191

PostPosted: Sun Oct 10, 2021 3:42 am    Post subject: Reply with quote

I got i3 and sway onto my computer.

The good news:
i3 can be viewed as a fallback position if sway is a problem, as the commands are basically the same. That is a positive when wants to use wayland, but also wants some insurance.

The bad news:
If you use a KVM switch as I do, the laptop video output must come from the VGA port, which is considered by the laptop internals to be a second monitor. In i3, one must use some xrandr command off a hot key to tell i3 to show the same output on the laptop screen and the external monitor port, or there will be headaches.

Sway does not allow xrandr, so so sway can be a problem if you have two monitors and want the same output. This is a very common need.

Both i3 and sway need a mouse click on an exit button to exit, but if the computer thinks there are two monitor outputs next to each other, the exit button can disappear. On the other hand there is a command line entry that will shut down i3 and sway.

The could be better news:
Basically, dmenu is problematical. It brings up all kinds of stuff that is unwanted and confusing. There is a graphic version of dmenu that puts all the gui app into the menu, bit this also feels like a miss.

In fact the idea of using a menu at the top to start applications is inconvenient, not to mention the monitor hassles which make it much worse.

What actually makes a lot more sense here is a simple text interface to launch applications. Much faster and easier to use, and it can be precisely tuned to work for you just the way you like. I wrote one, but it needs more work.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6160
Location: Dallas area

PostPosted: Sun Oct 10, 2021 10:34 am    Post subject: Reply with quote

For sway and all other wlroots based compositors, use wlr-randr although I prefer wdisplays (nice graphic layout w/randr abilities)
Or use kanshi (kind of like autorandr) which is what I use, with options for when I turn on my second monitor, that will auto switch when it sees it turned on.

If going straight wayland, I'd probably opt for sway vs i3, as I'm not sure how good i3's wayland experience is. Sway was designed for wayland from the start.

Menu's depend on which version of which package one uses. :lol: I prefer fuzzel, but there's plenty of alternatives.
ETA2: I use both the guru overlay and wayland-desktop overlay because they have many ebuilds that haven't made it mainstream ... yet.

I also use lots of keyboard shortcuts (which I've always found faster than point'n'click, though it does require using memory muscle) :)

To do remote apps on the system require me to pass the -auth parm to the Xwayland server, otherwise it'll holler about permissions.
ETA: I just tried with ssh -Y laptop remote-command and it worked fine.
I also pass the dpi flag since I run a 4k monitor and X (even xwayland) is stupid in that respect.

When I started using wayland, I kept X as a backup for a few months, then when I was happy with wayland got rid of the X server (just run Xwayland for those apps that need it).

Having said the above, if one needs all the features of the Xserver then wayland isn't a replacement now, and may never be.
I don't expect Xwayland to gain much more of Xservers features, past what's already there.
As a wayland dev said "if you need all the features of X, then use X"

I wish there was a fvwm port of the wm to wayland, but it would require a rewrite as X is too entwined in fvwm's current code base.
_________________
UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6780

PostPosted: Sun Oct 10, 2021 3:26 pm    Post subject: Reply with quote

Anon-E-moose wrote:
I wish there was a fvwm port of the wm to wayland

++

However, wayfire is almost as good if you switch off all the graphic toys.

I still wish that I would have things like "xset +dpms" or "xset dpms force standby" available: That every compositor has to reinvent the wheel is a huge step backward. (And the only small step in the right direction - wlroots - is not even a wayland project...)
Back to top
View user's profile Send private message
teika
Apprentice
Apprentice


Joined: 19 Feb 2011
Posts: 163
Location: YYYY-MM-DD, period. Have you ever used the Internet?

PostPosted: Wed Oct 13, 2021 11:36 am    Post subject: Reply with quote

Thanks all.

The motivation of the original post was that I thought it may be a good time to migrate to Wayland. (But as I doubted, it is likely to be another pain, as usual. Anyway no one wants to continue X apps development.)
What led me to think so was the news that emacs-28, the next release, will be capable of X-free by being pure-gtk. In fact, it's already (almost?) done in the upstream branch "feature/pgtk", which was not yet merged into the master branch, as of 6 months ago. (Sorry, dunno the latest status.) I don't know if emacs-28.0.9999.ebuild already has it, nor about others ebuilds in gpo.zugaina.org.

FYI: In Archlinux, there're several AURs of pure gtk emacs: [1][2].
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 9294

PostPosted: Wed Oct 13, 2021 11:45 am    Post subject: Reply with quote

Anon-E-moose wrote:
Anyway, no one is being forced to use wayland over X, even on gnome/kde which prefer wayland, you can make it stick to strictly X.

KDE Plasma does not prefer Wayland yet.
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2181

PostPosted: Thu Oct 14, 2021 10:06 am    Post subject: Reply with quote

asturm wrote:
... KDE Plasma does not prefer Wayland yet.

ANd for me, KDE Plasma still doesn't work right on Wayland. In particular at the moment, Zoom doesn't work, but other stuff breaks too.
_________________
Greybeard
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6160
Location: Dallas area

PostPosted: Thu Oct 14, 2021 11:14 am    Post subject: Reply with quote

Yeah, KDE still has growing pains, that may be addressed in the 5.23 series just released (how long to get to gentoo is unknown, asturm might know)

https://community.kde.org/Plasma/Wayland_Showstoppers

ETA: https://kde.org/announcements/plasma/5/5.23.0/
_________________
UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Comrade_Stalin
n00b
n00b


Joined: 15 Sep 2021
Posts: 21

PostPosted: Thu Oct 14, 2021 8:40 pm    Post subject: Reply with quote

Has anyone dared to try the DWL, the Wayland rewrite of DWM?

https://github.com/djpohly/dwl

I'm very curious but it looks to be nowhere near mature at this point. Plus I just got my DWM config perfect for me, so starting over is a tall drink to swallow. I'm glad somebody is on the job, the suckless devs sure aren't gonna do it anytime soon.

Wayland is very interesting to me, but Sway being the only stable TWM for it is gonna hold me back from using it for a while, I imagine. i3/Sway are good pieces of software of course, I just can't stand non-dynamic TWM after playing with Xmonad and DWM.

Knowing how this usual goes, I'll probably try it out anyway.
_________________
I agree with the official state-sponsered narrative and are therefor entirely neutral and unbiased.
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1468
Location: Earth

PostPosted: Fri Oct 15, 2021 12:22 am    Post subject: Reply with quote

i love sway (wayland) :D

using freshly installed sway only system with tinydm via autologin.

then swaylock starts and locks automatically and acts like a login-manager 8) :wink:

everything's great so far, very smooth, way faster than xorg, even 0ad is performing better.

from now on i refuse to use anything else :!:

greetings (... programs)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
JustAnother
Apprentice
Apprentice


Joined: 23 Sep 2016
Posts: 191

PostPosted: Sun Oct 17, 2021 10:06 pm    Post subject: Reply with quote

Does anybody have any insights as to the upkeep of these, ahem, more mature browsers like lynx, links and elinks, and their ability to show images and graphics?

I'm all for the newest and greatest stuff, unless it doesn't work. This is my philosophy about new appliances. New cars too.
Back to top
View user's profile Send private message
389292
Guru
Guru


Joined: 26 Mar 2019
Posts: 504

PostPosted: Sun Oct 17, 2021 11:41 pm    Post subject: Reply with quote

Proof of concept is done. Now someone should just rewrite all X11 tools for Wayland, and we'll be set and ready to switch.
Maybe, while you at it, rewrite coreutils to something leaner as well, GNU is quite ugly actually. I think you can spare linux itself for now.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum