Unable to enable Wayland (intel & nvidia 470 - optimus)

Hi

After a clean install, I’m trying to enable wayland again following the steps in the following thread:

Problem being that after a reboot I’m still on x11 when I try echo $XDG_SESSION_TYPE.

The only thing that isn’t working from those steps is:

gsettings set org.gnome.mutter experimental-features [\"kms-modifiers\"]

Which outputs:

zsh: no matches found: ["kms-modifiers"]

But I don’t know if that should prevent me from having Wayland up & running :thinking:

I’ve been on Wayland for a couple of weeks now so I know it works, I just can’t seem to figure out why it doesn’t right now after this clean install.

Nvidia drivers are on 470.57.02.
Xwayland is on 21.1.2-1.

I’m currently on the stable branch and have no pending updates (updated right after the clean install).

inxi output
System:
  Kernel: 5.10.53-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 
  root=UUID=221560a5-3f1c-47a5-972c-a19c5b904970 rw quiet 
  cryptdevice=UUID=217d51cf-60d8-41d9-baf9-4cfe69b36363:luks-217d51cf-60d8-41d9-baf9-4cfe69b36363 
  root=/dev/mapper/luks-217d51cf-60d8-41d9-baf9-4cfe69b36363 
  resume=/dev/mapper/luks-c5808056-670f-494e-8d35-2bb6fdfab985 
  udev.log_priority=3 nvidia-drm.modeset=1 
  Desktop: GNOME 40.3 tk: GTK 3.24.30 wm: gnome-shell dm: GDM 40.1 
  Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Laptop System: Dell product: Precision 5540 v: N/A serial: <filter> 
  Chassis: type: 10 serial: <filter> 
  Mobo: Dell model: 0FMYX6 v: A00 serial: <filter> UEFI: Dell v: 1.10.0 
  date: 03/04/2021 
Battery:
  ID-1: BAT0 charge: 28.5 Wh (37.3%) condition: 76.4/97.0 Wh (78.8%) 
  volts: 10.7 min: 11.4 model: SMP DELL GPM0365 type: Li-ion serial: <filter> 
  status: Discharging 
Memory:
  RAM: total: 30.99 GiB used: 2.72 GiB (8.8%) 
  RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:
  Info: 8-Core model: Intel Core i9-9880H bits: 64 type: MT MCP 
  arch: Kaby Lake note: check family: 6 model-id: 9E (158) stepping: D (13) 
  microcode: EA cache: L2: 16 MiB bogomips: 73625 
  Speed: 4532 MHz min/max: 800/4800 MHz Core speeds (MHz): 1: 4532 2: 4447 
  3: 4567 4: 4201 5: 4501 6: 4193 7: 4529 8: 4207 9: 4500 10: 4192 11: 4501 
  12: 4186 13: 4187 14: 4597 15: 4501 16: 4445 
  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 ibrs_enhanced 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 pts rdrand rdseed rdtscp rep_good sdbg sep smap smep smx 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 status: Not affected 
  Type: mds status: Not affected 
  Type: meltdown status: Not affected 
  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: Enhanced IBRS, IBPB: conditional, RSB filling 
  Type: srbds mitigation: TSX disabled 
  Type: tsx_async_abort mitigation: TSX disabled 
Graphics:
  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: Dell 
  driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:3e9b class-ID: 0300 
  Device-2: NVIDIA TU117GLM [Quadro T2000 Mobile / Max-Q] vendor: Dell 
  driver: nvidia v: 470.57.02 alternate: nouveau,nvidia_drm bus-ID: 01:00.0 
  chip-ID: 10de:1fb8 class-ID: 0302 
  Device-3: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo 
  bus-ID: 1-12:4 chip-ID: 0c45:6723 class-ID: 0e02 
  Display: wayland server: X.org 1.20.11 compositor: gnome-shell driver: 
  loaded: modesetting unloaded: nvidia alternate: fbdev,intel,nouveau,nv,vesa 
  display-ID: 0 resolution: <missing: xdpyinfo> 
  OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 21.1.5 
  direct render: Yes 
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Dell driver: snd_hda_intel 
  v: kernel alternate: snd_soc_skl,snd_sof_pci bus-ID: 00:1f.3 
  chip-ID: 8086:a348 class-ID: 0403 
  Sound Server-1: ALSA v: k5.10.53-1-MANJARO running: yes 
  Sound Server-2: JACK v: 1.9.19 running: no 
  Sound Server-3: PulseAudio v: 14.2 running: yes 
  Sound Server-4: PipeWire v: 0.3.32 running: no 
Network:
  Device-1: Intel Wireless-AC 9260 driver: iwlwifi v: kernel port: 3000 
  bus-ID: 3b:00.0 chip-ID: 8086:2526 class-ID: 0280 
  IF: wlp59s0 state: up mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  IP v6: <filter> type: dynamic noprefixroute scope: global 
  IP v6: <filter> type: noprefixroute scope: link 
  WAN IP: <filter> 
Bluetooth:
  Device-1: Intel Wireless-AC 9260 Bluetooth Adapter type: USB driver: btusb 
  v: 0.8 bus-ID: 1-4:2 chip-ID: 8087:0025 class-ID: e001 
  Report: rfkill ID: hci0 rfk-id: 3 state: up address: see --recommends 
Logical:
  Message: No logical block device data found. 
  Device-1: luks-217d51cf-60d8-41d9-baf9-4cfe69b36363 maj-min: 254:0 
  type: LUKS dm: dm-0 size: 919.47 GiB 
  Components: 
  p-1: nvme0n1p2 maj-min: 259:2 size: 919.47 GiB 
  Device-2: luks-c5808056-670f-494e-8d35-2bb6fdfab985 maj-min: 254:1 
  type: LUKS dm: dm-1 size: 34.09 GiB 
  Components: 
  p-1: nvme0n1p3 maj-min: 259:3 size: 34.1 GiB 
RAID:
  Message: No RAID data found. 
Drives:
  Local Storage: total: 953.87 GiB used: 11.23 GiB (1.2%) 
  SMART Message: Required tool smartctl not installed. Check --recommends 
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Intel 
  model: SSDPEMKF010T8 NVMe 1024GB size: 953.87 GiB block-size: 
  physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD 
  serial: <filter> rev: 7003 temp: 27.9 C scheme: GPT 
  Message: No optical or floppy data found. 
Partition:
  ID-1: / raw-size: 919.47 GiB size: 903.97 GiB (98.31%) 
  used: 11.23 GiB (1.2%) fs: ext4 dev: /dev/dm-0 maj-min: 254:0 
  mapped: luks-217d51cf-60d8-41d9-baf9-4cfe69b36363 label: N/A 
  uuid: 221560a5-3f1c-47a5-972c-a19c5b904970 
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) 
  used: 440 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1 
  label: NO_LABEL uuid: 5B48-3958 
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) 
  ID-1: swap-1 type: partition size: 34.09 GiB used: 0 KiB (0.0%) priority: -2 
  dev: /dev/dm-1 maj-min: 254:1 
  mapped: luks-c5808056-670f-494e-8d35-2bb6fdfab985 label: N/A 
  uuid: faa93ca4-13ae-4470-adb8-ebe0e33a2722 
