https://bugs.kde.org/show_bug.cgi?id=525188

            Bug ID: 525188
           Summary: Switching screens with hub detected as same device by
                    KScreen-doctor
    Classification: Plasma
           Product: KScreen
      Version First 6.7.4
       Reported In:
          Platform: CachyOS
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: kscreen-doctor
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

DESCRIPTION
I have a setup that consists on:
- A HDMI screen and a HDMI TV both connected to a hub and then to my computer.
On pressing the hub button I change what device is actually connected to the
computer, while "unplugging" the other one.
- A DVI secondary screen.

Everyday I use my HDMI screen as my primary device (labeled as HDMI-A-2 by
kscreen-doctor) and my DVI screen as my secondary device (labeled as DVI-D-1).
When I click on the hub button my primary screen is disconnected and my TV
connected, but this "instantaneity" seems to be confusing kscreen-doctor.
Kscreen-doctor labels the TV as HDMI-A-2 as well so it tries to use the same
configuration than for my other screen. If I change the configuration for this
device the same issue happens again when I click on the hub to switch back to
my main screen.

STEPS TO REPRODUCE
1. Connect two screen devices through a hub to your computer.
2. Turn on your computer with KDE and change the available screen with your
hub.

OBSERVED RESULT
KScreen-doctor believes it's the same device and it keeps the same
configuration (if you change the configuration it is shared among the two
devices).

EXPECTED RESULT
KScreen-doctor detects the previous screen was disconnected and another screen
was connected, so it loads the presaved configuration for that device
automatically.

SOFTWARE/OS VERSIONS
Operating System: CachyOS Linux
KDE Plasma Version: 6.7.4
KDE Frameworks Version: 6.29.0
Qt Version: 6.11.2

ADDITIONAL INFORMATION
This issue has always happened to me since I installed Linux back a year ago, I
don't think it's a new version issue.
I have a workaround that consists on a script that runs with a keyboard
shortcut and I run it every time I click on the hub button, some seconds after.
I'll copy it here in case it has some useful information.

#!/bin/bash
OUTPUT="HDMI-A-2" # Primary screen OR TV
FIXED="DVI-D-1" # Secondary screen

MAX_WIDTH=$(kscreen-doctor -j | jq -r '
.outputs[]
| select(.name=="'$OUTPUT'")
| .modes[].size.width' | sort -n | tail -1)

if [ "$MAX_WIDTH" -ge 3000 ]; then # I check the max resolution available to
know if it's the TV or the screen
    # TV 4K
    kscreen-doctor output.$OUTPUT.disable
    #kscreen-doctor output.$OUTPUT.disable
    kscreen-doctor output.$OUTPUT.enable output.$OUTPUT.mode.3840x2160@60
output.$OUTPUT.scale.2.5 output.$OUTPUT.position.0,0 output.$OUTPUT.hdr.enable
\
    output.$FIXED.enable output.$FIXED.position.1536,0
    kscreen-doctor output.$OUTPUT.enable output.$OUTPUT.primary
else
    # Screen 1080p
    kscreen-doctor \
    output.$FIXED.enable output.$FIXED.position.1920,0 \
    output.$OUTPUT.enable output.$OUTPUT.mode.1920x1080@75
output.$OUTPUT.scale.1 output.$OUTPUT.position.0,0 output.$OUTPUT.hdr.disable
output.$OUTPUT.primary
fi

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to