Bug 453392 - KScreen doesn't show the correct matrix of resolution vs frequency
Summary: KScreen doesn't show the correct matrix of resolution vs frequency
Status: RESOLVED FIXED
Alias: None
Product: KScreen
Classification: Unclassified
Component: common (show other bugs)
Version: 5.24.5
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-04 15:50 UTC by samer
Modified: 2022-05-06 21:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24.6


Attachments
Zip file containing two screenshots showing wrong/impossible refresh rates + resolution combination (305.45 KB, application/zip)
2022-05-04 15:50 UTC, samer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description samer 2022-05-04 15:50:13 UTC
Created attachment 148559 [details]
Zip file containing two screenshots showing wrong/impossible refresh rates + resolution combination

SUMMARY

xrandr reports wrong modes for 4K my laptop screen. The following is the result:

```
eDP-1 connected (normal left inverted right x axis y axis)
   15360x8640    15.83    28.85  
   7680x4320     15.83    59.99    59.99    59.99  
   5120x2880     59.99    59.99  
   4096x2304     59.99    59.98  
   3840x2160     60.00    60.01    59.98    59.97  
   3200x1800     59.96    59.94  
   2880x1620     59.96    59.97  
   2560x1600     59.99    59.97  
   2560x1440     59.99    59.99    59.96    59.95  
   2048x1536     60.00  
   1920x1440     60.00  
   1856x1392     60.01  
   1792x1344     60.01  
   2048x1152     59.99    59.98    59.90    59.91  
   1920x1200     59.88    59.95  
   1920x1080     60.01    59.97    59.96    59.93  
   1600x1200     60.00  
   1680x1050     59.95    59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      60.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   800x512       60.17  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   720x450       59.89  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   680x384       59.80    59.96  
   640x400       59.88    59.98  
   576x432       60.06  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
```

The resolutions related to 16K and 8K are not feasible. But they, nevertheless, get displayed for some reason. KScreen doesn't seem to be aware of the matrix of possible resolutions vs frequencies. For the highest resolution, 15360x8640, has possible frequencies are 29 Hz and 16 Hz. And these are the only possible options shown, no matter what resolution I choose. See the screenshot attached.

This practically just means that the laptop screen never works unless I restart, and at times delete everything all kscreen data (the json files) so that everything can be refreshed. Meaning, once I disconnected my docking station, I just have to restart the computer. Otherwise the laptop screen doesn't work.

I tried modifying the json files of kscreen, but it doesn't help. Frankly I don't understand when they're loaded.
 
STEPS TO REPRODUCE
1. Have bad resolutions in your screen
2. Disconnect that screen (close the lid of the laptop of that screen)
3. Restart
4. Try to get that screen working again

OBSERVED RESULT
See attached file. There's no way to get a viable resolution + refresh rate after getting wrong frequencies because if the wrong 16K value.

EXPECTED RESULT
All possible frequencies should be shown, not just the ones from the first entry of xrandr, and an error should be presented if the selected frequency doesn't match the resolution. OR, when changing the content of the selected item in the Resolution drop down menu, the Refresh rate should change to the viable options for this mode.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 22.04 LTS
(available in About System)
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Comment 1 Zamundaaa 2022-05-05 16:25:57 UTC
https://invent.kde.org/plasma/kscreen/-/merge_requests/96 fixes the refresh rate list not updating.
For the wrong resolutions, please report the bug to the ones maintaining the driver you're using. If xrandr reports them, KScreen isn't doing anything wrong to report and (try to) use them
Comment 2 Zamundaaa 2022-05-06 07:43:34 UTC
Git commit 8c1e2cffda762fef83ea48658a08847382c71486 by Xaver Hugl.
Committed on 05/05/2022 at 16:23.
Pushed by zamundaaa into branch 'master'.

kcm: fix refresh rate list not being updated

M  +1    -1    kcm/output_model.cpp

https://invent.kde.org/plasma/kscreen/commit/8c1e2cffda762fef83ea48658a08847382c71486
Comment 3 Zamundaaa 2022-05-06 07:44:00 UTC
Git commit 584ed8a067a7c0329e1572dd9970b6e3dae6a56f by Xaver Hugl.
Committed on 06/05/2022 at 07:43.
Pushed by zamundaaa into branch 'Plasma/5.24'.

kcm: fix refresh rate list not being updated


(cherry picked from commit 8c1e2cffda762fef83ea48658a08847382c71486)

M  +1    -1    kcm/output_model.cpp

https://invent.kde.org/plasma/kscreen/commit/584ed8a067a7c0329e1572dd9970b6e3dae6a56f