# How to install Wayland?



## fel1x (Sep 26, 2020)

First of all, where is wayland forum(there's X.Org forum, but I couldn't find wayland forum)
Do I need to instal xorg to use wayland or I should install wayland only?
What's the name of wayland pkg? Just 'sudo pkg install wayland"?
The sequence how to install gnome on wayland
Is Nvidia is better or AMD is better for Wayland?
Is Nvidia is better or AMD is better for Xorg?


----------



## drhowarddrfine (Sep 26, 2020)

/usr/ports/graphics/wayland

Wayland is a protocol. Which graphics card you use shouldn't matter. Whether Gnome uses Wayland or not should be an option you check when you install it.


----------



## kpedersen (Sep 26, 2020)

Arguably Wayland is pretty much a Gnome or KDE thing at this point (there are so few stand-alone compositors). So perhaps just post specific questions in those sections.

Just be aware that Gnome & Wayland isn't particularly common on FreeBSD so there might be very few who can answer your questions on it.


----------



## unitrunker (Sep 26, 2020)

You can run a wayland app inside sway. That might be a good for playing with wayland without moving to a whole new desktop.


----------



## George (Sep 27, 2020)

> Do I need to instal xorg to use wayland or I should install wayland only?


Just install wayland. No need for xorg-server.



> What's the name of wayland pkg? Just 'sudo pkg install wayland"?


I would install a window manager, e.g. x11-wm/hikari, or x11-wm/sway. They have a dependency on wayland. `pkg install wayland` is also fine.

I haven't tried gnome3 yet.  Usually, you just install the window manager. Then read through its configuration file (to learn the hotkeys and stuff), Then start it e.g. with commands like `hikari`, or `sway`. No need for xinitrc..

So for gnome, my guess is to run `gnome-session` with either "--session gnome-wayland", or set some environment variable (this? XDG_SESSION_TYPE=wayland). But this is pure guessing..

This is the (outdated?) overview of wayland on FreeBSD. FreeBSD Graphics Wayland

Wayland needs evdev(), which never versions of FreeBSD have anyways. Also, you need to set XDG_RUNTIME_DIR. (e.g. `setenv XDG_RUNTIME_DIR /tmp`).



> Is Nvidia is better or AMD is better for Wayland?
> Is Nvidia is better or AMD is better for Xorg?


Not sure. Generally, they are both supported.


----------



## phalange (Sep 27, 2020)

mintchoco said:


> Is Nvidia is better or AMD is better for Wayland?
> Is Nvidia is better or AMD is better for Xorg?



AMD had Wayland support earlier, but Nvidia is getting to be in pretty good shape.
Take a look here: https://wiki.gnome.org/Initiatives/Wayland/NVIDIA

Xorg I think it's about the same. I'd weigh other factors about which GPU I liked.


----------



## jb_fvwm2 (Oct 25, 2020)

In the openbsd forums, one  just posted that Xorg is abandonware as of ... now? and Wayland is 'the
future'.   So would it be wise for users to setup beta wayland environments in case Xorg is
actually deprecated?
/edit/
I tried sway-wayland, but after a page of 'fixes' it cannot find drm nor its server: so I gave up.
"failed to open any drm device" ... "sway/server: unable to create backend. "


----------



## kpedersen (Oct 25, 2020)

jb_fvwm2 said:


> So would it be wise for users to setup beta wayland environments in case Xorg is
> actually deprecated?



I believe the abandonware rumor started at Phoronix (Linux gaming forums). The Xorg developers probably don't know anything about this nonsense 

IMO it is not a good use of time. I am very convinced that by the time that Xorg is finally deprecated, Wayland will also be replaced with something else. Gnome 4 will bring something else.

Or so many Xorg components like randr, xlib and other compatibility layers will be bolted on to Wayland that you are better off knowing how to use X11 more than the non-standard underlying wl_roots stuff.

Wayland is basically a Gnome 3 thing. Sure, one guy has made a tiling WM called sway to mimic i3 but that is still niche in terms of use.

Out of interest, which OpenBSD forums are these? I don't imagine the OpenBSD community was particularly supportive of the idea of Wayland? I also wonder if FreeBSD will move to Xenocara rather than Xorg like a couple of projects have done. Exact same Xorg but a nicer monolithic build architecture. None of this typical Linux-style modular monolith stuff!


----------



## kpedersen (Oct 25, 2020)

Ah that daemon forums post looks like one kids random vendetta against Xorg XD
He is basically posting any vague news item he finds.

What I find strange is that Phoronix would announce such a random bit of information. I just had a check of the repo here: https://github.com/freedesktop/xorg-xserver

