How to run Wayland on latest driver, hardware, OS?

Hello,

I have a laptop with an nVidia RTX 2080 and the 440.64 driver. I have both lightdm and gdm3 installed and am running Ubuntu 20.04 which means as of today I have just about the latest hardware, operating system and drivers.

My setup is one Dell G7 laptop and one external Dell 4k monitor connected to the miniDP port on the back of my laptop.

When I activate lightdm I have, in the extended login menu options, the option to use Ubuntu on Wayland.

Selecting this option and logging it only shows the desktop on the builtin monitor.

echo $XDG_SESSION_TYPE shows wayland

However, nothing I can do allows content on my external monitor. It is not detected by the “displays” option in setting (although unplugging and plugging it in does cause my attached monitor to blink).

Switching to gdm3 and there is no gear / login settings that allows me to choose wayland.

My /etc/gdm3/custom.conf file shows wayland to be enabled. i.e. contents are :

# GDM configuration storage
#
# See /usr/share/gdm/gdm.schemas for a list of available options.

[daemon]
# Uncomment the line below to force the login screen to use Xorg
#WaylandEnable=false

# Enabling automatic login
#  AutomaticLoginEnable = true
#  AutomaticLogin = user1

# Enabling timed login
#  TimedLoginEnable = true
#  TimedLogin = user1
#  TimedLoginDelay = 10

[security]

[xdmcp]

[chooser]

[debug]
# Uncomment the line below to turn on debugging
# More verbose logs
# Additionally lets the X server dump core if it crashes
#Enable=true

So two questions:

  1. Why isn’t this (running Wayland) working? The amount of research required to investigate this is significant.

  2. As of today, using nVidia hardware, is there any possible configuration that allows Wayland to work (with necessary features like multiple monitors)

Depends, sound like you’re running a hybrid graphics system. Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post. You will have to rename the file ending to something else since the forum software doesn’t accept .gz files (nifty!).

“Hybrid graphics system”. Is this something I can toggle in the bios? I’d love to disable it

Attached is the run of bug-report while running gdm3
nvidia-bug-report.log.txt (374.8 KB)

And here is bug-report while running lightdm with Wayland selected. NOTE: Running this causes me to almost immediately be logged out so I do not know if the log is totally valid


nvidia-bug-report_wayland.log.txt (111.0 KB)

It’s an intel/nvidia Optimus notebook. If the intel igpu can be disabled depends on the notebook, few have a bios switch.
Since intel uses gbm on wayand while nvidia uses eglstreams, I don’t think the external connectors on the nvidia gpu will be supported on Gnome unless you switch to nouveau.
Gnome Wayland on hybrid systems is often disabled by the distro by a udev rule.
Run
grep 10de /lib/udev/rules.d/*
to find rules tied to nvidia hw.

That command returns:
/lib/udev/rules.d/71-nvidia.rules:SUBSYSTEM=="pci", ATTRS{vendor}=="0x10de", DRIVERS=="nvidia", TAG+="seat", TAG+="master-of-seat"

Does that tell you anything about whether or not I can use Gnome Wayland?
I looked through every option in the BIOS and switching there is not an option.

Then I guess you’ll have to switch to nouveau to have the external monitor available when running wayland.
Wayland on gdm doesn’t seem to be explicitly disabled though there’s also some kind of auto-detect involved which I don’t know how that should work and if there’s some Ubuntu specific stuff involved.
Also running a hybrid notebook, I have to explicitly disable wayland in /etc/gdm3/custom.conf to not run on wayland.
Edit: might actually be that gdm is looking for the master-of-seat device, so maybe the udev rule has influence on it, don’t actually know, though.

This is a little over my head.
Does nvidia officially support Wayland on Ubuntu under any configuration?

Then you’ll probably won’t like what I’m telling you now.
Yes, the nvidia driver has support for wayland but ‘wayland’ is just a protocol which has to be implemented by the wayland compositor, in this case gnome-shell/mutter.
So the question should be 'Does gnome-shell have support for multi-gpu display with a mixed nvidia/mesa setup?"
Answer: AFAIK, no.

1 Like

Okay so my circumstance is:

  • I can’t disable mesa (I am forced to use either pure mesa [nouveau] or a hybrid setup)
  • As of right now gnome-shell/mutter does not support multi-gpu display with a mixed setup

So I should support / request that gnome-shell mutter implement multi-gpu displays for mixed setups?
My issue is with gnome-shell/mutter not with nvidia?

You’re right on the circumstance, everything else isn’t black or white but grey. You’re right on gnome-shell having to implement it but of course the nvidia driver also has its share by using a different wayland provider making things harder for the gnome devs.
Furthermore, the nvidia driver doesn’t yet implement hardware accel for Xwayland (should have changed last year but I didn’t hear of any change in that regard).

Yikes. It is tough to know where to direct my feedback that people want wayland on linux.
There doesn’t seem to be a clear avenue to express this.

Getting info about this topic is hard to confusing, I know.
The first stop for users should always be the bug tracker of the distribution used. Then you can go upstream, in this case to gnome’s gitlab.

Awesome. I’ll comment there.
Thanks for your help.