Wrong monitor when wake up from standby

Hello,
I’m on Fedora 42 KDE using X11 session.
I have some problems with external monitors, I’m really new to Linux, I solved almost all of the issue with some Google and some ChatGTP but I cannot solve those… :sweat_smile:

  1. When I wake up my pc after sleep almost everytime the panels are moved to the monitor of the notebook and the primary monitor is totally black. I can move windows on the screen but, for example, I cannot right click on desktop.
    This is my setup.

    I have to reboot the pc almost everytime.
  2. Sometime, when I reboot the 3rd monitor starts with a low resolution and I cannot set the 2560x1440 resolution, also in this case I have to reboot (this is not a big problem to me cause I have just turned on the pc, the first issue is more annoying because I have a lot of opened programs…)

Primary monitor is connected to the notebook’s hdmi port, the 3rd one is connected to an USB-C adapter…

Are there “easy” things I can do to find a solution?

Ok, I found a solution, more a workaround than a solution.

Obviously with “I” I mean ChatGTP

When this problem happens I run this script:

#!/bin/bash

# Ensure we talk to the right X11 session (needed when launched by systemd --user)
export DISPLAY=:0
export XAUTHORITY=/home/asdy/.Xauthority

# Wait until plasmashell exposes its D-Bus name (up to 10 seconds)
# This prevents running too early during login.
for i in {1..10}; do
  if qdbus org.kde.plasmashell >/dev/null 2>&1; then
    break
  fi
  sleep 1
done

# Apply a generic display re-probe (often re-enables preferred modes)
xrandr --auto

# Cleanly stop plasmashell, give it a brief moment to exit, then start it again
kquitapp6 plasmashell
sleep 1
kstart5 plasmashell

And to run the script after every login post sleep I created the service fix-plasma.sh that run the script.

[Unit]
Description=Fix Plasma after resume
After=plasma-plasmashell.service
PartOf=plasma-plasmashell.service

[Service]
Type=oneshot
ExecStart=/home/asdy/bin/fix-plasma.sh

[Install]
WantedBy=plasma-plasmashell.service

At the moment it seems to work, I also add a shortcut in the settings to run the script if the service does not work so I type CTRL+META+ALT+5 and the system launch the script.

I hope this can be useful to someone and if some other have suggestions about a better script they are welcome… :slight_smile:

I saw this post only because it was on the front page thanks to your last comment 12 minutes ago.

Long story short:
For what I understand, X11 doesn’t have “multiple monitors support”, it’s just an hack (27:14).


Still, please avoid using LLM-G_AI at all. They ALL just steal the text from the first 12 google results and then hallucinate 3/5 of what they say.
THIS ALSO MEANS THAT IF “MR NOBODY SAYS SOMETHING WRONG” THE LLM-G_AI WILL COPY THAT GUY’S SENTENCE AND EXPRESS IT AS OBJECTIVE FACT.

I’m aware of hallucinations, but I really was not able to find a solution not in Google or in this forum.
I tried searching in many ways but first of all I have not a good English do maybe I search with the wrong terms and then I don’t have the knowledge to understand which article could be the solution. Many articles or videos are for people who understand what they are reading or have a basic Linux technical knowledge, I do not have this.

Asking ChatGPT allowed me to get an explanation of what could be the issue caused from and I got a script to test…

It’s absolutely normal to not know how all of this works under the hood.

You just have to know this:
X11 is already deprecated on Fedora, and sooner or later, in one of the next releases, it will completely lose support (you will have to use Wayland, watch the whole video I linked before).

There will always be smaller Distros for older machines running X11, but you won’t be able to run the newer stuff.

Regardless of that, please run inxi -Fzxx and post the results here with this.

Do
it
like
this.

That way I can tell you if your PC is capable of supporting Wayland (GPU stuff) and if you need to get an update (you need to only if you work with special programs, or if you want to game).

Also, if your problem is solved, please select a message as “Solution”.

I would use Wayland, but I can’t because unfortunately RustDesk does not support Wayland if you want to enable unattended access… this is the only reason I do not use Wayland… :expressionless:

This is the result:

System:
  Kernel: 6.15.10-200.fc42.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 15.2.1
  Desktop: KDE Plasma v: 6.4.4 tk: Qt v: N/A wm: kwin_x11 dm: SDDM
    Distro: Fedora Linux 42 (KDE Plasma Desktop Edition)
Machine:
  Type: Laptop System: Dell product: Vostro 5620 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Dell model: 0HRNCW v: A00 serial: <superuser required> part-nu: 0B3E
    UEFI: Dell v: 1.28.0 date: 03/26/2025
Battery:
  ID-1: BAT0 charge: 46.0 Wh (100.0%) condition: 46.0/54.0 Wh (85.2%)
    volts: 16.3 min: 15.0 model: SMP DELL XDY9K25 serial: <filter> status: full
  Device-1: hidpp_battery_0 model: Logitech Wireless Keyboard serial: N/A
    charge: 55% (should be ignored) status: discharging
