Bug 107064 - xrandr does not correctly switch display refresh rates, but pretends it did
Summary: xrandr does not correctly switch display refresh rates, but pretends it did
Status: RESOLVED MOVED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: Triaged, ReadyForDev
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-28 17:42 UTC by Nicolas Frattaroli
Modified: 2019-11-29 17:48 UTC (History)
3 users (show)

See Also:
i915 platform: KBL
i915 features: display/Other


Attachments
xrandr fails to set the mode correctly, but claims it is in 48 Hz mode (40.28 KB, text/plain)
2018-06-28 17:42 UTC, Nicolas Frattaroli
no flags Details
dmesg output from boot with the usual debug options (2.48 MB, text/plain)
2018-06-28 17:43 UTC, Nicolas Frattaroli
no flags Details
i915_display_info showing mode successfully set to 48hz (2.96 KB, text/plain)
2019-09-13 05:27 UTC, Kunal Joshi
no flags Details
i915_display_info showing mode successfully set to 60hz (2.95 KB, text/plain)
2019-09-13 05:28 UTC, Kunal Joshi
no flags Details
dmesg after running testdisplay. (11.88 KB, text/plain)
2019-09-13 05:28 UTC, Kunal Joshi
no flags Details

Description Nicolas Frattaroli 2018-06-28 17:42:30 UTC
Created attachment 140380 [details]
xrandr fails to set the mode correctly, but claims it is in 48 Hz mode

Telling xrandr to switch to 48 Hz mode with `xrandr --rate 48` makes the screen go black for a moment, and xrandr says it is now running at 48 Hz, but applications which wait for vsync still swap roughly 60 times per second.

The display is connected to eDP.

$ uname -r
4.18.0-rc2-drm-tip+
$ uname -m
x86_64

See the attachment for a log of me running xrandr to show the current state, then switching the output refresh rate, then running xrandr to show it again, and then running glxgears to show that it's still swapping at roughly 60 Hz.
Comment 1 Nicolas Frattaroli 2018-06-28 17:43:20 UTC
Created attachment 140381 [details]
dmesg output from boot with the usual debug options
Comment 2 Ville Syrjala 2018-06-28 19:57:17 UTC
git://github.com/vsyrjala/linux.git mode_vrefresh

Should hopefully get rid of the 48hz mode from the list. One day we may add back the support for alternate refresh rates, but in the meantime not saying anything seems better than lying.
Comment 3 Jani Saarinen 2018-06-29 07:46:32 UTC
Reporter can you check branch Ville sent?
Comment 4 Nicolas Frattaroli 2018-06-29 09:07:05 UTC
I can confirm that with Ville Syrjala's branch, the 48 Hz mode is no longer shown in xrandr, and can no longer be selected with xrandr --rate 48.
Comment 5 Jani Saarinen 2018-06-29 11:18:19 UTC
ok, Ville, what are next steps?
Comment 6 Jani Nikula 2018-10-24 08:24:10 UTC
Just going through some bugs, I wonder if this is relevant:

commit d93fa1b47b8fcd149b5091f18385304f402a8e15
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Wed May 16 11:01:10 2018 +0300

    Revert "drm/i915/edp: Allow alternate fixed mode for eDP if available."

Nicolas, can you reproduce on v4.18 or later? (I see that you tested on v4.18-rc-something, but I mean the final release.)
Comment 7 Nicolas Frattaroli 2018-10-24 10:20:33 UTC
I can still reproduce this on 4.18.14.
Comment 8 Lakshmi 2019-07-15 06:53:32 UTC
(In reply to Jani Nikula from comment #6)
> Just going through some bugs, I wonder if this is relevant:
> 
> commit d93fa1b47b8fcd149b5091f18385304f402a8e15
> Author: Jani Nikula <jani.nikula@intel.com>
> Date:   Wed May 16 11:01:10 2018 +0300
> 
>     Revert "drm/i915/edp: Allow alternate fixed mode for eDP if available."
> 
> Nicolas, can you reproduce on v4.18 or later? (I see that you tested on
> v4.18-rc-something, but I mean the final release.)

(In reply to Nicolas Frattaroli from comment #7)
> I can still reproduce this on 4.18.14.

@Jani, how to proceed further?
Comment 9 Kunal Joshi 2019-09-13 05:26:36 UTC
I was able to reproduce the bug.

uname -a
5.3.0-rc5+ #9 SMP Fri Aug 30 10:45:22 IST 2019 x86_64 x86_64 x86_64 GNU/Linux

I am using edp panel which supports two modes 48hz and 60hz.

 

 

The command  xrandr --rate 48  successfully ran but still the refresh rate was 60hz,but after running this command i915_display_info shows the mode as "".

Then i tried with igt test *testdisplay,*This test traverses through all support modes and sets the mode,i gave a delay of 10 seconds so i could ssh on to the system and check i915_display_info.

I found that both mode were successfully set and we can see it in the attached files 48hz and 60hz and also the dmesg log.

sudo ./tests/testdisplay -s 10

 

So i think the problem is with xrandr implementation
Comment 10 Kunal Joshi 2019-09-13 05:27:43 UTC
Created attachment 145340 [details]
i915_display_info showing mode successfully set to 48hz
Comment 11 Kunal Joshi 2019-09-13 05:28:05 UTC
Created attachment 145341 [details]
i915_display_info showing mode successfully set to 60hz
Comment 12 Kunal Joshi 2019-09-13 05:28:54 UTC
Created attachment 145342 [details]
dmesg after running testdisplay.
Comment 13 Ville Syrjala 2019-09-13 15:29:54 UTC
Yeah, eDP refresh rate switching is still a lie. We just keep using the fixed mode regardless. My patches to reject other refresh rates got stuck in a dark bikeshed.
Comment 14 Martin Peres 2019-11-29 17:48:19 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/intel/issues/125.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.