SDDM on multiple monitors, duplicated display, incorrect layout and incorrect focus issues

SDDM on multiple monitors, duplicated display, incorrect layout and incorrect focus issues:

Hello, I’m (somewhat) new to Linux and whatnot. I’m on KDE Plasma and after trying some tinkering, I can’t seem to make it so that the login screen appears only on my primary monitor and not both of them. Along with that, the login screen also focuses the the wrong monitor. I’m really not sure what I’m doing wrong, as both people online and the guide in the arch wiki gave examples of what to do to fix this. My file pretty much looks like this:

#!/bin/sh
# Xsetup - run as root before the login dialog appears
xrandr --output DP-2 --off

Which is what I was instructed to do in the Discord.

However, this doesn’t seem to work for some odd reason. So, along with that, I also tried doing this from here to get the correct display ports by logging in to X11:
https://www.reddit.com/r/archlinux/comments/143b6we/comment/jn8zya3/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

That also didn’t seem to work. The iterations I tried to see if anything would change at all were (might not be exactly what it said but you’ll get the gist): DP-0, DP- 1, DP-2, DisplayPort 0, DisplayPort 1, and DisplayPort 2.

Because that didn’t seem to work, I also tried what was shown in the arch wiki:
https://wiki.archlinux.org/title/SDDM#Match_Plasma_display_configuration

# cp ~/.config/kwinoutputconfig.json /var/lib/sddm/.config/
# chown sddm:sddm /var/lib/sddm/.config/kwinoutputconfig.json

These are the contents of that file, which I can’t really seem to figure out:

[
    {
        "data": [
            {
                "allowSdrSoftwareBrightness": false,
                "autoRotation": "InTabletMode",
                "brightness": 0.2,
                "colorProfileSource": "sRGB",
                "connectorName": "DP-2",
                "edidHash": "b1df15dec5ef9fd5cb93d63ea8a9c703",
                "edidIdentifier": "GSM 23423 483461 10 2023 0",
                "highDynamicRange": true,
                "iccProfilePath": "",
                "mode": {
                    "height": 1440,
                    "refreshRate": 143973,
                    "width": 2560
                },
                "overscan": 0,
                "rgbRange": "Automatic",
                "scale": 1.2,
                "sdrBrightness": 350,
                "sdrGamutWideness": 0,
                "transform": "Rotated270",
                "vrrPolicy": "Automatic",
                "wideColorGamut": true
            },
            {
                "allowSdrSoftwareBrightness": false,
                "autoRotation": "InTabletMode",
                "brightness": 0.22,
                "colorProfileSource": "sRGB",
                "connectorName": "DP-1",
                "edidHash": "747be5c623a4d26c6bac50143a02c814",
                "edidIdentifier": "GSM 23423 483457 10 2023 0",
                "highDynamicRange": true,
                "iccProfilePath": "",
                "mode": {
                    "height": 1440,
                    "refreshRate": 143973,
                    "width": 2560
                },
                "overscan": 0,
                "rgbRange": "Automatic",
                "scale": 1.2,
                "sdrBrightness": 350,
                "sdrGamutWideness": 0,
                "transform": "Normal",
                "vrrPolicy": "Automatic",
                "wideColorGamut": true
            }
        ],
        "name": "outputs"
    },
    {
        "data": [
            {
                "lidClosed": false,
                "outputs": [
                    {
                        "enabled": true,
                        "outputIndex": 0,
                        "position": {
                            "x": 2134,
                            "y": 0
                        },
                        "priority": 1
                    },
                    {
                        "enabled": true,
                        "outputIndex": 1,
                        "position": {
                            "x": 0,
                            "y": 144
                        },
                        "priority": 0
                    }
                ]
            },
            {
                "lidClosed": false,
                "outputs": [
                    {
                        "enabled": true,
                        "outputIndex": 0,
                        "position": {
                            "x": 0,
                            "y": 0
                        },
                        "priority": 0
                    }
                ]
            },
            {
                "lidClosed": false,
                "outputs": [
                    {
                        "enabled": true,
                        "outputIndex": 1,
                        "position": {
                            "x": 0,
                            "y": 0
                        },
                        "priority": 0
                    }
                ]
            }
        ],
        "name": "setups"
    }
]

As a last ditch effort, I tried the solution provided here:

Along with those fixes, I tried some other things as well, such as:

  • Applying Plasma Settings (didn’t change anything as far as I can tell)
  • Turning off one monitor and THEN trying applying plasma settings (which also didn’t)
  • Changing brightness in xrandr, but, from what I’ve seen nothing happens when I try to change anything in that file.

Overall, I’m just kind of at a loss for what I should do. If anyone could help, I’d appreciate it.

