Bug 493674 - 4K@60Hz monitor defaults to 4K@30Hz when plugged in
Summary: 4K@60Hz monitor defaults to 4K@30Hz when plugged in
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 6.1.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2024-09-26 06:50 UTC by andrew
Modified: 2024-09-26 21:43 UTC (History)
3 users (show)

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


Attachments
kwinoutputconfig shows 30 hz for one display that should be 60 (8.36 KB, application/json)
2024-09-26 06:50 UTC, andrew
Details
output from kscreen-doctor -o" (2.10 KB, text/plain)
2024-09-26 06:51 UTC, andrew
Details
drm_info output (221.02 KB, text/plain)
2024-09-26 19:45 UTC, andrew
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andrew 2024-09-26 06:50:14 UTC
Created attachment 174093 [details]
kwinoutputconfig shows 30 hz for one display that should be 60

SUMMARY

Using ThinkPad P16v gen2 w/Intel GPU + NVidia a1000 GPU and IBM ThinkVision 4k monitor P32p-20 the external display has incorrect refresh rate.

STEPS TO REPRODUCE
1.  Install default Fedora 40 KDE spin on thinkpad
2.  plug in 4k monitor using HDMI or USB-C
3. Install NVidia driver (maybe does not matter?)

OBSERVED RESULT

Correct 60 Hz refresh rate on laptop display
Incorrect 30 Hz refresh rate on external monitor - should be 60, not 30.

EXPECTED RESULT

60 Hz on both displays

SOFTWARE/OS VERSIONS
Fedora 40
KDE Plasma 6.1.5
KDE Frameworks 6.6.0
Qt 6.7.2
Wayland

ADDITIONAL INFORMATION
Comment 1 andrew 2024-09-26 06:51:43 UTC
Created attachment 174094 [details]
output from kscreen-doctor -o"
Comment 2 Nate Graham 2024-09-26 17:17:25 UTC
60hz for a 4k screen requires HDMI 2.0 (or later). This means that the GPU, computer, cable, and monitor all have to support that version of HDMI, or a later one. If any link in the chain does not, then it will degrade to the oldest supported version of HDMI, which is likely 1.4. And HDMI 1.4 only supports 4K screens at 30hz. So I suspect this is what's happening.

Can you check?
Comment 3 andrew 2024-09-26 18:47:27 UTC
(In reply to Nate Graham from comment #2)
> 60hz for a 4k screen requires HDMI 2.0 (or later). This means that the GPU,
> computer, cable, and monitor all have to support that version of HDMI, or a
> later one. If any link in the chain does not, then it will degrade to the
> oldest supported version of HDMI, which is likely 1.4. And HDMI 1.4 only
> supports 4K screens at 30hz. So I suspect this is what's happening.
> 
> Can you check?

I have used the laptop at 4k@60Hz with other monitors.  Same w/the cables.  Everything worked fine on my older ThinkPad.  This P16v G2 is new and should do min 6k, maybe 8k.  I'm seeing same behavior on HDMI and DP.  Looks like correct EDID data appears but is not honored:

# monitor-edid
Name: LEN P32p-20
EISA ID: LEN62a2
EDID version: 1.4
EDID extension blocks: 1
Screen size: 69.7 cm x 39.2 cm (31.48 inches, aspect ratio 16/9 = 1.78)
Gamma: 2.2
Digital signal
Max video bandwidth: 600 MHz

        HorizSync 30-160
        VertRefresh 23-76

        # Monitor preferred modeline (60.0 Hz vsync, 133.3 kHz hsync, ratio 16/9, 139 dpi)
        ModeLine "3840x2160" 533.25 3840 3888 3920 4000 2160 2163 2168 2222 -hsync +vsync
Comment 4 andrew 2024-09-26 19:02:12 UTC
Notice that in the screen-doctor output it's setting 30 Hz for ALL resolutions.  Odd.
Comment 5 Nate Graham 2024-09-26 19:10:12 UTC
Thanks lot for the info.
Comment 6 Zamundaaa 2024-09-26 19:29:44 UTC
Please attach the output of drm_info
Comment 7 andrew 2024-09-26 19:45:08 UTC
Created attachment 174120 [details]
drm_info output
Comment 8 andrew 2024-09-26 19:45:59 UTC
Notice the max 30hz modes...

│   ├───Connector 5
│   │   ├───Object ID: 286
│   │   ├───Type: DisplayPort
│   │   ├───Status: connected
│   │   ├───Physical size: 700×390 mm
│   │   ├───Subpixel: unknown 
│   │   ├───Encoders: {16} 
│   │   ├───Modes
│   │   │   ├───3840×2160@30.00 driver phsync pvsync 16:9 
│   │   │   ├───3840×2160@29.97 driver phsync pvsync 16:9
│   │   │   ├───3840×2160@29.98 driver phsync nvsync
Comment 9 Zamundaaa 2024-09-26 20:23:06 UTC
Yeah, those are the modes exposed by the kernel, which is why KWin doesn't offer you a 60Hz mode either.
This is most likely a driver bug, which you can report at https://gitlab.freedesktop.org/drm/i915/kernel/-/issues
Comment 10 andrew 2024-09-26 21:43:31 UTC
(In reply to Zamundaaa from comment #9)
> This is most likely a driver bug, which you can report at
> https://gitlab.freedesktop.org/drm/i915/kernel/-/issues

Do you think it's an i915 or Nvidia bug?

# inxi -G
Graphics:
  Device-1: Intel Meteor Lake-P [Intel Arc Graphics] driver: i915 v: kernel
  Device-2: NVIDIA AD107GLM [RTX 1000 Ada Generation Laptop GPU]
    driver: nvidia v: 560.35.03
  Device-3: Logitech HD Pro Webcam C920 driver: snd-usb-audio,uvcvideo
    type: USB
  Device-4: Luxvisions Innotech Integrated Camera driver: uvcvideo type: USB
  Display: server: X.Org v: 24.1.2 with: Xwayland v: 24.1.2 driver: X:
    loaded: modesetting dri: iris gpu: i915 resolution: 1: 6144x3456~30Hz
    2: 3840x2400~60Hz
  API: EGL v: 1.5 drivers: iris,swrast platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: nvidia mesa v: 560.35.03
    renderer: NVIDIA RTX 1000 Ada Generation Laptop GPU/PCIe/SSE2
  API: Vulkan v: 1.3.290 drivers: N/A surfaces: xcb,xlib

# more /etc/environment 
KWIN_DRM_DEVICES=/dev/dri/card1:/dev/dri/card0
KWIN_DRM_NO_AMS=1
KWIN_FORCE_SW_CURSOR=1
__GL_SHOW_GRAPHICS_OSD=1
__GLX_VENDOR_LIBRARY_NAME=nvidia
__NV_PRIME_RENDER_OFFLOAD=1
__VK_LAYER_NV_optimus=NVIDIA_only