Bug 447055 - Add more verbose information about display modes to kscreen-doctor
Summary: Add more verbose information about display modes to kscreen-doctor
Status: RESOLVED NOT A BUG
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.23.4
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-16 01:38 UTC by Shmerl
Modified: 2021-12-21 10:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shmerl 2021-12-16 01:38:45 UTC
Currently kscreen-doctor outputs pretty terse information about display modes.

For example in

kscren-doctor -o

Output: 87 DisplayPort-2 enabled connected primary DisplayPort Modes: 90:2560x1440@165! 91:2560x1440@144 92:2560x1440@180* ... Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown primary

It would be nice to be able to get more information in particular detailed modeline info like pixel clock, vertical and horizontal sync pulses and backporches and sync polarities.

For example how it's shown in xrandr --verbose:

  2560x1440 (0x5c) 768.500MHz +HSync -VSync *current
        h: width  2560 start 2608 end 2640 total 2720 skew    0 clock 282.54KHz
        v: height 1440 start 1443 end 1448 total 1570           clock 179.96Hz

This in particular can be useful for the Wayland session where xrandr isn't really properly applicable.
Comment 1 Méven Car 2021-12-17 11:07:30 UTC
I am not sure we will implement this, as there are others tools already filling this usecase.

I am thinking about drm_info in particular :
https://github.com/ascent12/drm_info
Comment 2 Shmerl 2021-12-17 19:14:12 UTC
(In reply to Méven Car from comment #1)
> I am not sure we will implement this, as there are others tools already
> filling this usecase.
> 
> I am thinking about drm_info in particular :
> https://github.com/ascent12/drm_info

May be I'm missing something, but how can I see the above details (like sync pulse and backporches especially) in drm_info?

I can see something like this:

e: /dev/dri/card0
├───Driver: amdgpu (AMD GPU) version 3.42.0 (20150101)
│   ├───DRM_CLIENT_CAP_STEREO_3D supported
│   ├───DRM_CLIENT_CAP_UNIVERSAL_PLANES supported
│   ├───DRM_CLIENT_CAP_ATOMIC supported
│   ├───DRM_CLIENT_CAP_ASPECT_RATIO supported
│   ├───DRM_CLIENT_CAP_WRITEBACK_CONNECTORS supported
│   ├───DRM_CAP_DUMB_BUFFER = 1
│   ├───DRM_CAP_VBLANK_HIGH_CRTC = 1
│   ├───DRM_CAP_DUMB_PREFERRED_DEPTH = 24
│   ├───DRM_CAP_DUMB_PREFER_SHADOW = 1
│   ├───DRM_CAP_PRIME = 3
│   ├───DRM_CAP_TIMESTAMP_MONOTONIC = 1
│   ├───DRM_CAP_ASYNC_PAGE_FLIP = 1
│   ├───DRM_CAP_CURSOR_WIDTH = 256
│   ├───DRM_CAP_CURSOR_HEIGHT = 256
│   ├───DRM_CAP_ADDFB2_MODIFIERS = 1
│   ├───DRM_CAP_PAGE_FLIP_TARGET = 0
│   ├───DRM_CAP_CRTC_IN_VBLANK_EVENT = 1
│   ├───DRM_CAP_SYNCOBJ = 1
│   └───DRM_CAP_SYNCOBJ_TIMELINE = 1
├───Device: PCI 1002:73bf
├───Framebuffer size
│   ├───Width: [0, 16384]
│   └───Height: [0, 16384]
├───Connectors
...
│   ├───Connector 2
│   │   ├───Object ID: 105
│   │   ├───Type: DisplayPort
│   │   ├───Status: connected
│   │   ├───Physical size: 700x390 mm
│   │   ├───Subpixel: unknown
│   │   ├───Encoders: {2}
│   │   ├───Modes
│   │   │   ├───2560x1440@164.96 preferred driver phsync nvsync 
│   │   │   ├───2560x1440@143.97 preferred driver phsync nvsync 
│   │   │   ├───2560x1440@179.96 driver phsync nvsync 
...
│   │   └───Properties
│   │       ├───"EDID" (immutable): blob = 135
│   │       ├───"DPMS": enum {On, Standby, Suspend, Off} = On
│   │       ├───"link-status": enum {Good, Bad} = Good
│   │       ├───"non-desktop" (immutable): range [0, 1] = 0
│   │       ├───"TILE" (immutable): blob = 0
│   │       ├───"CRTC_ID" (atomic): object CRTC = 77
│   │       ├───"scaling mode": enum {None, Full, Center, Full aspect} = None
│   │       ├───"underscan": enum {off, on, auto} = off
│   │       ├───"underscan hborder": range [0, 128] = 0
│   │       ├───"underscan vborder": range [0, 128] = 0
│   │       ├───"max bpc": range [8, 16] = 8
│   │       ├───"HDR_OUTPUT_METADATA": blob = 0
│   │       ├───"vrr_capable" (immutable): range [0, 1] = 1
│   │       ├───"Content Protection": enum {Undesired, Desired, Enabled} = Undesired
│   │       ├───"HDCP Content Type": enum {HDCP Type0, HDCP Type1} = HDCP Type0
│   │       └───"subconnector" (immutable): enum {Unknown, VGA, DVI-D, HDMI, DP, Wireless, Native} = Native
...
├───CRTCs
│   ├───CRTC 0
│   │   ├───Object ID: 77
│   │   ├───Mode: 2560x1440@179.96 phsync nvsync 
│   │   └───Properties
│   │       ├───"ACTIVE" (atomic): range [0, 1] = 1
│   │       ├───"MODE_ID" (atomic): blob = 120
│   │       │   └───2560x1440@179.96 phsync nvsync 
│   │       ├───"OUT_FENCE_PTR" (atomic): range [0, UINT64_MAX] = 0
│   │       ├───"VRR_ENABLED": range [0, 1] = 0
│   │       ├───"DEGAMMA_LUT": blob = 0
│   │       ├───"DEGAMMA_LUT_SIZE" (immutable): range [0, UINT32_MAX] = 4096
│   │       ├───"CTM": blob = 121
│   │       ├───"GAMMA_LUT": blob = 133
│   │       └───"GAMMA_LUT_SIZE" (immutable): range [0, UINT32_MAX] = 4096
...
└───Planes
...
Comment 3 Méven Car 2021-12-18 14:56:32 UTC
drm_info -j

Quoting the README in https://github.com/ascent12/drm_info
`-j - Output info in JSON. Otherwise the output is pretty-printed.`
Comment 4 Shmerl 2021-12-18 22:55:20 UTC
(In reply to Méven Car from comment #3)
> drm_info -j
> 
> Quoting the README in https://github.com/ascent12/drm_info
> `-j - Output info in JSON. Otherwise the output is pretty-printed.`

I see it now, thanks for the pointer!
Comment 5 Shmerl 2021-12-18 23:20:10 UTC
I can see modes listed for sure, but how can I figure out from that JSON which mode is active now?
Comment 6 Méven Car 2021-12-21 10:02:03 UTC
(In reply to Shmerl from comment #5)
> I can see modes listed for sure, but how can I figure out from that JSON
> which mode is active now?

In CRTCS you have a "MODE_ID" field.