Also, here’s my inxi:

System:
  Kernel: 6.12.5-arch1-1-znver4 arch: x86_64 bits: 64 compiler: gcc v: 14.2.1 clocksource: tsc
    avail: hpet,acpi_pm parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-znver4
    root=UUID=22984bc3-83f6-4891-a0a2-238f768ee899 rw rootflags=subvol=@ quiet
    resume=UUID=499703b6-f007-4f7c-8275-23c80bee1446 loglevel=3 ibt=off
  Desktop: KDE Plasma v: 6.2.4 tk: Qt v: N/A info: frameworks v: 6.9.0 wm: kwin_wayland tools:
    avail: lxlock vt: 1 dm: SDDM Distro: Garuda base: Arch Linux
Machine:
  Type: Desktop Mobo: Micro-Star model: MPG B650 CARBON WIFI (MS-7D74) v: 1.0
    serial: <superuser required> uuid: <superuser required> UEFI: American Megatrends LLC. v: 1.E0
    date: 07/25/2024
CPU:
  Info: model: AMD Ryzen 7 7800X3D bits: 64 type: MT MCP arch: Zen 4 gen: 4 level: v4 note: check
    built: 2022+ process: TSMC n5 (5nm) family: 0x19 (25) model-id: 0x61 (97) stepping: 2
    microcode: 0xA601209
  Topology: cpus: 1x dies: 1 clusters: 1 cores: 8 threads: 16 tpc: 2 smt: enabled cache:
    L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 8 MiB desc: 8x1024 KiB L3: 96 MiB desc: 1x96 MiB
  Speed (MHz): avg: 4384 min/max: 545/5050 boost: enabled scaling: driver: amd-pstate-epp
    governor: performance cores: 1: 4384 2: 4384 3: 4384 4: 4384 5: 4384 6: 4384 7: 4384 8: 4384
    9: 4384 10: 4384 11: 4384 12: 4384 13: 4384 14: 4384 15: 4384 16: 4384 bogomips: 134448
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities: <filter>
Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX/7900 GRE/7900M]
    vendor: Sapphire NITRO+ driver: amdgpu v: kernel arch: RDNA-3 code: Navi-3x
    process: TSMC n5 (5nm) built: 2022+ pcie: gen: 4 speed: 16 GT/s lanes: 16 ports:
    active: DP-1,DP-2 empty: HDMI-A-1,HDMI-A-2,Writeback-1 bus-ID: 03:00.0 chip-ID: 1002:744c
    class-ID: 0300
  Device-2: Advanced Micro Devices [AMD/ATI] Raphael vendor: Micro-Star MSI driver: amdgpu
    v: kernel arch: RDNA-2 code: Navi-2x process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4
    speed: 16 GT/s lanes: 16 ports: active: none empty: DP-3, DP-4, DP-5, HDMI-A-3, Writeback-2
    bus-ID: 14:00.0 chip-ID: 1002:164e class-ID: 0300 temp: 38.0 C
  Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.4 compositor: kwin_wayland
    driver: X: loaded: amdgpu unloaded: modesetting,radeon alternate: fbdev,vesa dri: radeonsi
    gpu: amdgpu,amdgpu d-rect: 3333x3333 display-ID: 0
  Monitor-1: DP-1 pos: bottom-l res: 2133x1200 size: N/A modes: N/A
  Monitor-2: DP-2 pos: top-right res: 1200x2133 size: N/A modes: N/A
  API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi device: 1
    drv: radeonsi device: 2 drv: swrast gbm: drv: kms_swrast surfaceless: drv: radeonsi wayland:
    drv: radeonsi x11: drv: radeonsi
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.3.1-arch1.3 glx-v: 1.4
    direct-render: yes renderer: AMD Radeon RX 7900 XTX (radeonsi navi31 LLVM 18.1.8 DRM 3.59
    6.12.5-arch1-1-znver4) device-ID: 1002:744c memory: 23.44 GiB unified: no display-ID: :1.0
  API: Vulkan v: 1.4.303 layers: 15 device: 0 type: discrete-gpu name: AMD Radeon RX 7900 XTX
    (RADV NAVI31) driver: N/A device-ID: 1002:744c surfaces: xcb,xlib,wayland device: 1
    type: integrated-gpu name: AMD Radeon Graphics (RADV RAPHAEL_MENDOCINO) driver: N/A
    device-ID: 1002:164e surfaces: xcb,xlib,wayland device: 2 type: cpu name: llvmpipe (LLVM
    18.1.8 256 bits) driver: N/A device-ID: 10005:0000 surfaces: xcb,xlib,wayland
