PRIME multiple monitors weird behavior

I am trying to set up nvidia PRIME on my laptop with an intel iGPU and nvidia dGPU. I am running Manjaro Linux with the linux56-rt kernel.

  • I installed linux56-rt-nvidia-450xx via pacman,
  • installed PRIME via sudo mhwd -i pci video-hybrid-intel-nvidia-450xx-prime,
  • modesetting driver via sudo mhwd -i pci video-modesetting
  • and I also removed my xf86-video-intel driver, so that my system defaults to the modesetting driver by default.

Then I have this in /etc/X11/xorg.conf.d/20-nvidia.conf:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen         0 "Screen0" 0 0
    Screen         1 "Screen1" Above "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "AllowNVIDIAGPUScreens"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    Option         "DPMS"
    Option         "Primary" "true"
    Option         "Enable" "true"
EndSection
Section "Monitor"
    Identifier     "Monitor1"
    Option         "DPMS"
    Option         "Above" "Monitor0"
    Option         "Enable" "true"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Modes      "nvidia-auto-select"
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device0"
    Monitor        "Monitor1"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Modes      "nvidia-auto-select"
    EndSubSection
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "modesetting"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

This allows me to run prime-run <command> to use the dGPU, but run on the iGPU by default. This is basically the exact setup I need, but there are problems with making this work on the dual screen.

The problem is that Xorg apparently does not create separate screens for each monitor. Windows in the top screen spread out all the way to the other screen (laptop) below it, instead of being contained on the monitor display. Also workspaces in XFCE do not map to the monitors as they should. When I move the cursor from one monitor to the other, its position is reset to the center of the monitor edge.

That is why I can’t use PRIME right now, and have defaulted to the dGPU for now, by selecting Device1 for both Screen sections in my Xorg configuration. But this is very overkill and will probably drain my battery quicker, unless I keep switching it manually.

I connect the second monitor via DisplayPort and the other one is integrated in the Laptop.

This might be related to Xinerama, however setting Option "Xinerama" "true" or "false" in the ServerLayout section did not change anything.

I have tried running sudo nvidia-xconfig --prime and sudo nvidia-xconfig --prime --xinerama with no luck.

Is this a known issue with PRIME or are there other things I can try on my system to fix this?
Thanks a lot

You seem to be mixing screens/xinerama and xrandr. Prime basically needs you to use xrandr (maybe you’re starting with old/stale documentation). Try to replace the content of your file with:

Section "OutputClass"
        Identifier "Nvidia"
        MatchDriver "nvidia-drm"
        driver "nvidia"
        Option "AllowEmptyInitialConfiguration"
EndSection

Possibly adding (in another file perhaps):

Section "OutputClass"
        Identifier "Intel"
        MatchDriver "modesetting"
        driver "modesetting"
EndSection

It is possible to add monitor information but generally it’s easier to let your windowmanager/configuration system worry about it (especially with a laptop where monitors are not static).

Thank you for your response. With (only) these settings I had to reinstall xf86-video-intel, because in the Xorg log it said it couldn’t load module intel. Now I can boot again, but my external monitor is not recognized and xrandr --listproviders only shows one provider: Intel (capitalized)… so this may be coming from this config, but for some reason the nvidia device is not being initialized. There is no entry of it in the Xorg log.

[     8.094] 
X.Org X Server 1.20.9
X Protocol Version 11, Revision 0
[     8.094] Build Operating System: Linux Manjaro Linux
[     8.094] Current Operating System: Linux linus-ge63vr7re 5.6.19-3-rt12-MANJARO #1 SMP PREEMPT_RT Sat Aug 22 13:15:07 UTC 2020 x86_64
[     8.094] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.6-rt-x86_64 root=UUID=d7fe9030-f032-4385-879d-3055c79300bd rw quiet apparmor=1 security=apparmor udev.log_priority=3 nvidia-drm.modeset=1
[     8.095] Build Date: 02 September 2020  07:39:17AM
[     8.095]  
[     8.095] Current version of pixman: 0.40.0
[     8.095] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[     8.095] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[     8.095] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Oct 13 16:57:33 2020
[     8.106] (==) Using config file: "/etc/X11/xorg.conf"
[     8.106] (==) Using config directory: "/etc/X11/xorg.conf.d"
[     8.106] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[     8.124] (==) ServerLayout "layout"
[     8.124] (==) No screen section available. Using defaults.
[     8.124] (**) |-->Screen "Default Screen Section" (0)
[     8.124] (**) |   |-->Monitor "<default monitor>"
[     8.124] (==) No device specified for screen "Default Screen Section".
	Using the first device section listed.