And I can clearly see even more development work on the Xorg-xserver than more Wayland projects. Bizarre.

Must be a slow news day for Phoronix


----------



## Beastie7 (Oct 25, 2020)

I think FreeBSDs best bet is to provide a patch set for xorg (ie. Xenocara), and just backport any needed improvements/changes. Until all important applications and drivers support Wayland; it’ll continue to be a sitting duck... 11 years in counting.


----------



## kpedersen (Oct 25, 2020)

anonymous9 said:


> “If you tell a lie big enough and keep repeating it, people will eventually come to believe it."


Yeah. Who knows, perhaps this will trigger the Xorg X11 devs to put out an announcement if it was on life support. At this point I feel that it could just as easily be "we have given up on Wayland. It was a useful experiment".


----------



## shkhln (Oct 25, 2020)

Well, a third of those commit messages directly mention xwayland.


----------



## drhowarddrfine (Oct 25, 2020)

kpedersen said:


> "we have given up on Wayland. It was a useful experiment".


Hey! Let's got to the "Wayland forums" and start that!


----------



## zoujiaqing (Oct 26, 2020)

It's Time To Admit It: The X.Org Server Is Abandonware:





						It's Time To Admit It: The X.Org Server Is Abandonware - Phoronix
					






					www.phoronix.com


----------



## phalange (Oct 26, 2020)

It's time to admit it: this article is some guy's personal opinion.


----------



## Samuel Venable (Oct 27, 2020)

Concerning the stability of Xorg it is alive and well compared to a lot of WM's and DE's that rely on it. KDE in specific could use a lot of work still. It may look nice, but there are far too many issues you can run into just trying to customize with random themes you download could make your system glitchy and in some ways less usable. That is an entire different discussion on it's own. The only point I'm making is that xorg is more stable than a lot of things that are more actively developed.

I've never liked wayland personally. Which means i should've probably stayed away from this topic initially.


----------



## Jose (Oct 27, 2020)

So a website that caters to l33t Linux users posts a clickbait article and that is used to troll folks on forums known to be full of grumpy curmudgeons. Just another day on the Internet, people.


----------



## a6h (Oct 27, 2020)

Since when is it okay to read or refer to Phoronix?


----------



## Abraham79 (Oct 27, 2020)

No remote desktop software am aware of works in wayland sessions. But, wonder if Gnome-3.38 will work with wayland in FreeBSD? Presently, it boots with X.


----------



## zoujiaqing (Oct 30, 2020)

Fedora as wayland by default for KDE Plasma in next release:





						Changes/WaylandByDefaultForPlasma - Fedora Project Wiki
					






					fedoraproject.org


----------



## kpedersen (Oct 30, 2020)

@ zoujiaqing,  Can you go to the following Linux stats and report to the rest of the class what percentage of the ~5000 users use Wayland?

https://linux-hardware.org/index.php?view=os_display_server

And now, can you suggest why Wayland should be a priority for FreeBSD with such a small Wayland userbase even on Linux?

The future of Wayland will basically be XWayland so it looks like FreeBSD needs to do nothing at all to remain compatible.

Besides FreeBSD already has Wayland: https://www.freshports.org/graphics/wayland
It isn't our fault it is useless and you can't do anything interesting with it. It is just a protocol after all. Anything useful is "out of scope of the Wayland project". Have fun.


----------



## sidetone (Oct 30, 2020)

From what I get from it, Wayland isn't abandon-ware, but it has similarities to projects that take the path towards it.


----------



## George (Oct 30, 2020)

The key to a successful Wayland session is to only open one window per workspace. And use custom hotkeys. 
I am pretty happy with wayland/hikari.


----------



## kpedersen (Oct 30, 2020)

Elazar said:


> The key to a successful Wayland session is to only open one window per workspace. And use custom hotkeys.



That is pretty much how I used Desqview back in the early 90's 

This might bring back some memories



			https://regmedia.co.uk/2012/11/15/88_byte_desq_large.jpg


----------



## Beastie7 (Oct 30, 2020)

Without a proper transition plan for all applications, DEs, WMs, etc Wayland will continue to be a shiny brick. It boggles my mind why the Linux community didn’t standardize around Weston as a base reference, like with xserver. Besides performance, what exactly is wrong with X.org? I keep hearing it’s a “security nightmare”, but haven’t found a detailed explanation as to *why* that is..

Why not just fix the damn thing?


----------



## richardtoohey2 (Oct 30, 2020)

Beastie7 said:


> Why not just fix the damn thing?