Audio:
  Device-1: Advanced Micro Devices [AMD/ATI] Navi 31 HDMI/DP Audio driver: snd_hda_intel v: kernel
    pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 03:00.1 chip-ID: 1002:ab30 class-ID: 0403
  Device-2: Advanced Micro Devices [AMD/ATI] Rembrandt Radeon High Definition Audio
    vendor: Micro-Star MSI driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 14:00.1 chip-ID: 1002:1640 class-ID: 0403
  Device-3: Advanced Micro Devices [AMD] Family 17h/19h/1ah HD Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pci
e: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 14:00.6
    chip-ID: 1022:15e3 class-ID: 0403
  Device-4: JMTek LLC. USB PnP Audio Device driver: hid-generic,snd-usb-audio,usbhid type: USB
    rev: 1.1 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-5.1:4 chip-ID: 0c76:161e class-ID: 0300
  Device-5: Micro Star USB Audio driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-6:3 chip-ID: 0db0:70d3 class-ID: 0300
  API: ALSA v: k6.12.5-arch1-1-znver4 status: kernel-api with: aoss type: oss-emulator tools: N/A
  Server-1: PipeWire v: 1.2.7 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8125 2.5GbE vendor: Micro-Star MSI driver: r8169 v: kernel pcie: gen: 2
    speed: 5 GT/s lanes: 1 port: c000 bus-ID: 0f:00.0 chip-ID: 10ec:8125 class-ID: 0200
  IF: enp15s0 state: down mac: <filter>
  Device-2: MEDIATEK MT7922 802.11ax PCI Express Wireless Network Adapter driver: mt7921e
    v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1 bus-ID: 10:00.0 chip-ID: 14c3:0616 class-ID: 0280
  IF: wlp16s0 state: up mac: <filter>
  Info: services: NetworkManager, smbd, systemd-timesyncd, wpa_supplicant
Bluetooth:
  Device-1: MediaTek Wireless_Device driver: btusb v: 0.8 type: USB rev: 2.1 speed: 480 Mb/s
    lanes: 1 mode: 2.0 bus-ID: 1-7:8 chip-ID: 0e8d:0616 class-ID: e001 serial: <filter>
  Report: btmgmt ID: hci0 rfk-id: 0 state: down bt-service: enabled,running rfk-block:
    hardware: no software: no address: <filter> bt-v: 5.2 lmp-v: 11 status: discoverable: no
    pairing: no
Drives:
  Local Storage: total: 2.73 TiB used: 266.15 GiB (9.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:4 vendor: Western Digital model: WD BLACK SN770 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s lanes: 4 tech: SSD
    serial: <filter> fw-rev: 731120WD temp: 36.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: Smart Modular Tech. model: SHPP41-2000GM
    size: 1.82 TiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s lanes: 4 tech: SSD
    serial: <filter> fw-rev: 51060A20 temp: 42.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 1.79 TiB size: 1.79 TiB (100.00%) used: 266.15 GiB (14.5%) fs: btrfs
    dev: /dev/nvme1n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) used: 588 KiB (0.2%) fs: vfat
    dev: /dev/nvme1n1p1 maj-min: 259:1
  ID-3: /home raw-size: 1.79 TiB size: 1.79 TiB (100.00%) used: 266.15 GiB (14.5%) fs: btrfs
    dev: /dev/nvme1n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 1.79 TiB size: 1.79 TiB (100.00%) used: 266.15 GiB (14.5%) fs: btrfs
    dev: /dev/nvme1n1p2 maj-min: 259:2
  ID-5: /var/tmp raw-size: 1.79 TiB size: 1.79 TiB (100.00%) used: 266.15 GiB (14.5%) fs: btrfs
    dev: /dev/nvme1n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: zram size: 30.45 GiB used: 0 KiB (0.0%) priority: 100 comp: zstd
    avail: lzo-rle,lzo,lz4,lz4hc,deflate,842 max-streams: 16 dev: /dev/zram0
  ID-2: swap-2 type: partition size: 33.5 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/nvme1n1p3
    maj-min: 259:3
Sensors:
  System Temperatures: cpu: 67.5 C mobo: 44.0 C
  Fan Speeds (rpm): N/A
  GPU: device: amdgpu temp: 48.0 C mem: 57.0 C fan: 0 watts: 42.00 device: amdgpu temp: 38.0 C
