Because X11 is very choppy on my laptop I tried installing plasma-wayland-session package on my intel/nvidia laptop. After a restart the integrated screen was very smooth, but I couldn’t get any output on my external monitor.
I have tried adding nvidia-drm.modeset=1 kernel parameter alongside adding nvidia, nvidia_modeset, nvidia_uvm and nvidia_drm to the initramfs. But then I couldn’t reach the graphical interface.
In journalctl I found this error
sddm[714]: Display server starting...
sddm[714]: Adding cookie to "/var/run/sddm/{8daefaf0-ba4e-4d73-afa2-636aa31e0da4}"
sddm[714]: Running: /usr/bin/X -nolisten tcp -background none -seat seat0 vt1 -auth>
sddm[714]: Failed to read display number from pipe
sddm[714]: Display server stopping...
sddm[714]: Attempt 3 starting the Display server on vt 1 failed
sddm[714]: Could not start Display server on vt 1
Downgrading to nvidia-470xx hybrid drivers worked with the parameters set but then external monitor would be very choppy, probably because the external monitor was 1440p 144hz and have heard that the driver would just use the CPU for external monitors.
I have also tried using KDE-unstable repository and newer linux kernels but no luck.
Some information about my setup:
Current KDE Plasma version: 5.24.5
Qt version: 5.15.4
Kernel version: 5.15.41-1-MANJARO
install optimus manager. enable it with “sudo systemctl enable optimus-manager”
edit /etc/default/grub (you must edit with sudo rights) and add the following to GRUB_CMDLINE_LINUX_DEFAULT line "optimus-manager.startup=nvidia ". be aware you have to add this parameter to the already existing ones.
after editing do an
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
I also tried using optimus-manager --switch nvidia and got this
ERROR: the active card is "integrated" but it should be "nvidia".
Something went wrong during the last GPU setup...
Log at /var/log/optimus-manager/switch/switch-20220609T145621.log
Cannot execute command because of previous errors.
No luck, it doesn’t do anything, and the monitors were already set up in kde system settings as the screen was working but it’s unusable as to how laggy it is.
edit /etc/default/grub (you must edit with sudo rights) and add the following to GRUB_CMDLINE_LINUX_DEFAULT line "optimus-manager.startup=nvidia ". be aware you have to add this parameter to the already existing ones.
after editing do an
sudo update-grub
sudo mkinitcpio -P
reboot
GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=hidden
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="optimus-manager.startup=nvidia nvidia-drm.modeset=1 apparmor=1 security=apparmor resume=UUID=e218ae5f-1e51-4031-b9b8-6d625f4bf64e udev.log_priority=3"
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
# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y
# 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
tried with and without nvidia-drm.modeset=1 same result
yes it’s still laggy because intel is still the primary-graphics adapter
glxinfo | grep "OpenGL renderer"
will show that it is still intel and not nvidia
also you said you’ve installed plasma-wayland-session from packet-manager. in this case you can choose X11 or wayland at login (left, bottom corner). choose X11
Actually with optimus-manager set up all X11 lag is gone and everything is incredibly smooth.
So the solution is to just ditch wayland and use optimus-manager. I’ll try to tinker more with optimus-manager, try to make power managment work and stuff like that, but the main issue is fixed.