It's a 30+ year old code base; not that simple.  Who is going to test the changes on all the platforms etc.?

And usually when you try and fix something (especially to make it more secure) by re-writing it - you just introduce more issues.






						on abandoning the X server | Lobsters
					






					lobste.rs


----------



## kpedersen (Oct 30, 2020)

Beastie7 said:


> what exactly is wrong with X.org? I keep hearing it’s a “security nightmare”


It is because Xorg works across the network that it could possibly be hacked. Apparently because Wayland entirely lacks this feature that makes it more secure... 

Individual compositors are going to have to hack the "network aware" functionality in like pipewire. It will never happen. Xwayland on top of Wayland is likely going to be as far as Linux gets.


----------



## xtouqh (Oct 30, 2020)

So how does one run wayland compositor (e.g. sway) with nvidia-driver?  Starting it fails with inability to find drm devices -- are those required (i.e. is it limited to intel/amd on FreeBSD)?


----------



## shkhln (Oct 30, 2020)

Beastie7 said:


> Besides performance, what exactly is wrong with X.org? I keep hearing it’s a “security nightmare”, but haven’t found a detailed explanation as to *why* that is..


I don't know about nightmare, however any program running under Xorg has access to window contents and keyboard input for every other application. Wayland is supposed to have far more precise access controls.


----------



## richardtoohey2 (Oct 30, 2020)

anonymous9 said:


> OpenBSD uses X.org via Xenocara and it isn't a security problem.


I'm not sure about that - but I'm not any sort of expert on X (or much else!) https://www.openbsd.org/errata67.html Errata 16, 17, 21, 22 are all security and X-related.  But I'm drifting off FreeBSD so will leave it here.


----------



## shkhln (Oct 30, 2020)

xtouqh said:


> So how does one run wayland compositor (e.g. sway) with nvidia-driver?


You don't. Nvidia is supported by Gnome/KDE's compositors.


----------



## Beastie7 (Oct 30, 2020)

kpedersen said:


> It is because Xorg works across the network that it could possibly be hacked. Apparently because Wayland entirely lacks this feature that makes it more secure...
> 
> Individual compositors are going to have to hack the "network aware" functionality in like pipewire. It will never happen. Xwayland on top of Wayland is likely going to be as far as Linux gets.



Apparently there’s this project. Maybe I’m just naive, but how are application developers supposed to support all of these implementations of Wayland? it’s like they’re repeating the whole “GNU+Linux -> distro” fragmentation conundrum again. Seriously, do they not think about the implications of their design?

If AMD/Intel/nVidia drivers didn’t assume Linux interfaces and were easily portable; i’d write my own display server for FreeBSD out of desperation.


----------



## sidetone (Oct 30, 2020)

Elazar said:


> The key to a successful Wayland session is to only open one window per workspace. And use custom hotkeys.
> I am pretty happy with wayland/hikari.


So there's aren't Wayland compositors that have features like many Xorg window managers?


----------



## mark_j (Oct 30, 2020)

kpedersen said:


> Ah that daemon forums post looks like one kids random vendetta against Xorg XD He is basically posting any vague news item he finds. What I find strange is that Phoronix would announce such a random bit of information. I just had a check of the repo here: https://github.com/freedesktop/xorg-xserver And I can clearly see even more development work on the Xorg-xserver than more Wayland projects. Bizarre. Must be a slow news day for Phoronix



Isn't phoronix just a linux fanatics/zealots web site? Xorg is NIH as far as systemd/linux is concerned so they hate it. Anything pro-wayland gets the obligatory love from the zealots. Ergo, it's understandable that website would peddle this ... crap.


----------



## shkhln (Oct 30, 2020)

mark_j said:


> Isn't phoronix just a linux fanatics/zealots web site? Xorg is NIH as far as systemd/linux is concerned so they hate it. Anything pro-wayland gets the obligatory love from the zealots. Ergo, it's understandable that website would peddle this ... crap.