[     8.124] (**) |   |-->Device "iGPU"
[     8.124] (**) |   |-->GPUDevice "Device0"
[     8.124] (**) |   |-->GPUDevice "Device1"
[     8.124] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[     8.124] (==) Automatically adding devices
[     8.124] (==) Automatically enabling devices
[     8.124] (==) Automatically adding GPU devices
[     8.124] (==) Automatically binding GPU devices
[     8.124] (==) Max clients allowed: 256, resource mask: 0x1fffff
[     8.136] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[     8.136] 	Entry deleted from font path.
[     8.136] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[     8.136] 	Entry deleted from font path.
[     8.137] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi".
[     8.137] 	Entry deleted from font path.
[     8.137] 	(Run 'mkfontdir' on "/usr/share/fonts/100dpi").
[     8.139] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi".
[     8.139] 	Entry deleted from font path.
[     8.139] 	(Run 'mkfontdir' on "/usr/share/fonts/75dpi").
[     8.139] (==) FontPath set to:
	/usr/share/fonts/misc,
	/usr/share/fonts/TTF
[     8.139] (==) ModulePath set to "/usr/lib/xorg/modules"
[     8.139] (**) Extension "Composite" is enabled
[     8.139] (**) Extension "RENDER" is enabled
[     8.139] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[     8.139] (II) Module ABI versions:
[     8.139] 	X.Org ANSI C Emulation: 0.4
[     8.139] 	X.Org Video Driver: 24.1
[     8.139] 	X.Org XInput driver : 24.1
[     8.139] 	X.Org Server Extension : 10.0
[     8.140] (++) using VT number 7

