LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 05-18-2023, 06:24 PM   #1
wirelessmc
Member
 
Registered: Aug 2008
Location: San Diego County
Distribution: Slackware
Posts: 183

Rep: Reputation: 37
Secondary desktop not refreshing after port switching in Plasma5 X11


Code:
...but refreshes no issue when X-Server is running in full Wayland mode (and Windows).
To get the secondary monitor/desktop to refresh after switching my 4x1 HDMI KVM port switch back to the target machine (running Slackware64-current) in X11 I have to bring up the Display settings and temporarily switching Primary <--> Secondary.

X-Wayland has come a long way but it still is not quite ready for prime time and/or production. I would really like to get the secondary desktop/monitor to refresh itself in X11.

The system is an IBM ThinkPad with docking station. I believe both monitors are driven by the same GPU - i.e. the internal display graphics chip (Intel UHD Graphics 620 Mobile - Whiskey Lake GT2).

I am thinking I can at least find a script to refresh the secondary monitor in X11?
 
Old 05-18-2023, 09:19 PM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,813
Blog Entries: 1

Rep: Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068
Have you thought to try simply xrandr? If that doesn't wake it, try making it more explicit: xrandr --output DP-1 --mode 1920x1080, using whatever its native mode and output name are, or an alternate mode, such as 1600x900, then switch right back to 1920x1080.
 
Old 05-19-2023, 06:53 PM   #3
wirelessmc
Member
 
Registered: Aug 2008
Location: San Diego County
Distribution: Slackware
Posts: 183

Original Poster
Rep: Reputation: 37
Hi mrmazda, Thank you for the suggestion of trying xrandr.

Just running xrandr in a shell without any arguments only prints the screen #'s and available resolutions.

However switching the secondary desktop to different resolutions with below commands refreshes/restores the secondary desktop. I created the below script "switch_display_modes.sh" and then call it from a desktop launcher $HOME/Desktop/Refresh2ndDisplay.desktop and that works. It's slow but less painful than calling up the "Configure Display Settings" each time. Obviously it would be highly desirable to figure out a way of doing this automagically as in Wayland.

The following behavior should be noted here. Windows on the secondary desktop are still accessible and maneuverable before refreshing. What I lose access to (before forcing refresh) is the wallpaper and the Desktop menu which you access from the mouse right-click.

Code:
#!/bin/bash

xrandr --output DP-2-2 --mode 1600x900
xrandr --output DP-2-2 --mode 1920x1080

exit
 
Old 05-19-2023, 07:01 PM   #4
wirelessmc
Member
 
Registered: Aug 2008
Location: San Diego County
Distribution: Slackware
Posts: 183

Original Poster
Rep: Reputation: 37
BTW just commenting out the line which sets the lower resolution [1600x900] doesn't work. You actually have to switch it!
 
Old 05-19-2023, 07:29 PM   #5
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,813
Blog Entries: 1

Rep: Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068
I wonder if xrandr > /dev/null or xrandr --auto would also work. Placed in a start up script they have been known to have a positive effect in some flaky environments.
 
Old 05-19-2023, 07:32 PM   #6
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,813
Blog Entries: 1

Rep: Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068
Quote:
Originally Posted by wirelessmc View Post
BTW just commenting out the line which sets the lower resolution [1600x900] doesn't work. You actually have to switch it!
Maybe try xrandr --output DP-2-2 --mode 1920x1080 --rate 60.0 or some other listed rate than the +* one.
 
Old 05-22-2023, 03:03 PM   #7
wirelessmc
Member
 
Registered: Aug 2008
Location: San Diego County
Distribution: Slackware
Posts: 183

Original Poster
Rep: Reputation: 37
Thanks again for the additional suggestions mrmazda. At this point I am thinking that this a bug in KDE/Plasma5/X11. The reason for this assertion is I can run the XFce desktop (in X11) and get the desired behavior - i.e. automatically refresh the secondary desktop after switching it out and back in again. There is an Advanced Tab on the XFce Display setting menu that allows you to save a profile and I believe this facilitated the refresh-after-switch.

Also as previously noted KDE/Plasma5/Full-Wayland has the desired refresh after switching. So clearly the only thing that is "flaky" here is KDE/Plasma5/X11. The hardware is fine. I will submit a bug to bugs.kde.org

I tried the xrandr --auto option and this enables all displays which is undesired. I do not wish to enable the built-in laptop display as it stays closed on my dock. So I tried the following login script in KDE/Plasma5/X11

Code:
#!/bin/bash

xrandr --output DP-1 --off
xrandr --output DP-2-1 --mode 1920x1080
xrandr --output DP-2-2 --mode 1920x1080
xrandr --output DP-2-3 --off
xrandr --preferred
This did not work either in KDE/X11.

It should probably be noted here that the docking station has 1 HDMI port and 1 DVI port. So the primary monitor is fed by the HDMI port and the secondary monitor is fed by the DVI using a DVI-HDMI adapter since it has only HDMI inputs. It is this cable that feeds the switch/port replicator. Now admittedly I do occasionally have keyboard issues when switching the port replicator switch. Sometimes I have to re-seat the USB cable to reactivate the keyboard. So actually this hardware is a bit flaky but 99.9% sure it is unrelated to the issue KDE/X11 given the other systems are OK.

Below is an excerpt of my system with xrandr in the command line:

Quote:
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384
eDP-1 connected (normal left inverted right x axis y axis)
1920x1080 60.00 + 59.97 59.96 59.93 48.00
...
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)
DP-2-1 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 698mm x 393mm
1920x1080 60.00*+ 74.97 50.00 59.94
...
DP-2-2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 698mm x 392mm
...
DP-2-3 disconnected (normal left inverted right x axis y axis)
 