Info:
  Memory: total: 32 GiB note: est. available: 30.45 GiB used: 5 GiB (16.4%)
  Processes: 457 Power: uptime: 9m states: freeze,mem,disk suspend: deep avail: s2idle wakeups: 0
    hibernate: platform avail: shutdown, reboot, suspend, test_resume image: 12.13 GiB
    services: org_kde_powerdevil, power-profiles-daemon, upowerd Init: systemd v: 257
    default: graphical tool: systemctl
  Packages: 1955 pm: pacman pkgs: 1946 libs: 573 tools: octopi,pamac,paru pm: flatpak pkgs: 9
    Compilers: gcc: 14.2.1 Client: shell wrapper v: 5.2.37-release inxi: 3.3.36
G
aruda (2.6.26-1):
  System install date:     2024-12-16
  Last full system update: 2024-12-19
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut nvidia-dkms
  Windows dual boot:       Probably (Run as root to verify)
  Failed units:            

Hi there, welcome to the forum and congratulation on your very-well made first post!
I think (I don’t use an external monitor) it is this old (but look also the many “see also” entries…) KDE bug report:
https://bugs.kde.org/show_bug.cgi?id=409226
Maybe check also this thread and relevant SDDM issue. The suggested script might work under X11.

2 Likes

Maybe I’m misunderstanding everything, but my session is Wayland. Just from the numerous tutorials and solutions I looked at, I was given the impression that SDDM itself is X11. Either way, I read along that and tried some of the solutions but it seems both the people in there and myself weren’t able to get it to work? It looks like?

I tried the solution here as well, but that didn’t seem to change anything:

I spent a few hours surfing the forums and wiki too, to no avail.

If X11 is seemingly borked for multi-monitor setups for SDDM at the moment, would it be possible to run it on Wayland instead? I mean, that’s pretty much what I use exclusively anyway. And if not, is there maybe an SDDM alternative?

From login screen change to X11 (bottom left) and check if problem can be fixed with the links from filo.

That’s what I did, to get the proper monitor names I switched to X11, but even using those names it didn’t want to cooperate. As per the other linked forum post, near the end you can see that they didn’t seem to make any progress either. The KDE bug report links to a solution I’ve already attempted as well.

So I figured it out finally–for some reason, /etc/sddm.conf was completely empty. Even with applying plasma settings and whatnot, it just wasn’t getting written over. What I had to do instead was generate an example config using sddm --example-config, paste that into the previously mentioned conf file, then go to /etc/sddm.conf.d/kde_settings.conf and copy its settings manually into the /etc/sddm.conf. So it turns out that my initial script actually does work, it’s just that since the conf was blank for seemingly no reason, there was no “DisplayCommand” to be had, making SDDM ignore it and every other thing I tried to set up.

For anyone who wants what I wanted–SDDM to only appear on 1 monitor, here you go. It’s my current config:

/etc/sddm.conf

[Autologin]
Relogin=false
Session=
User=

[General]
DisplayServer=x11
GreeterEnvironment=
HaltCommand=/usr/bin/systemctl poweroff
InputMethod=qtvirtualkeyboard
Namespaces=
Numlock=on
RebootCommand=/usr/bin/systemctl reboot

[Theme]
Current=Sweet
DisableAvatarsThreshold=7
EnableAvatars=true
FacesDir=/usr/share/sddm/faces
ThemeDir=/usr/share/sddm/themes
CursorTheme=default
Font=Fira Sans,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1

[Users]
DefaultPath=/usr/local/bin:/usr/bin:/bin
HideShells=
HideUsers=
MaximumUid=60000
MinimumUid=1000
RememberLastSession=true
RememberLastUser=true
ReuseSession=true

[Wayland]
CompositorCommand=weston --shell=kiosk
EnableHiDPI=true
SessionCommand=/usr/share/sddm/scripts/wayland-session
SessionDir=/usr/local/share/wayland-sessions,/usr/share/wayland-sessions
SessionLogFile=.local/share/sddm/wayland-session.log

[X11]
DisplayCommand=/usr/share/sddm/scripts/Xsetup
DisplayStopCommand=/usr/share/sddm/scripts/Xstop
EnableHiDPI=true
ServerArguments=-dpi 120
ServerPath=/usr/bin/X
SessionCommand=/usr/share/sddm/scripts/Xsession
SessionDir=/usr/local/share/xsessions,/usr/share/xsessions
SessionLogFile=.local/share/sddm/xorg-session.log
XephyrPath=/usr/bin/Xephyr

To configure SDDM to your liking, go to this link:
https://wiki.archlinux.org/title/SDDM

And here’s the other:
/usr/share/sddm/scripts/Xsetup

xrandr --output DisplayPort-0 --primary
xrandr --output DisplayPort-1 --off

To find your monitor name, log into an Xorg session and do the following command: xrandr | grep " connected " | awk '{ print$1 }'

If this isn’t to your liking, you can find how to configure your displays here:
https://wiki.archlinux.org/title/Xrandr

2 Likes

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