Bug 457855 - [Nvidia Wayland] Max Refresh rate is Smaller than Display
Summary: [Nvidia Wayland] Max Refresh rate is Smaller than Display
Status: RESOLVED NOT A BUG
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kscreen (show other bugs)
Version: 5.25.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2022-08-13 20:15 UTC by nekonexus
Modified: 2022-08-17 08:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
nekonexus: Usability+


Attachments
Max Refresh-Rate is 30Hz (18.51 KB, image/png)
2022-08-13 20:15 UTC, nekonexus
Details
drm_info (97.29 KB, text/plain)
2022-08-16 19:10 UTC, nekonexus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nekonexus 2022-08-13 20:15:54 UTC
Created attachment 151306 [details]
Max Refresh-Rate is 30Hz

SUMMARY
When using the open-source Nvidia kernel driver 515.65.01, running Wayland caps the permitted refresh rate to 30Hz rather than the full range of available refresh rates (I'm using a 60Hz display); this issue does not occur with X11


STEPS TO REPRODUCE
1. Using a GPU supported by the open-source Nvidia kernel module, install this driver (515.65.01) if not already installed
2. Reboot to SDDM
3. Select to login with Wayland in SDDM
4. Go to System Settings kcm_kscreen

OBSERVED RESULT
The max permitted refresh rate is half of my display's supported refresh rate

EXPECTED RESULT
I should be able to increase the refresh rate to that of my display (60Hz in this case)

This was said to be fixed in: https://bugs.kde.org/show_bug.cgi?id=442575
but does not appear to be the case here, in my experience.

SOFTWARE/OS VERSIONS
Linux: Arch Linux ( 5.19 kernel )
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5

ADDITIONAL INFORMATION
I have a script in /etc/profile.d/wayland.sh that sets the following:

#! /usr/bin/bash

if [ -x $(command -v loginctl > /dev/null 2>&1) ] && [ -x $(command -v kwin_x11 > /dev/null 2>&1) ]
    if [ loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Type | sed 's/Type=//g' != "x11" ]; then

        ## egl for older Nvidia versions
        if ${KWIN_OPENGL_INTERFACE} == "egl"
            export QT_QPA_PLATFORM="wayland-egl"
            export KWIN_DRM_USE_EGL_STREAMS=1
        else

        export QT_QPA_PLATFORM="wayland,xcb"
        fi

        ## Doesn't work for me, for some reason
         # if [ modinfo /usr/lib/modules/$(uname -r)/kernel/drivers/video/nvidia.ko | grep ^version | awk '{print $3}' => 495.44 ]; then
         #    
         # fi
        
        ## GBM for newer Nvidia versions
        # export QT_QPA_PLATFORM="wayland"
        # export QT_QPA_PLATFORMTHEME=qt5ct
    else
        
        export QT_QPA_PLATFORM="xcb"
        
    fi
fi
Comment 1 Zamundaaa 2022-08-15 19:45:47 UTC
Please attach the output of drm_info
Comment 2 nekonexus 2022-08-16 05:42:29 UTC
How do I produce this output?
Comment 3 Zamundaaa 2022-08-16 10:32:46 UTC
Install https://github.com/ascent12/drm_info, which may be provided by your distro, and execute it.
Comment 4 Nate Graham 2022-08-16 13:31:01 UTC
Install whatever package from your package manager provides the `drm_info` program (`pacman -Qo drm_info` should tell you), and then run it in a terminal window and paste the output here.
Comment 5 nekonexus 2022-08-16 18:52:12 UTC
neko-san@ARCH ~> doas pacman -Qo drm_info
doas (neko-san@ARCH) password: 
error: No package owns drm_info

It's not in the Arch repos but it's on the AUR, so I'll get it from there
Comment 6 nekonexus 2022-08-16 18:57:44 UTC
Do I need to log back into the wayland session for this?
Comment 7 Nate Graham 2022-08-16 19:02:26 UTC
Yeah.
Comment 8 nekonexus 2022-08-16 19:10:15 UTC
Created attachment 151362 [details]
drm_info

(The requested drm_info terminal output)
Comment 9 Zamundaaa 2022-08-16 20:33:22 UTC
Your driver is reporting 30Hz to be the maximum refresh rate at the 3840x2160 resolution. Either that is the maximum refresh rate your gpu/cable/monitor can do, or it's a driver bug
Comment 10 nekonexus 2022-08-16 20:41:56 UTC
This isn't the case in X11, so it's just an Nvidia Wayland bug?
Comment 11 Zamundaaa 2022-08-17 08:57:14 UTC
Yes