CPU:
  Info: 12-core (4-mt/8-st) model: 12th Gen Intel Core i7-1260P bits: 64
    type: MST AMCP arch: Alder Lake rev: 3 cache: L1: 1.1 MiB L2: 9 MiB
    L3: 18 MiB
  Speed (MHz): avg: 557 min/max: 400/4700:3400 cores: 1: 557 2: 557 3: 557
    4: 557 5: 557 6: 557 7: 557 8: 557 9: 557 10: 557 11: 557 12: 557 13: 557
    14: 557 15: 557 16: 557 bogomips: 79872
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel Alder Lake-P GT2 [Iris Xe Graphics] vendor: Dell
    driver: i915 v: kernel arch: Xe ports: active: DP-1,HDMI-A-1,eDP-1
    empty: DP-2 bus-ID: 00:02.0 chip-ID: 8086:46a6
  Device-2: Microsoft LifeCam Cinema driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 3-2.2.2.4:12
    chip-ID: 045e:075d
  Device-3: Microdia Integrated_Webcam_FHD driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 3-6:6 chip-ID: 0c45:6a1b
  Display: x11 server: X.Org v: 21.1.18 with: Xwayland v: 24.1.8
    compositor: kwin_x11 driver: X: loaded: modesetting alternate: fbdev,vesa
    dri: iris gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 7040x1440 s-dpi: 96
  Monitor-1: DP-1 pos: top-left model: Lenovo LEN D32q-20B res: N/A dpi: 93
    diag: 801mm (31.5")
  Monitor-2: HDMI-A-1 mapped: HDMI-1 pos: primary,top-center
    model: Lenovo LEN D32q-20B res: N/A dpi: 93 diag: 801mm (31.5")
  Monitor-3: eDP-1 pos: bottom-r model: LG Display 0x0701 res: 1920x1200
    hz: 60 dpi: 141 diag: 407mm (16")
  API: EGL v: 1.5 platforms: device: 0 drv: iris device: 1 drv: swrast gbm:
    drv: iris surfaceless: drv: iris x11: drv: iris inactive: wayland
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 25.1.7 glx-v: 1.4
    direct-render: yes renderer: Mesa Intel Iris Xe Graphics (ADL GT2)
    device-ID: 8086:46a6
  API: Vulkan v: 1.4.313 surfaces: N/A device: 0 type: integrated-gpu
    driver: mesa intel device-ID: 8086:46a6 device: 1 type: cpu
    driver: mesa llvmpipe device-ID: 10005:0000
  Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
    de: kscreen-console,kscreen-doctor wl: wayland-info x11: xdriinfo,
    xdpyinfo, xprop, xrandr
Audio:
  Device-1: Intel Alder Lake PCH-P High Definition Audio vendor: Dell
    driver: sof-audio-pci-intel-tgl bus-ID: 00:1f.3 chip-ID: 8086:51c8
  Device-2: Microsoft LifeCam Cinema driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 3-2.2.2.4:12
    chip-ID: 045e:075d
  API: ALSA v: k6.15.10-200.fc42.x86_64 status: kernel-api
  Server-1: PipeWire v: 1.4.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Intel Alder Lake-P PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:51f0
  IF: wlp0s20f3 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Dell driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1
    port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:8168
  IF: enp2s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: docker0 state: down mac: <filter>
  IF-ID-2: vmnet1 state: unknown speed: N/A duplex: N/A mac: <filter>
  IF-ID-3: vmnet8 state: unknown speed: N/A duplex: N/A mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 bus-ID: 3-10:7 chip-ID: 8087:0026
  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.2
    lmp-v: 11
Drives:
  Local Storage: total: 2.71 TiB used: 776.9 GiB (27.9%)
  ID-1: /dev/nvme0n1 vendor: Crucial model: CT1000P3PSSD8 size: 931.51 GiB
    speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 26.9 C
  ID-2: /dev/sda vendor: Crucial model: CT960BX500SSD1 size: 894.25 GiB
    type: USB rev: 3.1 spd: 5 Gb/s lanes: 1 serial: <filter>
  ID-3: /dev/sdb vendor: Verbatim model: Vi550 S3 size: 953.87 GiB type: USB
    rev: 3.1 spd: 5 Gb/s lanes: 1 serial: <filter>
Partition:
  ID-1: / size: 929.93 GiB used: 205.49 GiB (22.1%) fs: btrfs
    dev: /dev/nvme0n1p3
  ID-2: /boot size: 973.4 MiB used: 490 MiB (50.3%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 598.8 MiB used: 19.3 MiB (3.2%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 929.93 GiB used: 205.49 GiB (22.1%) fs: btrfs
    dev: /dev/nvme0n1p3
Swap:
  ID-1: swap-1 type: zram size: 15.3 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 43.0 C mobo: 43.0 C sodimm: 40.0 C
  Fan Speeds (rpm): cpu: 2691
Info:
  Memory: total: 16 GiB note: est. available: 15.3 GiB used: 6.38 GiB (41.7%)
  Processes: 460 Power: uptime: 13m wakeups: 0 Init: systemd v: 257
    target: graphical (5) default: graphical
  Packages: pm: rpm pkgs: N/A note: see --rpm pm: flatpak pkgs: 27
    Compilers: gcc: 15.2.1 Shell: Bash v: 5.2.37 running-in: konsole
    inxi: 3.3.38

Sorry to say, but sooner or later you will have to use Wayland if you want to keep using any modern Linux Distro. Even Mint is doing the switch.

IF your software doesn’t need updates then you can have either a separate computer or a separate install of Fedora, kept on V42 with Xorg, and use that, while using a newer Fedora with Wayland for other stuff (as main OS).

1 Like