Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GNOME not using Wayland
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
bugalo
n00b
n00b


Joined: 05 Jul 2015
Posts: 37

PostPosted: Thu Nov 18, 2021 2:26 pm    Post subject: GNOME not using Wayland Reply with quote

Hi,

I have a computer with an NVIDIA GeForce GT 730 graphics card, which is restricted to older nvidia-drivers-470. I understand that it should support Wayland, but GNOME is falling back to X11, and I cannot find why.

Wayland is in my USE flags:

Code:
USE="... wayland ..."


I am activating nvidia_drm modesetting support in the kernel command line:

Code:
GRUB_CMDLINE_LINUX="... nvidia-drm.modeset=1"


My
Code:
/lib/udev/rules.d/61-gdm.rules
is not disabling wayland for nvidia:

Code:

# disable Wayland on Hi1710 chipsets
ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", GOTO="gdm_disable_wayland"

# disable Wayland if modesetting is disabled
IMPORT{cmdline}="nomodeset", SUBSYSTEM=="drm", KERNEL=="card[0-9]*", GOTO="gdm_disable_wayland"

# Disable wayland when nvidia modeset is disabled or when drivers are a lower
# version than 470, in any case always prefer Xorg
KERNEL!="nvidia_drm", GOTO="gdm_nvidia_drm_end"
SUBSYSTEM!="module", GOTO="gdm_nvidia_drm_end"
ACTION!="add", GOTO="gdm_nvidia_drm_end"
# disable wayland if nvidia-drm modeset is not enabled
ATTR{parameters/modeset}!="Y", GOTO="gdm_disable_wayland"
# disable wayland for nvidia drivers versions lower than 470
ATTR{version}=="4[0-6][0-9].*|[0-3][0-9][0-9].*|[0-9][0-9].*|[0-9].*", GOTO="gdm_disable_wayland"
GOTO="gdm_prefer_xorg"
LABEL="gdm_nvidia_drm_end"

GOTO="gdm_end"

LABEL="gdm_prefer_xorg"
RUN+="/usr/libexec/gdm-runtime-config set daemon PreferredDisplayServer xorg"
GOTO="gdm_end"

LABEL="gdm_disable_wayland"
RUN+="/usr/libexec/gdm-runtime-config set daemon WaylandEnable false"
GOTO="gdm_end"

LABEL="gdm_end"


And Wayland is not disabled in
Code:
/etc/gdm/custom.conf
:

Code:

# GDM configuration storage

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

[security]

[xdmcp]

[chooser]

[debug]
# Uncomment the line below to turn on debugging
#Enable=true


What else do I need to do to enable Wayland in GNOME?

Thanks.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2717

PostPosted: Thu Nov 18, 2021 3:14 pm    Post subject: Reply with quote

nvidia-drivers will already enable modeset=1 with USE=wayland (unless you modified /etc/modprobe.d/nvidia.conf), so it's not something you need to set yourself

you do have VIDEO_CARDS=nvidia set too, right? This is notably needed on mutter, and preferably xwayland too.

With my 1070, 470.xx, and gnome profile -- gdm uses wayland out-of-the-box (and "GNOME" starts a wayland session, have to select "GNOME on Xorg" if I want xorg) except for having to set VIDEO_CARDS, no other settings.. didn't mess with udev rules or stuff like that (this is partly because the udev rule didn't work in the first place unless gdm is restarted, recently it now stay on wayland even if restarted though).

Not that I tested this all that much, I try it now and then but I still use Xorg (for now, will migrate in a few years) and don't actually use gnome. Also never tried EGLStream with Kepler cards, or dual gpu setups (if you got some intel gpu in there, it can mess with detection from what I heard). Possible there's some other problem here.
Back to top
View user's profile Send private message
bugalo
n00b
n00b


Joined: 05 Jul 2015
Posts: 37

PostPosted: Fri Nov 19, 2021 7:41 am    Post subject: Reply with quote

Ionen wrote:
nvidia-drivers will already enable modeset=1 with USE=wayland (unless you modified /etc/modprobe.d/nvidia.conf), so it's not something you need to set yourself


I did not have this line originally, it is one of the things I've tried to fix the issue. I have not touched /etc/modprobe.d/nvidia.conf, so I'll remove it.

Ionen wrote:
you do have VIDEO_CARDS=nvidia set too, right? This is notably needed on mutter, and preferably xwayland too.


Yes, I forgot to add it to my post. I have

Code:
VIDEO_CARDS="intel i965 iris nvidia"


Ionen wrote:
With my 1070, 470.xx, and gnome profile -- gdm uses wayland out-of-the-box (and "GNOME" starts a wayland session, have to select "GNOME on Xorg" if I want xorg) except for having to set VIDEO_CARDS, no other settings.. didn't mess with udev rules or stuff like that (this is partly because the udev rule didn't work in the first place unless gdm is restarted, recently it now stay on wayland even if restarted though).

Not that I tested this all that much, I try it now and then but I still use Xorg (for now, will migrate in a few years) and don't actually use gnome. Also never tried EGLStream with Kepler cards, or dual gpu setups (if you got some intel gpu in there, it can mess with detection from what I heard). Possible there's some other problem here.


I have a dual gpu setup, the Nvidia and in integrated intel. Do you think that could be the root of this issue?
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2717

PostPosted: Fri Nov 19, 2021 8:05 am    Post subject: Reply with quote

Could you try again with nvidia-drivers-470.86-r1? A change I did (for another reason) may or may not have improved this at same time.

Otherwise, don't think I can help. I don't have hardware with that kind of setup to know how to solve these issues.
Back to top
View user's profile Send private message
bugalo
n00b
n00b


Joined: 05 Jul 2015
Posts: 37

PostPosted: Tue Nov 23, 2021 10:17 am    Post subject: Reply with quote

Ionen wrote:
Could you try again with nvidia-drivers-470.86-r1? A change I did (for another reason) may or may not have improved this at same time.

Otherwise, don't think I can help. I don't have hardware with that kind of setup to know how to solve these issues.


I've tried this version of the driver, and the problem persists.

I am checking for messages using
Code:
dmesg | grep -i drm


and I got the following:

Code:
[drm:drm_new_set_master] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership


I think it might be related, but I am not sure how to fix it.
Back to top
View user's profile Send private message
bugalo
n00b
n00b


Joined: 05 Jul 2015
Posts: 37

PostPosted: Tue Nov 23, 2021 11:13 am    Post subject: Reply with quote

I've been able to fix the dmesg error by reconfiguring the kernel with CONFIG_DRM=n and re-compiling it. But now I have the following error:

Code:
nvidia_drm: unknown parameter 'modeset' ignored
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
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