Gnome wayland doesn't loads nvidia driver

Good day.
Before some days ago, I start x11 session and nvidia loads its driver fine.
Now, I reinstall Manjaro with the last download file to get Gnome Wayland session directly with no changes.
Everything goes fine, but nvidia drivers seems not to load.
If I change the drivers files to others than the installed, the system changes to x11 but programs who needs nvidia driver (darktable, obs-studio) can’t use OpenGL, NVENC (can’t activate it)
The only way to activate OpenGL for them is downloading nvidia drivers from Nvidia.
Then the system start as x11 and nvidia driver loaded.

Is there a way to load some driver to nvidia at starting to use OpenGL in Gnome-Wayland?
I follow instructions to activate Wayland-Nvidia and other solutions pages with no results. Thanks.

The commands I give to verify the situation:
(The most significant is ‘inxi’ with nvidia driver: N/A)

echo $XDG_SESSION_TYPE                                                                                                ✔
wayland

mhwd -li                                                                                                              ✔
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-modesetting                      2020.01.13                true            PCI
video-hybrid-intel-nvidia-prime   2021.12.18               false            PCI
Warning: No installed USB configs!

inxi -Gazy                                                                                                            ✔
Graphics:
 Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: ASUSTeK
   driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:3e9b class-ID: 0300
 Device-2: NVIDIA TU106M [GeForce RTX 2060 Mobile] vendor: ASUSTeK
   driver: N/A alternate: nouveau bus-ID: 01:00.0 chip-ID: 10de:1f11
   class-ID: 0300
 Device-3: IMC Networks USB2.0 HD IR UVC WebCam type: USB driver: uvcvideo
   bus-ID: 1-9:2 chip-ID: 13d3:56e4 class-ID: 0e02 serial: <filter>
 Display: wayland server: X.Org 1.21.1.4 compositor: gnome-shell v: 41.2
   driver: loaded: modesetting alternate: fbdev,vesa display-ID: :0 screens: 1
 Screen-1: 0 s-res: 3840x3260 s-dpi: 96 s-size: 1016x863mm (40.0x34.0")
   s-diag: 1333mm (52.5")
 Monitor-1: XWAYLAND0 res: 3840x1100 hz: 60 dpi: 287
   size: 340x100mm (13.4x3.9") diag: 354mm (14")
 Monitor-2: XWAYLAND1 res: 3840x2160 hz: 60 dpi: 287
   size: 340x190mm (13.4x7.5") diag: 389mm (15.3")
 OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 21.3.2
   direct render: Yes

lspci -k | grep -A 2 -E "(VGA|3D)"                                                                                    ✔
   00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630] (rev 02)
   	DeviceName: Second VGA
   	Subsystem: ASUSTeK Computer Inc. Device 19e1
   	Kernel driver in use: i915
   --
   01:00.0 VGA compatible controller: NVIDIA Corporation TU106M [GeForce RTX 2060 Mobile] (rev a1)
   	DeviceName: VGA
   	Subsystem: ASUSTeK Computer Inc. Device 19e1
   	Kernel modules: nouveau

uname -a                                                                                                              ✔
Linux 5.16.0-1-MANJARO #1 SMP PREEMPT Mon Dec 20 15:49:00 UTC 2021 x86_64 GNU/Linux

pamac list -i | grep nvidia                                                                                           ✔
mhwd-nvidia                              495.44-5                                   extra      1,4 kB
mhwd-nvidia-390xx                        390.147-2                                  extra      1,9 kB
mhwd-nvidia-470xx                        470.94-1                                   extra      1,7 kB
nvidia-prime                             1.0-4                                      extra      112 bytes
nvidia-utils                             495.44-6                                   extra      461,1 MB

sudo mhwd-gpu --check                                                                                          ✔  4s 
xorg configuration symlink valid...

mhwd-gpu --status                                                                                                     ✔
:: status
  xorg configuration file: '/etc/X11/mhwd.d/nvidia.conf'

cat /etc/X11/mhwd.d/nvidia.conf                                                                                       ✔
  ##
  ## Generated by mhwd - Manjaro Hardware Detection
  ##

mhwd -li -d --pci                                                                                                     ✔
   NAME:	video-modesetting
   ATTACHED:	PCI
   VERSION:	2020.01.13
   INFO:	X.org modesetting video driver.
   PRIORITY:	1
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300
   VENDORIDS:	*

   NAME:	video-hybrid-intel-nvidia-prime
   ATTACHED:	PCI
   VERSION:	2021.12.18
   INFO:	Hybrid prime solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:	8
   FREEDRIVER:	false
   DEPENDS:	video-modesetting
   CONFLICTS:	video*nvidia*
   CLASSIDS:	0300 0302 0300
   VENDORIDS:	10de 8086

nvidia-settings                                                                                                       ✔
ERROR: Unable to find display on any available system

nvidia-smi                                                                                                          1 ✘
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.
Make sure that the latest NVIDIA driver is installed and running.

xrandr --listproviders                                                                                            1|1 ✘
Providers: number : 0

sudo pacman -Q xorg-xwayland libxcb egl-wayland                                                              1 ✘  7s 
xorg-xwayland 21.1.4-1
libxcb 1.14-1
egl-wayland 2:1.1.9+r3+g582b2d3-1

sudo pacman -Q nvidia*                                                                                              1 ✘
zsh: no matches found: nvidia*

pacman -Q mesa                                                                                                    0|1 ✘
mesa 21.3.2-1

glxinfo | grep -i device                                                                                              ✔
    Device: Mesa Intel(R) UHD Graphics 630 (CFL GT2) (0x3e9b)

glxinfo | grep -i opengl                                                                                            1 ✘
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics 630 (CFL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.3.2
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.3.2
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.3.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

prime-run glxinfo | grep -i opengl                                                                                    ✔
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  150 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  50
  Current serial number in output stream:  51

prime-run darktable-cltest                                                                                            ✔
0.041085 [opencl_init] opencl related configuration options:
0.041092 [opencl_init]
0.041094 [opencl_init] opencl: 1
0.041095 [opencl_init] opencl_scheduling_profile: 'very fast GPU'
0.041096 [opencl_init] opencl_library: ''
0.041097 [opencl_init] opencl_memory_requirement: 768
0.041098 [opencl_init] opencl_memory_headroom: 400
0.041099 [opencl_init] opencl_device_priority: '*/!0,*/*/*/!0,*'
0.041101 [opencl_init] opencl_mandatory_timeout: 200
0.041102 [opencl_init] opencl_size_roundup: 16
0.041103 [opencl_init] opencl_async_pixelpipe: 0
0.041104 [opencl_init] opencl_synch_cache: active module
0.041105 [opencl_init] opencl_number_event_handles: 25
0.041106 [opencl_init] opencl_micro_nap: 1000
0.041107 [opencl_init] opencl_use_pinned_memory: 0
0.041108 [opencl_init] opencl_use_cpu_devices: 0
0.041109 [opencl_init] opencl_avoid_atomics: 0
0.041110 [opencl_init]
0.041189 [opencl_init] could not find opencl runtime library 'libOpenCL'
0.041278 [opencl_init] could not find opencl runtime library 'libOpenCL.so'
0.041380 [opencl_init] could not find opencl runtime library 'libOpenCL.so.1'
0.041383 [opencl_init] no working opencl library found. Continue with opencl disabled
0.041384 [opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
0.041385 [opencl_init] initial status of opencl enabled flag is OFF.

How to prevent always all needed modules? Follow this:

Edit /mkinitcpio.conf

sudo nano /etc/mkinitcpio.conf

MODULES=“nvidia”

sudo mkinitcpio -P

Reboot notebook and try again

I don’t know much about Nvidia problem with Wayland.
But Arch wiki suggests that NVIDIA is supported via the EGLStreams API.

==> ERROR: module not found: `nvidia’

I tried this with before with some other modules relationed with nvidia.
Only loads if I change the kernel and then it loses wayland.

Open “Manjaro Settings Manager” → “Hardware Configuration” → Select Nvidia driver and install it.

Which one?
The system installed automaticly the prime one: video-hybrid-intel-nvidia-prime

mhwd --list                                                                                                           ✔ 
> 0000:01:00.0 (0300:10de:1f11) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.12.18               false            PCI
          video-nvidia            2021.12.18               false            PCI
    video-nvidia-470xx            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> 0000:00:02.0 (0300:8086:3e9b) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI

I put the EGL in the first message: (I suppossed this is what you say)

sudo pacman -Q xorg-xwayland libxcb egl-wayland                                                              1 ✘  7s 
xorg-xwayland 21.1.4-1
libxcb 1.14-1
egl-wayland 2:1.1.9+r3+g582b2d3-1

There is already the answer.

With Xorg it has no problems. But only if I install directly with it.
Installing the last Manjaro ISO version that install Wayland directly has no option to go Xorg and assign Nvidia driver. I can start x11 but no driver.
As I said, only installing previous ISO in Xorg or with this, installing Nvidia from Nvidia web. Then the system start with Xorg, not Wayland.
With the last ISO I can’t start with other kernels than the 15 or 16. Maybe I would wait.

I test it before with the same result: No nvidia driver. Thanks.

inxi -Gazy                                                                                                            ✔ 
Graphics:
  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: ASUSTeK
    driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:3e9b class-ID: 0300
  Device-2: NVIDIA TU106M [GeForce RTX 2060 Mobile] vendor: ASUSTeK
    driver: N/A alternate: nouveau bus-ID: 01:00.0 chip-ID: 10de:1f11
    class-ID: 0300
  Device-3: IMC Networks USB2.0 HD IR UVC WebCam type: USB driver: uvcvideo
    bus-ID: 1-9:2 chip-ID: 13d3:56e4 class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org 1.21.1.2 compositor: gnome-shell v: 41.2
    driver: loaded: modesetting alternate: fbdev,vesa display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x3260 s-dpi: 96 s-size: 1016x863mm (40.0x34.0")
    s-diag: 1333mm (52.5")
  Monitor-1: eDP-1 res: 3840x2160 hz: 60 dpi: 284
    size: 344x194mm (13.5x7.6") diag: 395mm (15.5")
  Monitor-2: DP-2 res: 3840x1100 hz: 60 dpi: 287 size: 340x100mm (13.4x3.9")
    diag: 354mm (14")
  OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 21.3.2
    direct render: Yes

echo $XDG_SESSION_TYPE                                  
x11

This is a supposition not a real true when there is not another response. Who knows if is it true? In other responses day this but doesn’t test if it real. Thanks. :wink:

Wait, do you use 470.x drivers? That make sense, NVIDIA GPU works with Wayland only on 495.x version

pacman -S --needed nvidia-dkms nvidia-utils lib32-nvidia-utils vulkan-icd-loader lib32-vulkan-icd-loader libvdpau lib32-libvdpau libxnvctrl opencl-nvidia lib32-opencl-nvidia cuda lib32-libvdpau

After this, install linux-headers for your current kernel version.

I’ve installed nvidia 495 plus linux headers and the system comes back to x11 with kernel 515 and nvidia driver assigned ok.
The kernel 516 has a little problem and it doesn’t complete installation, then it follows in wayland with no nvidia driver assigned.
No problem I’ll wait for next versions to be compatible. Until then, I had to stay in x11.
I’d like to stay in Wayland (it seems more fluid when I login with howdy and instantly it demands the ring keys password; in opposite with x11 that demands when it wants).
Thanks everybody.

With this previous situation, I follow the https://forum.manjaro.org/t/howto-use-wayland-with-propietary-nvidia-drivers/36130 tutorial, and now yes, the system start with wayland and nvidia driver. Other tries to get wayland following this tutorial doesn’t result fine, but now with the 495 drives everything it’s ok.
A lot of thanks.

1 Like

After a while I shutdown. While restarting was ok, with shutdown goes to black screen and x11 when startx in tty.

Gnome 41( and 40.x) will detect nvidia proprietary driver, if proprietary driver installed, it will switch to X11 session by default. Maybe Gnome 42 will remove the restrictions.

But, this is strange. While restarting I get Wayland. Only when shutdown and restart comes back to x11.
I don’t know the differences between shutdown and restart, sorry.
Moreover, when I start again gets only tty, and startx goes wrong, but gnome-shell --wayland start again gnome in wayland but ‘echo $XDG_SESSION_TYPE’ says ‘tty’. I’m noob …
I tried with ‘systemctl restart gdm’ and reset the system to a wayland sessin not tty.

Final solution: restoring a copy of /etc/X11/xorg.conf of an x11 session starts ok in wayland
I can’t run ‘nvidia-settings’ but I don’t need if wayland is ok.

cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf

The only strange thing is the system has lost the option to logout. And it no has other modes to start session (gnome, gnome classic, gnome x11 have been deleted).

Thanks again. I think the problem may be closed.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.