[     8.140] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[     8.141] (II) xfree86: Adding drm device (/dev/dri/card0)
[     8.141] (II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
[     8.214] (II) xfree86: Adding drm device (/dev/dri/card1)
[     8.214] (II) Platform probe for /sys/devices/pci0000:00/0000:00:02.0/drm/card1
[     8.216] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/xorg/modules"
[     8.216] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/xorg/modules"
[     8.218] (--) PCI:*(0@0:2:0) 8086:591b:1462:11f7 rev 4, Mem @ 0xdd000000/16777216, 0xb0000000/268435456, I/O @ 0x0000f000/64, BIOS @ 0x????????/131072
[     8.218] (--) PCI: (1@0:0:0) 10de:1c20:1462:11f7 rev 161, Mem @ 0xde000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/524288
[     8.218] (II) Open ACPI successful (/var/run/acpid.socket)
[     8.218] (II) LoadModule: "glx"
[     8.220] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[     8.226] (II) Module glx: vendor="X.Org Foundation"
[     8.226] 	compiled for 1.20.9, module version = 1.0.0
[     8.226] 	ABI class: X.Org Server Extension, version 10.0
[     8.226] (II) LoadModule: "intel"
[     8.226] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[     8.229] (II) Module intel: vendor="X.Org Foundation"
[     8.229] 	compiled for 1.20.8, module version = 2.99.917
[     8.229] 	Module class: X.Org Video Driver
[     8.229] 	ABI class: X.Org Video Driver, version 24.1
[     8.229] (II) LoadModule: "vesa"
[     8.229] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[     8.230] (II) Module vesa: vendor="X.Org Foundation"
[     8.230] 	compiled for 1.20.9, module version = 2.5.0
[     8.230] 	Module class: X.Org Video Driver
[     8.230] 	ABI class: X.Org Video Driver, version 24.1
[     8.230] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
	i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
	915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
	Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
	GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[     8.230] (II) intel: Driver for Intel(R) HD Graphics
[     8.230] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[     8.230] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[     8.230] (II) VESA: driver for VESA chipsets: vesa
[     8.236] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20200114
[     8.236] (II) intel(0): SNA compiled from 2.99.917-908-g7181c5a4
[     8.236] vesa: Refusing to run on UEFI
[     8.237] (--) intel(0): gen9 engineering sample
[     8.237] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2, avx, avx2; using a maximum of 4 threads
[     8.237] (II) intel(0): Creating default Display subsection in Screen section
	"Default Screen Section" for depth/fbbpp 24/32
[     8.237] (==) intel(0): Depth 24, (--) framebuffer bpp 32
[     8.237] (==) intel(0): RGB weight 888
[     8.237] (==) intel(0): Default visual is TrueColor
[     8.237] (**) intel(0): Option "Backlight" "intel_backlight"
[     8.238] (II) intel(0): Output eDP1 has no monitor section
[     8.238] (**) intel(0): Found backlight control interface intel_backlight (type 'raw') for output eDP1
[     8.238] (II) intel(0): Enabled output eDP1
[     8.238] (--) intel(0): Using a maximum size of 256x256 for hardware cursors
[     8.238] (II) intel(0): Output VIRTUAL1 has no monitor section
[     8.238] (II) intel(0): Enabled output VIRTUAL1
[     8.238] (--) intel(0): Output eDP1 using initial mode 1920x1080 on pipe 0
[     8.239] (==) intel(0): TearFree enabled
[     8.239] (==) intel(0): Using gamma correction (1.0, 1.0, 1.0)
[     8.239] (==) intel(0): DPI set to (96, 96)
[     8.239] (II) Loading sub module "dri3"
[     8.239] (II) LoadModule: "dri3"
[     8.239] (II) Module "dri3" already built-in
[     8.239] (II) Loading sub module "dri2"
[     8.239] (II) LoadModule: "dri2"
[     8.239] (II) Module "dri2" already built-in
[     8.239] (II) Loading sub module "present"
[     8.239] (II) LoadModule: "present"
[     8.239] (II) Module "present" already built-in
[     8.248] (II) intel(0): SNA initialized with Kabylake (gen9) backend
[     8.248] (==) intel(0): Backing store enabled
[     8.248] (==) intel(0): Silken mouse disabled
[     8.248] (II) intel(0): HW Cursor enabled
[     8.249] (==) intel(0): DPMS enabled
[     8.249] (==) intel(0): Display hotplug detection enabled
[     8.250] (II) intel(0): [DRI2] Setup complete
[     8.250] (II) intel(0): [DRI2]   DRI driver: i965
[     8.250] (II) intel(0): [DRI2]   VDPAU driver: va_gl
[     8.250] (II) intel(0): direct rendering: DRI2 DRI3 enabled
[     8.250] (II) intel(0): hardware support for Present enabled
[     8.250] (II) Initializing extension Generic Event Extension
[     8.250] (II) Initializing extension SHAPE
[     8.250] (II) Initializing extension MIT-SHM
[     8.250] (II) Initializing extension XInputExtension
[     8.250] (II) Initializing extension XTEST
[     8.250] (II) Initializing extension BIG-REQUESTS
[     8.250] (II) Initializing extension SYNC
[     8.251] (II) Initializing extension XKEYBOARD
[     8.251] (II) Initializing extension XC-MISC
[     8.251] (II) Initializing extension SECURITY
[     8.251] (II) Initializing extension XFIXES
[     8.251] (II) Initializing extension RENDER
[     8.251] (II) Initializing extension RANDR
[     8.251] (II) Initializing extension COMPOSITE
[     8.251] (II) Initializing extension DAMAGE
[     8.252] (II) Initializing extension MIT-SCREEN-SAVER
[     8.252] (II) Initializing extension DOUBLE-BUFFER
[     8.252] (II) Initializing extension RECORD
[     8.252] (II) Initializing extension DPMS
[     8.252] (II) Initializing extension Present
[     8.252] (II) Initializing extension DRI3
[     8.252] (II) Initializing extension X-Resource
[     8.252] (II) Initializing extension XVideo
[     8.252] (II) Initializing extension XVideo-MotionCompensation
[     8.252] (II) Initializing extension GLX
[     8.279] (II) AIGLX: Loaded and initialized i965
[     8.279] (II) GLX: Initialized DRI2 GL provider for screen 0
[     8.279] (II) Initializing extension XFree86-VidModeExtension
[     8.279] (II) Initializing extension XFree86-DGA
[     8.279] (II) Initializing extension XFree86-DRI
[     8.279] (II) Initializing extension DRI2
[     8.283] (II) intel(0): switch to mode 1920x1080@120.0 on eDP1 using pipe 0, position (0, 0), rotation normal, reflection none
[     8.290] (II) intel(0): Setting screen physical size to 508 x 285
[     8.330] (II) config/udev: Adding input device Power Button (/dev/input/event3)
[     8.330] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[     8.330] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[     8.330] (**) Power Button: Applying InputClass "system-keyboard"
[     8.330] (**) Power Button: Applying InputClass "Keyboard Defaults"
[     8.330] (II) LoadModule: "libinput"
[     8.330] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
[     8.335] (II) Module libinput: vendor="X.Org Foundation"
[     8.335] 	compiled for 1.20.8, module version = 0.30.0
[     8.335] 	Module class: X.Org XInput Driver
[     8.335] 	ABI class: X.Org XInput driver, version 24.1
[     8.335] (II) Using input driver 'libinput' for 'Power Button'
[     8.335] (**) Power Button: always reports core events
[     8.335] (**) Option "Device" "/dev/input/event3"
[     8.335] (**) Option "_source" "server/udev"
[     8.342] (II) event3  - Power Button: is tagged by udev as: Keyboard
[     8.342] (II) event3  - Power Button: device is a keyboard
[     8.342] (II) event3  - Power Button: device removed
[     8.377] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input3/event3"
[     8.377] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 6)
[     8.377] (**) Option "xkb_model" "pc105"
[     8.377] (**) Option "xkb_layout" "de"
[     8.377] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[     8.416] (II) event3  - Power Button: is tagged by udev as: Keyboard
[     8.416] (II) event3  - Power Button: device is a keyboard
[     8.418] (II) config/udev: Adding input device Video Bus (/dev/input/event7)
[     8.418] (**) Video Bus: Applying InputClass "evdev keyboard catchall"
[     8.418] (**) Video Bus: Applying InputClass "libinput keyboard catchall"
[     8.418] (**) Video Bus: Applying InputClass "system-keyboard"
[     8.418] (**) Video Bus: Applying InputClass "Keyboard Defaults"
[     8.418] (II) Using input driver 'libinput' for 'Video Bus'
[     8.418] (**) Video Bus: always reports core events
[     8.418] (**) Option "Device" "/dev/input/event7"
[     8.418] (**) Option "_source" "server/udev"
[     8.420] (II) event7  - Video Bus: is tagged by udev as: Keyboard
[     8.420] (II) event7  - Video Bus: device is a keyboard
[     8.420] (II) event7  - Video Bus: device removed
[     8.480] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input21/event7"
[     8.480] (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD, id 7)
[     8.480] (**) Option "xkb_model" "pc105"
[     8.480] (**) Option "xkb_layout" "de"
[     8.480] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[     8.484] (II) event7  - Video Bus: is tagged by udev as: Keyboard
[     8.484] (II) event7  - Video Bus: device is a keyboard
[     8.486] (II) config/udev: Adding input device Video Bus (/dev/input/event8)
[     8.486] (**) Video Bus: Applying InputClass "evdev keyboard catchall"
[     8.486] (**) Video Bus: Applying InputClass "libinput keyboard catchall"
[     8.486] (**) Video Bus: Applying InputClass "system-keyboard"
[     8.486] (**) Video Bus: Applying InputClass "Keyboard Defaults"
[     8.486] (II) Using input driver 'libinput' for 'Video Bus'
[     8.486] (**) Video Bus: always reports core events
[     8.486] (**) Option "Device" "/dev/input/event8"
[     8.486] (**) Option "_source" "server/udev"
[     8.489] (II) event8  - Video Bus: is tagged by udev as: Keyboard
[     8.490] (II) event8  - Video Bus: device is a keyboard
[     8.490] (II) event8  - Video Bus: device removed
[     8.523] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/LNXVIDEO:01/input/input22/event8"
[     8.524] (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD, id 8)
[     8.524] (**) Option "xkb_model" "pc105"
[     8.524] (**) Option "xkb_layout" "de"
[     8.524] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[     8.527] (II) event8  - Video Bus: is tagged by udev as: Keyboard
[     8.528] (II) event8  - Video Bus: device is a keyboard
[     8.530] (II) config/udev: Adding input device Lid Switch (/dev/input/event0)
[     8.530] (II) No input driver specified, ignoring this device.
[     8.530] (II) This device may have been added with another device file.
[     8.531] (II) config/udev: Adding input device Power Button (/dev/input/event2)
[     8.531] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[     8.531] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[     8.531] (**) Power Button: Applying InputClass "system-keyboard"
[     8.531] (**) Power Button: Applying InputClass "Keyboard Defaults"
[     8.531] (II) Using input driver 'libinput' for 'Power Button'
[     8.531] (**) Power Button: always reports core events
[     8.531] (**) Option "Device" "/dev/input/event2"
[     8.531] (**) Option "_source" "server/udev"
[     8.533] (II) event2  - Power Button: is tagged by udev as: Keyboard
[     8.534] (II) event2  - Power Button: device is a keyboard
[     8.534] (II) event2  - Power Button: device removed
[     8.573] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input2/event2"
[     8.573] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 9)
[     8.573] (**) Option "xkb_model" "pc105"
[     8.573] (**) Option "xkb_layout" "de"
[     8.573] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[     8.576] (II) event2  - Power Button: is tagged by udev as: Keyboard
[     8.577] (II) event2  - Power Button: device is a keyboard
[     8.578] (II) config/udev: Adding input device Sleep Button (/dev/input/event1)
[     8.578] (**) Sleep Button: Applying InputClass "evdev keyboard catchall"
[     8.578] (**) Sleep Button: Applying InputClass "libinput keyboard catchall"
[     8.578] (**) Sleep Button: Applying InputClass "system-keyboard"
[     8.578] (**) Sleep Button: Applying InputClass "Keyboard Defaults"
[     8.578] (II) Using input driver 'libinput' for 'Sleep Button'
[     8.578] (**) Sleep Button: always reports core events
[     8.578] (**) Option "Device" "/dev/input/event1"
[     8.578] (**) Option "_source" "server/udev"
[     8.581] (II) event1  - Sleep Button: is tagged by udev as: Keyboard
[     8.581] (II) event1  - Sleep Button: device is a keyboard
[     8.581] (II) event1  - Sleep Button: device removed
[     8.633] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input1/event1"
[     8.633] (II) XINPUT: Adding extended input device "Sleep Button" (type: KEYBOARD, id 10)
[     8.633] (**) Option "xkb_model" "pc105"
[     8.633] (**) Option "xkb_layout" "de"
[     8.633] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[     8.637] (II) event1  - Sleep Button: is tagged by udev as: Keyboard
[     8.637] (II) event1  - Sleep Button: device is a keyboard
[     8.641] (II) config/udev: Adding input device Logitech MX Master (/dev/input/event5)
[     8.641] (**) Logitech MX Master: Applying InputClass "evdev pointer catchall"
[     8.641] (**) Logitech MX Master: Applying InputClass "evdev keyboard catchall"
[     8.641] (**) Logitech MX Master: Applying InputClass "libinput pointer catchall"
[     8.641] (**) Logitech MX Master: Applying InputClass "libinput keyboard catchall"
[     8.641] (**) Logitech MX Master: Applying InputClass "system-keyboard"
[     8.641] (**) Logitech MX Master: Applying InputClass "Keyboard Defaults"
[     8.641] (II) Using input driver 'libinput' for 'Logitech MX Master'
[     8.641] (**) Logitech MX Master: always reports core events
[     8.641] (**) Option "Device" "/dev/input/event5"
[     8.641] (**) Option "_source" "server/udev"
[     8.646] (II) event5  - Logitech MX Master: is tagged by udev as: Keyboard Mouse
[     8.646] (II) event5  - Logitech MX Master: device set to 1000 DPI
[     8.647] (II) event5  - Logitech MX Master: device is a pointer
[     8.647] (II) event5  - Logitech MX Master: device is a keyboard
[     8.647] (II) event5  - Logitech MX Master: device removed
[     8.723] (II) libinput: Logitech MX Master: needs a virtual subdevice
[     8.724] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2/0003:046D:C52B.0003/0003:046D:4060.0004/input/input18/event5"
[     8.724] (II) XINPUT: Adding extended input device "Logitech MX Master" (type: MOUSE, id 11)
[     8.724] (**) Option "AccelerationScheme" "none"
[     8.724] (**) Logitech MX Master: (accel) selected scheme none/0
[     8.724] (**) Logitech MX Master: (accel) acceleration factor: 2.000
[     8.724] (**) Logitech MX Master: (accel) acceleration threshold: 4
[     8.729] (II) event5  - Logitech MX Master: is tagged by udev as: Keyboard Mouse
[     8.729] (II) event5  - Logitech MX Master: device set to 1000 DPI
[     8.729] (II) event5  - Logitech MX Master: device is a pointer
[     8.729] (II) event5  - Logitech MX Master: device is a keyboard
[     8.732] (II) config/udev: Adding input device Logitech MX Master (/dev/input/mouse0)
[     8.732] (**) Logitech MX Master: Applying InputClass "system-keyboard"
[     8.732] (**) Logitech MX Master: Applying InputClass "Keyboard Defaults"
[     8.732] (II) No input driver specified, ignoring this device.
[     8.732] (II) This device may have been added with another device file.
[     8.733] (II) config/udev: Adding input device HDA Intel PCH Mic (/dev/input/event10)
[     8.733] (II) No input driver specified, ignoring this device.
[     8.733] (II) This device may have been added with another device file.
[     8.734] (II) config/udev: Adding input device HDA Intel PCH Headphone (/dev/input/event11)
[     8.734] (II) No input driver specified, ignoring this device.
[     8.734] (II) This device may have been added with another device file.
[     8.736] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event4)
[     8.736] (**) AT Translated Set 2 keyboard: Applying InputClass "evdev keyboard catchall"
[     8.736] (**) AT Translated Set 2 keyboard: Applying InputClass "libinput keyboard catchall"
[     8.736] (**) AT Translated Set 2 keyboard: Applying InputClass "system-keyboard"
[     8.736] (**) AT Translated Set 2 keyboard: Applying InputClass "Keyboard Defaults"
[     8.736] (II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'
[     8.736] (**) AT Translated Set 2 keyboard: always reports core events
[     8.736] (**) Option "Device" "/dev/input/event4"
[     8.736] (**) Option "_source" "server/udev"
[     8.739] (II) event4  - AT Translated Set 2 keyboard: is tagged by udev as: Keyboard
[     8.739] (II) event4  - AT Translated Set 2 keyboard: device is a keyboard
[     8.741] (II) event4  - AT Translated Set 2 keyboard: device removed
[     8.763] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio0/input/input4/event4"
[     8.763] (II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD, id 12)
[     8.763] (**) Option "xkb_model" "pc105"
[     8.763] (**) Option "xkb_layout" "de"
[     8.763] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[     8.765] (II) event4  - AT Translated Set 2 keyboard: is tagged by udev as: Keyboard
[     8.765] (II) event4  - AT Translated Set 2 keyboard: device is a keyboard
[     8.766] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event12)
[     8.766] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "evdev touchpad catchall"
[     8.766] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "libinput touchpad catchall"
[     8.766] (II) Using input driver 'libinput' for 'SynPS/2 Synaptics TouchPad'
[     8.766] (**) SynPS/2 Synaptics TouchPad: always reports core events
[     8.766] (**) Option "Device" "/dev/input/event12"
[     8.766] (**) Option "_source" "server/udev"
[     8.767] (II) event12 - SynPS/2 Synaptics TouchPad: is tagged by udev as: Touchpad
[     8.768] (II) event12 - SynPS/2 Synaptics TouchPad: device is a touchpad
[     8.768] (II) event12 - SynPS/2 Synaptics TouchPad: device removed
[     8.857] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio1/input/input20/event12"
[     8.857] (II) XINPUT: Adding extended input device "SynPS/2 Synaptics TouchPad" (type: TOUCHPAD, id 13)
[     8.858] (**) Option "AccelerationScheme" "none"
[     8.858] (**) SynPS/2 Synaptics TouchPad: (accel) selected scheme none/0
[     8.858] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration factor: 2.000
[     8.858] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration threshold: 4
[     8.860] (II) event12 - SynPS/2 Synaptics TouchPad: is tagged by udev as: Touchpad
[     8.862] (II) event12 - SynPS/2 Synaptics TouchPad: device is a touchpad
[     8.863] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/mouse1)
[     8.863] (II) No input driver specified, ignoring this device.
[     8.863] (II) This device may have been added with another device file.
[     8.864] (II) config/udev: Adding input device PC Speaker (/dev/input/event6)
[     8.864] (II) No input driver specified, ignoring this device.
[     8.864] (II) This device may have been added with another device file.
[     8.865] (II) config/udev: Adding input device MSI WMI hotkeys (/dev/input/event9)
[     8.865] (**) MSI WMI hotkeys: Applying InputClass "evdev keyboard catchall"
[     8.865] (**) MSI WMI hotkeys: Applying InputClass "libinput keyboard catchall"
[     8.865] (**) MSI WMI hotkeys: Applying InputClass "system-keyboard"
[     8.865] (**) MSI WMI hotkeys: Applying InputClass "Keyboard Defaults"
[     8.865] (II) Using input driver 'libinput' for 'MSI WMI hotkeys'
[     8.865] (**) MSI WMI hotkeys: always reports core events
[     8.865] (**) Option "Device" "/dev/input/event9"
[     8.865] (**) Option "_source" "server/udev"
[     8.866] (II) event9  - MSI WMI hotkeys: is tagged by udev as: Keyboard
[     8.866] (II) event9  - MSI WMI hotkeys: device is a keyboard
[     8.867] (II) event9  - MSI WMI hotkeys: device removed
[     8.903] (**) Option "config_info" "udev:/sys/devices/virtual/input/input23/event9"
[     8.903] (II) XINPUT: Adding extended input device "MSI WMI hotkeys" (type: KEYBOARD, id 14)
[     8.903] (**) Option "xkb_model" "pc105"
[     8.903] (**) Option "xkb_layout" "de"
[     8.904] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[     8.907] (II) event9  - MSI WMI hotkeys: is tagged by udev as: Keyboard
[     8.908] (II) event9  - MSI WMI hotkeys: device is a keyboard
[     8.940] (**) Logitech MX Master: Applying InputClass "evdev pointer catchall"
[     8.941] (**) Logitech MX Master: Applying InputClass "evdev keyboard catchall"
[     8.941] (**) Logitech MX Master: Applying InputClass "libinput pointer catchall"
[     8.941] (**) Logitech MX Master: Applying InputClass "libinput keyboard catchall"
[     8.941] (**) Logitech MX Master: Applying InputClass "system-keyboard"
[     8.941] (**) Logitech MX Master: Applying InputClass "Keyboard Defaults"
[     8.941] (II) Using input driver 'libinput' for 'Logitech MX Master'
[     8.941] (**) Logitech MX Master: always reports core events
[     8.941] (**) Option "Device" "/dev/input/event5"
[     8.941] (**) Option "_source" "_driver/libinput"
[     8.941] (II) libinput: Logitech MX Master: is a virtual subdevice
[     8.941] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2/0003:046D:C52B.0003/0003:046D:4060.0004/input/input18/event5"
[     8.941] (II) XINPUT: Adding extended input device "Logitech MX Master" (type: KEYBOARD, id 15)
[     8.941] (**) Option "xkb_model" "pc105"
[     8.941] (**) Option "xkb_layout" "de"
[     8.941] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[    10.251] (II) intel(0): EDID vendor "CMN", prod id 5620
[    10.251] (II) intel(0): Printing DDC gathered Modelines:
[    10.251] (II) intel(0): Modeline "1920x1080"x0.0  285.05  1920 1968 2000 2080  1080 1086 1096 1142 -hsync -vsync (137.0 kHz eP)

I have set option nvidia-drm modeset=1 in /etc/modprobe.d/, but I will try removing that now.
I am mostly following the Arch Wiki

Okay, it’s now almost working with the original config I had, that means the issue with the pointer position being reset is fixed somehow, and the only issue is that I can’t position my second screen above my other screen, because then the top screen spreads down onto the lower screen.

I basically only changed my kernel parameters. I removed nvidia-drm.modeset=1 from the GRUB_CMDLINE_LINUX_DEFAULT variable in /etc/default/grub and added option nvidia-drm modeset 1 back to /etc/modprobe.d/nvidia-drm.conf