Bug 431856 - kscreen frequently mess resolution on a dual monitor setup
Summary: kscreen frequently mess resolution on a dual monitor setup
Status: RESOLVED WORKSFORME
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.19.5
Platform: Kubuntu Linux
: NOR major
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-20 17:39 UTC by luis.henriques
Modified: 2022-11-10 20:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description luis.henriques 2021-01-20 17:39:03 UTC
SUMMARY

The bug is very frequent but is difficult to reproduce at will. I have a dual monitor setup. The left monitor is a Dell E198WFP and the left one is a BenQ XL2420T. The BenQ is connect using a display port and Dell using DVI

When the BenQ returns from sleep or on system boot, kscreen changes the resolution to 720p on the Benq (right monitor). When this happens this is the maximum resolution available on the System Settings->Display Configuration. 

The refresh rate of the right monitor is also frequently detected incorrectly and downgraded to 60hz even if the resolution does not change. The correct maximum refresh rate of this monitor is 120Hz, but is very common to list only 100Hz.

To fix this, I change the positions of the monitors and/or switch off/on the right monitor until 1920x1080 is available to select. When this happens maximum refresh rate available is only 60Hz, but it better than nothing.

This bug doesn't happen on Gnome or XFCE.

STEPS TO REPRODUCE
It happens on boot or after the monitor returns from sleep.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu Studio 20.10
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION

kscreen-console bug output:
https://pastebin.com/xbLnt0yV

xrand output from the BenQ monitor (only the 1920x1080 lines):

Screen 0: minimum 320 x 200, current 3360 x 1080, maximum 16384 x 16384
DisplayPort-2 connected primary 1920x1080+1440+0 (0x734) normal (normal left inverted right   1920x1080 (0x733) 148.500MHz +HSync +VSync +preferred
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.50KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  60.00Hz
1920x1080 (0x734) 235.500MHz -HSync -VSync *current
        h: width  1920 start 1968 end 2000 total 2080 skew    0 clock 113.22KHz
        v: height 1080 start 1083 end 1088 total 1133           clock  99.93Hz
1920x1080 (0x735) 148.500MHz +HSync +VSync
        h: width  1920 start 2448 end 2492 total 2640 skew    0 clock  56.25KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  50.00Hz
1920x1080 (0x736) 148.352MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.43KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  59.94Hz
Comment 1 luis.henriques 2021-01-25 16:41:13 UTC
For everyone who is suffering from the same fate, I was able to circumvent the bug by disabling kscreen2 on System Settings->Startup and Shutdown->Background Services and putting a script in startup using xrandr to manually setting the correct monitor config.
For example this is my setup:

xrandr --output DVI-D-0 --mode 1440x900 --rate 75
xrandr --output DisplayPort-2 --mode 1920x1080 --rate 120 --right-of DVI-D-0

I hope this is useful until this bug is fixed.
Comment 2 Nate Graham 2022-11-08 21:51:04 UTC
Thank you for the bug report. Unfortunately we were not able to get to it yet. Can we ask you to please check if this is still an issue with Plasma 5.25 or 5.26?

If it is, please change the status to CONFIRMED when replying. If not, or if you can't because you no longer use this setup, you can change the status to RESOLVED WORKSFORME. Thanks a lot!
Comment 3 luis.henriques 2022-11-10 20:31:49 UTC
Works well now.