Actually, no. Phoronix (well, it's a single person) is an incredibly clueless, but mostly inoffensive news site without any specific bias. That is, there is more Linux information overall because there is more Linux development going on. The associated forum, on the other hand, seems to be an experiment in zero moderation. That place is downright vicious.


----------



## richardtoohey2 (Oct 30, 2020)

There's more to this story than Phoronix: https://ajaxnwnk.blogspot.com/2020/10/on-abandoning-x-server.html

BUT the OP asked about how to install Wayland, so we're getting a bit off topic.


----------



## kpedersen (Oct 31, 2020)

Beastie7 said:


> Apparently there’s this project.


That project doesn't make the system network aware. It merely funnels a VNC style image across the network. VNC is far too slow and this will likely be similar.

That said, X11 isn't perfect either. Sadly the only real option for remote UI is Microsoft RDP. And now that Wayland has got in the way of any real progress in this area, I don't think open-source platforms will have an alternative to X11 or RDP for many years. If ever.


----------



## Jose (Oct 31, 2020)

richardtoohey2 said:


> It's a 30+ year old code base; not that simple.  Who is going to test the changes on all the platforms etc.?
> 
> And usually when you try and fix something (especially to make it more secure) by re-writing it - you just introduce more issues.
> 
> ...


Quoting from the post referenced in that link


> It is, however, uniquely well suited to a very long life as an application compatibility layer. Though the code happens to implement an unfortunate specification, the code itself is quite well structured, easy to hack on, and not far off from being easily embeddable.


Sorry, the whole abandon Xfree86 in favor of Wayland thing still reeks of politics to me. Especially when he says this:


> And if (a world where Xfree86 is abandoned is what) you'd like to see, please, come talk to us, let's make it happen. I'd be absolutely thrilled to see someone take this on, and I'm happy to be your guide through the server internals.


In other words, I'll work with you happily, but only if you agree with me!



kpedersen said:


> That said, X11 isn't perfect either. Sadly the only real option for remote UI is Microsoft RDP. And now that Wayland has got in the way of any real progress in this area, I don't think open-source platforms will have an alternative to X11 or RDP for many years. If ever.


I don't really follow this because I'm not a graphics programmer, but that fella sure isn't a fan


> The second dumbest thing is to use RDP. It has features. Lots of them. Even a printer server and usb server and file system mount translation. Heck, all the things that Xorg was made fun of for having, is in there, and then some. The reverse engineered implementation of this proprietary Microsoft monstrosity, FreeRDP, is about the code size of the actually used parts of Xorg, give or take some dependencies. In C. In network facing code. See where this is heading? Embed that straight into your privileged Wayland compositor process, and I will just sit here in bitter silence and be annoyed by the fireworks.


Has anyone tried that X2go thing he mentions so favorably?


----------



## Phishfry (Oct 31, 2020)

I like the pragmatism of this HN posting:





						A Neighbourly Solution to the 'X is Deprecated?!' Conundrum
					

A Neighbourly Solution to the 'X is Deprecated?!' Conundrum         29 Oct 2020                                            ...




					www.divergent-desktop.org
				






> Wayland [snip] is not a replacement, it is a fundamental change of principles. Stop trying to market it as some kind of inevitable transition.


----------



## kpedersen (Oct 31, 2020)

Jose said:


> I don't really follow this because I'm not a graphics programmer, but that fella sure isn't a fan



In many ways I feel he is correct. But unfortunately with Wayland we are now getting even further away from a solution.
As for x2go, it is some older NoMachine NX technology (partially rewritten).
This stuff is very effective but traditionally useless because it only works on a few UNIX-like platforms. It obviously isn't portable or we would all be using it.

Saying RDP isn't the best because it is "complex" is a little bit of a defeatist attitude. Perhaps the simpler elements could be stripped from it and the rest of the random Microsoft cruft could be ditched. I guess the issue is that we would have to get Gtk+ and Qt to play ball... and they wont.

But yeah, Wayland isn't really a replacement for Xorg. It is more like a replacement for 50% of the underlying driver layer within Xorg. XWayland + Wayland could be a potential replacement but it is slower and doesn't achieve anything particularly useful. The best Wayland can do natively is screen scraping which is pretty poor.


----------



## latencyschmatency (Nov 1, 2020)

kpedersen said:


> In many ways I feel he is correct. But unfortunately with Wayland we are now getting even further away from a solution.
> As for x2go, it is some older NoMachine NX technology (partially rewritten).
> This stuff is very effective but traditionally useless because it only works on a few UNIX-like platforms. It obviously isn't portable or we would all be using it.
> 
> ...











						A12 – Advancing Network Transparency on the Desktop
					

This article is is the main course to the appetiser that was The X Network Transparency Myth (2018). In it, we will go through how the pieces in the Arcan ecosystem tie together to advance the idea…




					arcan-fe.com


----------



## Typemoar (Dec 4, 2020)

It’s been fun reading through this thread. Sway, which represents the cohesive keyboard centric tiled WM I’m longing for, was the nail in the coffin that persuaded me to leave macOS for Linux. But then I thought “why would I go for Linux when I can have it all with native ZFS and more OOTB in FreeBSD?”

Just a visitor, dipping my toe in the waters here. How’s the temperature?


----------

