Wayland + Nvidia - Intel Mesa

So Wayland on Nvidia is working on my system but in Hybrid with Intel. NV only kicks in when I load an app that might benefit, eg a game. I’m trying to get full-time Nvidia proprietary driver on the Gnome desktop environmment as well however because the performance of Intel on my Laptop is poor. Is there a way to force full-time Nvidia on Wayland like I presently have on X?

NB: I have followed the main tutorial for setting up NV driver. I’ve attempted to install my drivers without the Intel driver (eg without Optimus) but it would appear it that Intel is still being invoked.

Hopefully this info helps, I saw it on another post…

mhwd -li

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
          video-nvidia            2021.12.18               false            PCI


Warning: No installed USB configs!

mhwd -l

> 0000:02:00.0 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2016.04.20                true            PCI


> 0000:01:00.0 (0300:10de:1c8c) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.11.04               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.11.04               false            PCI
video-hybrid-intel-nvidia-390xx-bumblebee            2021.11.26               false            PCI
          video-nvidia            2021.11.04               false            PCI
    video-nvidia-470xx            2021.11.04               false            PCI
    video-nvidia-390xx            2021.11.26               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:591b) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.11.04               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.11.04               false            PCI
video-hybrid-intel-nvidia-390xx-bumblebee            2021.11.26               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI

inxi --admin --verbosity=7 --filter --width

System:
  Kernel: 5.15.60-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.1.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-5.15-x86_64
    root=UUID=f1e5e8b8-0079-4db3-b294-bce84b24dbb7 rw rootflags=subvol=@
    nvidia-drm.modeset=1 quiet splash apparmor=1 security=apparmor
    udev.log_priority=3
  Desktop: GNOME v: 42.4 tk: GTK v: 3.24.34 wm: gnome-shell dm: GDM v: 42.0
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: Dell product: Inspiron 15 7000 Gaming v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Dell model: 065C71 v: A00 serial: <superuser required> UEFI: Dell
    v: 1.15.0 date: 08/30/2021
Battery:
  ID-1: BAT0 charge: 68.2 Wh (100.0%) condition: 68.2/74.0 Wh (92.2%)
    volts: 12.6 min: 11.1 model: Samsung SDI DELL 0GFJ679 type: Li-ion
    serial: <filter> status: full
