Wayland on Nvidia as we near Q4 2021


-- MY EXPERIENCE USING WAYLAND --


~ CONTEXT ~

I am running sway on nvidia right now. Have been for months (20.04). Sway only runs on wayland. I don't notice a difference as far as resources are concerned. I am constantly switching between:

  • Sway on Wayland -- (Listed as Sway in the login screen menu option)

  • regular Ubuntu on Wayland -- (Ubuntu on Wayland in the menu)

  • regular Ubuntu on X11 -- (Just Ubuntu in the menu)

  • GNOME classic on X11 -- (GNOME Classic in the menu)

     NOTE: If it is unclear which options menu is being referenced,
                 I go into detail on the subject in the section 
                       entitled `MODESWITCHING...` below.
    

All of these options showed up on my login screen after I installed Sway via Apt.

~ CONCLUSION ~

Anyway, my point is that the only difference I notice (between the two gnome/ubuntu) is that the colors are slightly different. Not better or worse, just different. I can post screenshots if you want.

There are a few other side affects in 20.04, such as the keybindings disappearing and the audio couldn't (can't) be controlled without system level commands. However, I am almost positive that this can be put up to the fact that my system was set up for gmome and I sort of just yanked it out of the picture. For fresh 21.04 installs, this will obviously not be the case.


-- MY EXPERIENCE USING WAYLAND --


Following are a few suggestions for the general user having issues with the Wayland combo. First and foremost..

  • download the newest drivers possible. While I can confirm that you generally do not need the 470 (I didn't even know the 470 had been released until reading this), many / most of the changes between versions likely deal with adapting to a Wayland environment.

  • If you have issues, use the nouveau driver. That was the workaround that I found while researching. I downloaded and used it, just to be safe, at first.

Eventually I got tired of switching drivers all the time, so I stopped, and nothing happened. That has been months ago, and my laptop never gets shut off. It has worked great for me... (knocking on wood.)


-- RELATED INFORMATION --


CONTEXT

I know what you're talking about, though. I remember when I installed, my setup was detected, and I had to click something saying "I will not purchase Nvidia drivers anymore." It turned out to be a non-issue for me, but that doesn't guarantee the same for everyone.

CONLUSION

In case I failed to make this obvious above, you will need to have these environments installed manually first. It has been a long time since I found them, and I've forgotten the "how." I just remember unclear documentation and a lot of trial and error.

If you have reservations, try out Wayland on your current version. That way, if it doesn't work there is no risk involved. You can just switch it back out.

MODESWITCHING BETWEEN DESKTOP ENVIRONMENTS

To switch between Wayland and X (and any other installed environments):

  • log out
  • from the login screen click on your acct.
  • as soon as you click, a gear will appear in the bottom right corner.
  • Click it. You'll be presented with the options "Ubuntu" and "Ubuntu on Wayland"
  • Once you select, everything else is as it normally would be.

-- EDIT --


According to your comment, this answer hasn't been helpful to you.

If the answer was off, it is because I still do not know what you are asking. Would you mind clarifying?

The only question I see is on the second line.

...how can I completely transform my ubuntu 21.04 from Xorg to wayland? 

I am having trouble making sense of this.

First off, according to the qoute, you have already "completely >!transformed" your Ubuntu. Ubuntu 21.04+ comes fully configured to >!support Wayland out of the box. Furthermore, when downloading Ubuntu >!21.04 (at least any supported version), GNOME desktop is not an >!option. In fact, according to the linked info, it isn't >!even available (this is a VERY dated statement, so take it with a >!grain of salt, so take it with a grain of salt.) Since your next statement contradicts the above assumption, I >!originally decided to give you the benefit of the doubt. This still leaves us with an extremely general question. Originally, >!I assumed as you know what you are doing, the generalization was due >!to the fact that you were looking for anything and everything useful >!on the subject.
As it seems I was wrong, I developed my answer into something that is >!(hopefully) usable by the community at large. If you can expand your >!answer, I will once again make changes in an attempt to match yours.


I don't have 21.04, but from what I read (this, this), Wayland is the default in 21.04, and you could actually use the cog in the login screen to switch to Xorg.

Actual images of the login screen in 21.04 (#1, #2) show the options in the cog are

  • Ubuntu
  • Ubuntu on Xorg

as opposed what one had when enabling Wayland in 20.04, which is

  • Ubuntu
  • Ubuntu on Wayland

So I wonder how come you don't have the same options.

Please post the output of

$ echo $XDG_SESSION_TYPE

Did you install 21.04 from scratch, or was it an upgrade?
If not, and you have enough disk space, you could set small partitions to try it out, installing then the nvidia 470 drivers. Everything looks to me like it should work, without you doing anything special.
Upgrading from 20.04 seems to have a few tricks, including: 1) modification of /etc/gdm3/custom.conf, 2) edition of udev rules (although for nvidia 470 this is perhaps not needed). But the alternative above seems a surer shot.