Unmounted:
  Message: No unmounted partitions found. 
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 16 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Device-1: 1-4:2 info: Intel Wireless-AC 9260 Bluetooth Adapter 
  type: Bluetooth driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s 
  power: 100mA chip-ID: 8087:0025 class-ID: e001 
  Device-2: 1-7:3 info: Shenzhen Goodix Fingerprint Reader 
  type: Abstract (modem),CDC-Data driver: N/A interfaces: 2 rev: 2.0 
  speed: 12 Mb/s power: 100mA chip-ID: 27c6:5395 class-ID: 0a00 
  serial: <filter> 
  Device-3: 1-12:4 info: Microdia Integrated_Webcam_HD type: Video 
  driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA 
  chip-ID: 0c45:6723 class-ID: 0e02 
  Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 10 rev: 3.1 
  speed: 10 Gb/s chip-ID: 1d6b:0003 class-ID: 0900 
  Hub-3: 3-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Hub-4: 4-0:1 info: Full speed (or root) Hub ports: 2 rev: 3.1 speed: 10 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
Sensors:
  System Temperatures: cpu: 42.0 C mobo: N/A 
  Fan Speeds (RPM): cpu: 0 fan-2: 0 
Info:
  Processes: 339 Uptime: 17m wakeups: 1918 Init: systemd v: 248 
  tool: systemctl Compilers: gcc: N/A Packages: pacman: 961 lib: 270 
  Shell: Zsh v: 5.8 running-in: gnome-terminal inxi: 3.3.06

