Bug 517654 - allow adding non-CVT custom modes
Summary: allow adding non-CVT custom modes
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: platform-drm (other bugs)
Version First Reported In: 6.6.2
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 517655 517657 (view as bug list)
Depends on:
Blocks:
 
Reported: 2026-03-16 15:25 UTC by Antonio Orefice
Modified: 2026-09-05 16:58 UTC (History)
17 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.8.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Orefice 2026-03-16 15:25:35 UTC
As requested in 456697, I'm opening this new issue to ask for (more) support for custom modelines.

Right now I can see just this option:

Add a custom mode: (arguments: width,height,refresh rate in mHz,blanking 'reduced' or 'full')
   $ kscreen-doctor output.1.addCustomMode.1920.1080.75000.full

...but what if I want to drive a 15Khz monitor? it seems the pixel clock or the offsets are hardcoded in the calculation.

Thanks!
Comment 1 rlk 2026-03-16 15:54:56 UTC
*** Bug 517657 has been marked as a duplicate of this bug. ***
Comment 2 Zamundaaa 2026-03-16 16:47:46 UTC
*** Bug 517655 has been marked as a duplicate of this bug. ***
Comment 3 Syboxez 2026-03-16 17:03:44 UTC
Please also provide support for interlaced modelines, along with being able to specify sync polarity. Ideally, I should be able to input an entire X11 modeline as-is into kscreen-doctor.
Comment 4 rlk 2026-03-16 17:17:28 UTC
IMO this should allow commands such as:

kscreen-doctor --newmode $(echo 2160p; cvt 3840 2160 60 | perl -ane 'if (/^Modeline/) { shift @F; shift @F; print "@F\n";}'
kscreen-doctor --addmode eDP-1 2160p
kscreen-doctor --output eDP-1 --auto --scale 2
kscreen-doctor --output eDP-1 --scale 1 --mode 2160p --fb 3840x2160 --panning 3840x2160

(in my case, this is the recipe I use to force my laptop to 3840x2160 so that it displays at full resolution over VNC, but in general it should match xrandr functionality for working with modelines and consume modelines created for xrandr.  This enables people to use existing tooling for working with modelines.)
Comment 5 Rain 2026-04-01 07:34:51 UTC
Agreed, for those with monitors that can handle RBv3, or custom timings, the new `kscreen-doctor output.*.addCustomMode` feature is kind of limiting. I would like to be able to drive my monitor at lower blanking so I could dedicate more bandwidth and clock cycles to higher refresh rates.
Comment 6 edpil02 2026-07-15 14:31:57 UTC
A PR has been pushed  in libkscreen :
https://invent.kde.org/plasma/libkscreen/-/merge_requests/303

"wayland: Add support for kde-output-device-v2 24 and kde-output-management-v2 v22
This adds support for custom modes specified with the CVT timings. The
main goal is to fix the refresh rate drifting in custom modes."

But I don't see how to use it.
Comment 7 Bug Janitor Service 2026-07-23 17:21:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libkscreen/-/merge_requests/325
Comment 8 Bug Janitor Service 2026-08-04 12:23:51 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kscreen/-/merge_requests/509
Comment 9 Vlad Zahorodnii 2026-08-12 08:15:48 UTC
Git commit c6a61c78af6b683e84a640273d4a34f971691e03 by Vlad Zahorodnii.
Committed on 12/08/2026 at 08:12.
Pushed by vladz into branch 'master'.

kscreenctl: Add support for custom CVT timings

This allows adding custom modes using CVT modelines. For example,

    kscreenctl DP-1 add-custom-mode 712.75 3840 4160 4576 5312 2160 2163 2168 2237 -hsync +vsync

Co-authored-by: Xaver Hugl <xaver.hugl@kde.org>

M  +55   -7    kscreenctl/command.cpp
M  +131  -13   kscreenctl/command/output/add-custom-mode.cpp
M  +14   -4    kscreenctl/main.cpp

https://invent.kde.org/plasma/kscreen/-/commit/c6a61c78af6b683e84a640273d4a34f971691e03
Comment 10 edpil02 2026-08-12 11:11:06 UTC
(In reply to Vlad Zahorodnii from comment #9)
> Git commit c6a61c78af6b683e84a640273d4a34f971691e03 by Vlad Zahorodnii.
> Committed on 12/08/2026 at 08:12.
> Pushed by vladz into branch 'master'.
> 
> kscreenctl: Add support for custom CVT timings
> 
> This allows adding custom modes using CVT modelines. For example,
> 
>     kscreenctl DP-1 add-custom-mode 712.75 3840 4160 4576 5312 2160 2163
> 2168 2237 -hsync +vsync
> 
> Co-authored-by: Xaver Hugl <xaver.hugl@kde.org>
> 
> M  +55   -7    kscreenctl/command.cpp
> M  +131  -13   kscreenctl/command/output/add-custom-mode.cpp
> M  +14   -4    kscreenctl/main.cpp
> 
> https://invent.kde.org/plasma/kscreen/-/commit/
> c6a61c78af6b683e84a640273d4a34f971691e03

Very good news .
Thank you for adding this new feature.