Memory:
  RAM: total: 15.37 GiB used: 3.31 GiB (21.5%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges
    required.
CPU:
  Info: model: Intel Core i7-7700HQ bits: 64 type: MT MCP arch: Kaby Lake
    gen: core 7 level: v3 built: 2018 process: Intel 14nm family: 6
    model-id: 0x9E (158) stepping: 9 microcode: 0xF0
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 900 min/max: 800/3800 scaling: driver: intel_pstate
    governor: powersave cores: 1: 900 2: 900 3: 900 4: 900 5: 900 6: 900 7: 900
    8: 900 bogomips: 44817
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 bmi1 bmi2 bts clflush
    clflushopt cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64
    dtherm dts epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu
    fsgsbase fxsr ht hwp hwp_act_window hwp_epp hwp_notify ibpb ibrs ida
    intel_pt invpcid invpcid_single lahf_lm lm mca mce md_clear mmx monitor
    movbe mpx msr mtrr nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm
    pdpe1gb pebs pge pln pni popcnt pse pse36 pti pts rdrand rdseed rdtscp
    rep_good sdbg sep sgx smap smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp
    syscall tm tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer vme vmx vnmi
    vpid x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
    vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: IBRS
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl and seccomp
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: IBRS, IBPB: conditional, RSB filling,
    PBRSB-eIBRS: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel HD Graphics 630 vendor: Dell driver: i915 v: kernel
    arch: Gen-9.5 process: Intel 14nm built: 2016-20 ports: active: eDP-1
    empty: DP-1 bus-ID: 00:02.0 chip-ID: 8086:591b class-ID: 0300
  Device-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile] vendor: Dell
    driver: nvidia v: 515.65.01 alternate: nouveau,nvidia_drm non-free: 515.xx+
    status: current (as of 2022-08) arch: Pascal code: GP10x
    process: TSMC 16nm built: 2016-21 pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 3 speed: 8 GT/s ports: active: none off: HDMI-A-1
    empty: none bus-ID: 01:00.0 chip-ID: 10de:1c8c class-ID: 0300
  Device-3: Sunplus Innovation Integrated_Webcam_HD type: USB
    driver: uvcvideo bus-ID: 1-12:7 chip-ID: 1bcf:28c1 class-ID: 0e02
  Display: wayland server: X.org v: 1.21.1.4 with: Xwayland v: 22.1.3
    compositor: gnome-shell driver: X: loaded: modesetting,nvidia
    gpu: i915,nvidia,nvidia-nvswitch display-ID: 0
  Monitor-1: HDMI-A-1 model: Sony TV serial: <filter> built: 2010
    res: 1920x1080 dpi: 30 gamma: 1.2 size: 1600x900mm (62.99x35.43")
    diag: 1836mm (72.3") ratio: 16:9 modes: max: 1920x1080 min: 640x480
  Monitor-2: eDP-1 model: LG Display 0x053f built: 2016 res: 1920x1080
    dpi: 142 gamma: 1.2 size: 344x194mm (13.54x7.64") diag: 395mm (15.5")
    ratio: 16:9 modes: 1920x1080
  OpenGL: renderer: Mesa Intel HD Graphics 630 (KBL GT2) v: 4.6 Mesa 22.1.6
    direct render: Yes
Audio:
  Device-1: Intel CM238 HD Audio vendor: Dell driver: snd_hda_intel v: kernel
    bus-ID: 00:1f.3 chip-ID: 8086:a171 class-ID: 0403
  Device-2: NVIDIA GP107GL High Definition Audio vendor: Dell
    driver: snd_hda_intel v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 3 speed: 8 GT/s bus-ID: 01:00.1 chip-ID: 10de:0fb9
    class-ID: 0403
  Sound Server-1: ALSA v: k5.15.60-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.21 running: no
  Sound Server-3: PulseAudio v: 16.1 running: yes
  Sound Server-4: PipeWire v: 0.3.56 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Dell driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: d000 bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp2s0 state: down mac: <filter>
  Device-2: Intel Wireless 3165 driver: iwlwifi v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 bus-ID: 03:00.0 chip-ID: 8086:3165 class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8
    bus-ID: 1-4:5 chip-ID: 8087:0a2a class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 4 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
  Device-1: luks-5f2ba54f-9809-4737-84e0-17acea13f6b3 maj-min: 254:0
    type: LUKS dm: dm-0 size: 931.51 GiB
  Components:
  p-1: sdb1 maj-min: 8:17 size: 931.51 GiB
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
    v: 3.0 port: f060 bus-ID: 00:17.0 chip-ID: 8086:282a rev: N/A class-ID: 0104
Drives:
  Local Storage: total: 1.94 TiB used: 1022.45 GiB (51.6%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD PM871b M.2 2280
    128GB size: 119.24 GiB block-size: physical: 512 B logical: 512 B
    speed: 6.0 Gb/s type: SSD serial: <filter> rev: 2D0Q scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: Toshiba model: MQ01ABD100
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 5400 serial: <filter> rev: 3D scheme: GPT
  ID-3: /dev/sdc maj-min: 8:32 type: USB vendor: Western Digital
    model: WD10EAVS-00D7B1 size: 931.51 GiB block-size: physical: 512 B
    logical: 512 B type: N/A serial: <filter> rev: 1.75 scheme: MBR
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 103.74 GiB size: 103.74 GiB (100.00%) used: 82.95 GiB
    (80.0%) fs: btrfs dev: /dev/sda3 maj-min: 8:3 label: N/A
    uuid: f1e5e8b8-0079-4db3-b294-bce84b24dbb7
  ID-2: /boot/efi raw-size: 500 MiB size: 499 MiB (99.80%) used: 608 KiB
    (0.1%) fs: vfat dev: /dev/sda1 maj-min: 8:1 label: N/A uuid: 81D6-F15E
  ID-3: /home raw-size: 103.74 GiB size: 103.74 GiB (100.00%) used: 82.95
    GiB (80.0%) fs: btrfs dev: /dev/sda3 maj-min: 8:3 label: N/A
    uuid: f1e5e8b8-0079-4db3-b294-bce84b24dbb7
  ID-4: /mnt/homextra raw-size: 931.51 GiB size: 931.51 GiB (100.00%)
    used: 579.26 GiB (62.2%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-5f2ba54f-9809-4737-84e0-17acea13f6b3 label: homextra
    uuid: c8146705-d73f-4dce-9651-7abb7e2d9d0f
  ID-5: /run/media/sam/EXT_BKUP raw-size: 931.51 GiB size: 931.51 GiB
    (100.00%) used: 360.24 GiB (38.7%) fs: btrfs dev: /dev/sdc1 maj-min: 8:33
    label: EXT_BKUP uuid: 498e2912-5101-4c5d-a73a-1be0819cb132
  ID-6: /var/cache raw-size: 103.74 GiB size: 103.74 GiB (100.00%) used: 82.95
    GiB (80.0%) fs: btrfs dev: /dev/sda3 maj-min: 8:3 label: N/A
    uuid: f1e5e8b8-0079-4db3-b294-bce84b24dbb7
  ID-7: /var/log raw-size: 103.74 GiB size: 103.74 GiB (100.00%) used: 82.95
    GiB (80.0%) fs: btrfs dev: /dev/sda3 maj-min: 8:3 label: N/A
    uuid: f1e5e8b8-0079-4db3-b294-bce84b24dbb7
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/sda2 maj-min: 8:2 size: 128 MiB fs: <superuser required>
    label: N/A uuid: N/A
  ID-2: /dev/sda4 maj-min: 8:4 size: 464 MiB fs: ntfs label: WINRETOOLS
    uuid: 3E48C3C648C37AE3
  ID-3: /dev/sda5 maj-min: 8:5 size: 13.37 GiB fs: ntfs label: Image
    uuid: 18AEC403AEC3D800
  ID-4: /dev/sda6 maj-min: 8:6 size: 1.06 GiB fs: ntfs label: N/A
    uuid: 361AE9021AE8BFCB
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 16 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 1-2:2 info: Manufacturer ports: 4 rev: 1.1 speed: 12 Mb/s
    power: 100mA chip-ID: 0a05:0002 class-ID: 0900
  Device-1: 1-2.1:4 info: Pixart Imaging Optical Mouse type: Mouse
    driver: hid-generic,usbhid interfaces: 1 rev: 1.1 speed: 1.5 Mb/s
    power: 100mA chip-ID: 093a:2521 class-ID: 0301
  Hub-3: 1-2.2:6 info: Dell Multimedia Pro Keyboard Hub ports: 3 rev: 1.1
    speed: 12 Mb/s power: 100mA chip-ID: 413c:1005 class-ID: 0900
  Device-1: 1-2.2.1:9 info: Dell Multimedia Pro Keyboard type: Keyboard,HID
    driver: hid-generic,usbhid interfaces: 2 rev: 1.1 speed: 1.5 Mb/s
    power: 90mA chip-ID: 413c:2011 class-ID: 0300
  Device-2: 1-2.3:8 info: Microsoft Wireless keyboard (All-in-One-Media)
    type: Keyboard,Mouse,HID driver: hid-generic,usbhid interfaces: 3 rev: 2.0
    speed: 12 Mb/s power: 100mA chip-ID: 045e:0800 class-ID: 0300
  Device-3: 1-3:12 info: Western Digital My Book Essential Edition 2.0
    (WDH1U) type: Mass Storage driver: usb-storage interfaces: 1 rev: 2.0
    speed: 480 Mb/s power: 2mA chip-ID: 1058:1100 class-ID: 0806
    serial: <filter>
  Device-4: 1-4:5 info: Intel Bluetooth wireless interface type: Bluetooth
    driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA
    chip-ID: 8087:0a2a class-ID: e001
  Device-5: 1-12:7 info: Sunplus Innovation Integrated_Webcam_HD type: Video
    driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA
    chip-ID: 1bcf:28c1 class-ID: 0e02
  Hub-4: 2-0:1 info: Super-speed hub ports: 8 rev: 3.0 speed: 5 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 50.0 C pch: 50.0 C mobo: 43.0 C sodimm: SODIMM C
  Fan Speeds (RPM): cpu: 0
Info:
  Processes: 336 Uptime: 1d 16h 45m wakeups: 8 Init: systemd v: 251
  default: graphical tool: systemctl Compilers: gcc: 12.1.1 clang: 14.0.6
  Packages: 1427 pm: pacman pkgs: 1400 libs: 451 tools: gnome-software,pamac
  pm: flatpak pkgs: 27 Shell: Zsh v: 5.9 running-in: gnome-terminal
  inxi: 3.3.21

you can switch to nvidia by using optimus.

be aware that wayland and nvidia is still a mess and i don’t believe that it will be stable. too many things are still unsolved and cause malfunction and crashs.

Thanks for your reponse Olli!

I was running Optimus Manager up until a few months ago and after seeing your post decided to give it another go. Strangely, despite choosing Nvidia with Wayland it would login with Intel Mesa but the desktop performance was better. That’s good. Game performance was good too except for one game. Unfortunately though the second monitor wouldn’t work so I had to abandon Wayland.

My main reason for using Wayland was to remove tearing and so I reverted to X but enabling Full Composition Pipeline (fixes tearing) and saving the Xorg.conf (or equivalent on Optimus) wouldn’t last beyond reboot.

please activate the nvidia-persitenced service

sudo systemctl enable nvidia-persistenced

do a reboot or start it with

sudo systemctl start nvidia-persistenced

Quote:

and saving the Xorg.conf (or equivalent on Optimus) wouldn’t last beyond reboot.

you have to run it as sudo to save the settings

Interesting, I didn’t know about the persistence setting. I tried it, but there must be an issue with my particular install because rebooting reverts back to Intel for me, even if I set Optimus to Nvidia with “optimus-manager --switch nvidia”. So I have to set that, logout, and log in again to get NV.

The “sudo nvidia-settings” change seems to have persisted beyond reboot though.

Also, my system did a kernel and NV driver update in the meanwhile and the Intel performance was slow again but multi-monitor was back. That explains why performance had increased.

please read the following

Quote:

If you use Gnome or the Gnome Display Manager (GDM), there are a couple extra requirements to be able to use optimus-manager :

The default gdm package from the Archlinux and Manjaro repositories is not compatible with optimus-manager, so you must replace it with this patched version : gdm-prime (also replaces libgdm). The patch was written by Canonical for Ubuntu and simply adds two script entry points specifically for Prime switching. The package is otherwise identical to the official one.

Gnome launches Wayland sessions by default, which are incompatible with optimus-manager. To force Xorg sessions, You need to edit the file /etc/gdm/custom.conf and remove the # before the line #WaylandEnable=false.

Another quirk of GDM is that the X server may not automatically restart after a GPU switch. If you see an empty black screen or a black screen with a blinking cursor, try switching back to an empty TTY (with Ctrl+Alt+F5 for instance), then back to TTY1 with Ctrl+Alt+F1. See this FAQ question.

Thanks Olli, yeah I had included the GDM requirements in my installation. Perhaps I’ll revert to old driver and try again at some point.