More info.

/etc/gdm/custom.conf
# GDM configuration storage

[daemon]
AutomaticLoginEnable=False
# 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
/usr/lib/udev/rules.d/61-gdm.rules
# disable Wayland on Hi1710 chipsets
ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="/usr/lib/gdm-runtime-config set daemon WaylandEnable false"
# disable Wayland when using the proprietary nvidia driver
# DRIVER=="nvidia", RUN+="/usr/lib/gdm-runtime-config set daemon WaylandEnable false"
# disable Wayland if modesetting is disabled
# IMPORT{cmdline}="nomodeset", RUN+="/usr/lib/gdm-runtime-config set daemon WaylandEnable false"
/etc/mkinitcpio.conf
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES="nvidia nvidia_modeset nvidia_uvm nvidia_drm"

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES="/crypto_keyfile.bin"

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect block filesystems)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS="base udev autodetect modconf block keyboard keymap encrypt openswap resume filesystems fsck"

# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
#COMPRESSION="zstd"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()
/etc/default/grub
GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=hidden
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="quiet cryptdevice=UUID=217d51cf-60d8-41d9-baf9-4cfe69b36363:luks-217d51cf-60d8-41d9-baf9-4cfe69b36363 root=/dev/mapper/luks-217d51cf-60d8-41d9-baf9-4cfe69b36363 resume=/dev/mapper/luks-c5808056-670f-494e-8d35-2bb6fdfab985 udev.log_priority=3 nvidia-drm.modeset=1"
GRUB_CMDLINE_LINUX=""

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT=true

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment this option to enable os-prober execution in the grub-mkconfig command
GRUB_DISABLE_OS_PROBER=false

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
GRUB_THEME="/usr/share/grub/themes/manjaro/theme.txt"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to ensure that the root filesystem is mounted read-only so that
# systemd-fsck can run the check automatically. We use 'fsck' by default, which
# needs 'rw' as boot parameter, to avoid delay in boot-time. 'fsck' needs to be
# removed from 'mkinitcpio.conf' to make 'systemd-fsck' work.
# See also Arch-Wiki: https://wiki.archlinux.org/index.php/Fsck#Boot_time_checking
#GRUB_ROOT_FS_RO=true
GRUB_ENABLE_CRYPTODISK=y

Hello @DenisV ;-

When you type your password on the login screen, then on the bottom right there should be a button to switch to wayland.

Since you have a hybrid card:

I believe It will choose Intel anyway as display driver. To use Nvidia only, you have to blacklist and disable Intel.

1 Like

The gear gives me the following options:

  • Gnome
  • Gnome classic
  • Gnome on Xorg

I use the first one. I assumed that was the one I needed?

Does the fact that intel is chosen have any impact on Wayland?

What exact reason do you have for using Wayland?

I have a built in 4K 15" monitor and an external 27" 4K monitor. Scaling is a real pain on X11. On Wayland everything just works smooth. The blur on xwayland windows is a small price to pay for that.

Yes it is the correct one.

No… but still Nvidia + xWayland is beta and has only basic support. Don’t expect that everything works. Maybe prime-run does not work? However… Since Intel is your primary gpu, the changes above make no sense, since Nivdia is just used for offload and nothing else.

1 Like

I know that it’s still WIP but I’ve been using Wayland for a couple of weeks now and it was so hassle free compared to the previous year and a half on this laptop that I just want to get it working again :sweat_smile:

Ok, with the intel-first thing in mind I tried adding i915 to my modules in /etc/mkinitcpio.conf and now it works :partying_face:

Thanks for all the help guys :pray:

/etc/mkinitcpio.conf
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES="i915 nvidia nvidia_modeset nvidia_uvm nvidia_drm"

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES="/crypto_keyfile.bin"

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect block filesystems)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS="base udev autodetect modconf block keyboard keymap encrypt openswap resume filesystems fsck"

# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
#COMPRESSION="zstd"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

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