Old 05-23-2023, 01:16 AM   #8
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,813
Blog Entries: 1

Rep: Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068
I have Intel desktop PCs older and newer than your laptop, but only the older has current/recent kernel with Xorg and Plasma, in the following form:
Code:
# xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x48; cap: 0xf (Source Output, Sink Output, Source Offload, Sink Offload); crtcs: 3; outputs: 7; associated providers: 0; name: modesetting
    output HDMI-1
    output HDMI-2
    output DP-1
    output HDMI-3
    output DP-2
    output DP-1-1
    output DP-1-2
# xrandr --listmonitors
Monitors: 3
 0: +*HDMI-1 1920/519x1200/324+0+0  HDMI-1
 1: +DP-1-1 1680/473x1050/296+1920+0  DP-1-1
 2: +DP-1-2 1680/474x1050/296+3600+0  DP-1-2
# xrandr | egrep 'onnect|creen|\*' | grep -v disconn | sort -r
Screen 0: minimum 320 x 200, current 5280 x 1200, maximum 16384 x 16384
HDMI-1 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
DP-1-2 connected 1680x1050+3600+0 (normal left inverted right x axis y axis) 474mm x 296mm
DP-1-1 connected 1680x1050+1920+0 (normal left inverted right x axis y axis) 473mm x 296mm
   1920x1200     59.95*+
   1680x1050     59.97*+  74.89
   1680x1050     59.95*
# inxi -GSaz --vs --zl --hostname
inxi 3.3.27-00 (2023-05-07)
System:
  Host: gb250 Kernel: 6.2.12-1-default arch: x86_64 bits: 64 compiler: gcc
    v: 13.0.1 parameters: BOOT_IMAGE=/boot/vmlinuz root=LABEL=<filter>
    rd.hostonly=0 noresume ipv6.disable=1 net.ifnames=0 mitigations=none
    preempt=full consoleblank=0 video=1440x900@60
  Desktop: KDE Plasma v: 5.27.5 tk: Qt v: 5.15.9 wm: kwin_x11 vt: 7 dm:
    1: TDM 2: XDM Distro: openSUSE Tumbleweed 20230522
Graphics:
  Device-1: Intel HD Graphics 630 vendor: Gigabyte driver: i915 v: kernel
    arch: Gen-9.5 process: Intel 14nm built: 2016-20 ports:		# 2017 actually, Kaby Lake
    active: DP-3,DP-4,HDMI-A-1 empty: DP-1, DP-2, HDMI-A-2, HDMI-A-3
    bus-ID: 00:02.0 chip-ID: 8086:5912 class-ID: 0300
  Display: x11 server: X.Org v: 21.1.8 compositor: kwin_x11 driver: X:
    loaded: modesetting unloaded: fbdev,vesa alternate: intel dri: iris
    gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 5280x1200 s-dpi: 120 s-size: 1117x254mm (43.98x10.00")
    s-diag: 1146mm (45.1")
  Monitor-1: not-matched mapped: DP-1-1 pos: center res: 1680x1050 hz: 60
    dpi: 90 size: 473x296mm (18.62x11.65") diag: 558mm (21.97") modes: N/A
  Monitor-2: not-matched mapped: DP-1-2 pos: right res: 1680x1050 hz: 60
    dpi: 90 size: 474x296mm (18.66x11.65") diag: 559mm (22") modes: N/A
  Monitor-3: HDMI-A-1 mapped: HDMI-1 pos: primary,left model: NEC EA243WM
    serial: <filter> built: 2011 res: 1920x1200 hz: 60 dpi: 94 gamma: 1.2
    size: 519x324mm (20.43x12.76") diag: 612mm (24.1") ratio: 16:10 modes:
    max: 1920x1200 min: 640x480
  API: OpenGL v: 4.6 Mesa 23.0.3 renderer: Mesa Intel HD Graphics 630 (KBL
    GT2) direct-render: Yes
All commands above were run with a powered-off (unplugged) 1920x1200 display connected via HDMI, and a pair of 1680x1050 displays connected to a single purpose Multi-Stream Transport (MST) DisplayPort splitter (the same hardware incorporated into docks that report their multiple ports as DisplayPorts). What you see above I consider Xorg lying, as without power, the HDMI-connected display is useless. It's the same in both Plasma and TDE desktops. The port names are appropriately assigned for the cable type connected to each display. This makes me wonder what other "lies" flow between components under Xorg control.

What I was hoping was to find a way to replicate your observations, but no such luck. The only way for the HDMI-connected display to be prevented from being taking into account by Xorg is by having no HDMI/DVI/VGA cable connected between display and output connector. It begs the question how your laptop display is made to be disregarded, whether it is hardware switching in the laptop, or software, or some combination of hardware and software.
 
Old 05-23-2023, 06:04 PM   #9
wirelessmc
Member
 
Registered: Aug 2008
Location: San Diego County
Distribution: Slackware
Posts: 183

Original Poster
Rep: Reputation: 37
I have submitted the bug to bugs.kde.org here:

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] mesa-19.3.4-x86_64-1 - crash of the X11 server on a box with AM3 Athlon x4 605e running -current and latest Plasma5 LuckyCyborg Slackware 19 02-16-2020 04:48 AM
The October Plasma5 prefers {systemd-,e}logind against ConsoleKit2, so SBo's skypeforlinux will broke the shutdown/reboot feature of Plasma5 LuckyCyborg Slackware 19 10-21-2019 09:49 AM
[SOLVED] /usr/bin/X11/X11/....... 10 X11 subsets & counting walter74 Linux - General 2 06-07-2015 12:36 AM
Secondary Monitor Experiencing Refreshing Problems christarzan Debian 2 08-24-2014 02:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

All times are GMT -5. The time now is 12:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration