Hi,
I have a Dell XPS 9560 to which I connect a LG 27UD88 monitor over USB-C.
50% of the time it uses a refresh rate of 30Hz instead of 60Hz.
I can change it to 60Hz by going to Displays and selecting 60Hz instead of auto.
However this is a bit anoying as I have to do this multiple times a day.
xrandr shows the following:
DP-1 connected 3840x2160+3840+0 (normal left inverted right x axis y axis) 600mm x 340mm
3840x2160 60.00 + 30.00*
So it seems to have 60.00 as a default.
Xorg.0.log shows the following when plugging the monitor in:
31122.191] (II) modeset(0): EDID vendor "SHP", prod id 5238
31122.191] (II) modeset(0): Printing DDC gathered Modelines:
31122.192] (II) modeset(0): Modeline "3840x2160"x0.0 533.25 3840 3888 3920 4000 2160 2163 2168 2222 -hsync -vsync (133.3 kHz eP)
31123.100] (II) modeset(0): Allocate new frame buffer 7680x2160 stride
I’m running OpenSUSE Tumbleweed 20180318 with KDE 5.12.3.
I’m using Xorg with the Intel graphical chip (instead of the NVIDIA).
What could be the reason for the system to pick the non default refresh rate?
Is Xorg responsible for picking the refresh rate or is it another system?
Have you tried setting the desired refresh rate via System Settings > Display and Monitor? That should help with creating a persistent configuration that takes effect when the external display is connected. (In the past I’ve also used a KDE autostart script to achieve similar.)
It is the driver that interrogates the display device capabilities, and the X-server that sets the display mode.
Thanks for the fast answer.
Yes I used System Settings - Display and monitor (that’s called Displays when I open it).
After that it seems to persist for a little while.
I can unplug and plug the monitor back in while keeping 60Hz.
But after some time it reverts back to 30Hz while plugging the monitor in.
You could examine what is being logged in /var/log/Xorg.0.log when the external display is connected perhaps.
A possible workaround for you might be to employ a custom udev rule (to detect when the external display is connected), which calls a script with xrandr commands.
For example
https://unix.stackexchange.com/questions/14854/xrandr-command-not-executed-within-shell-command-called-from-udev-rule
Note that in order to for the xrandr commands to work, you need to pass the DISPLAY and appropriate (active suer) Xauthority environment variable as well. So, something like…
env DISPLAY=:0 XAUTHORITY=/tmp/xauth-1000-_0 /usr/bin/xrandr.....
The output from Xorg.log while attaching the monitor as it went to 30Hz is already in my initial post.
This is the log from when it goes to 60Hz:
49870.250] (II) modeset(0): EDID vendor "SHP", prod id 5238
49870.250] (II) modeset(0): Printing DDC gathered Modelines:
49870.250] (II) modeset(0): Modeline "3840x2160"x0.0 533.25 3840 3888 3920 4000 2160 2163 2168 2222 -hsync -vsync (133.3 kHz eP)
49871.138] (II) modeset(0): Allocate new frame buffer 7680x2160 stride
So it seems there is no difference.
The custom udev rule is something I will look into.
However it’s much nicer if we could find the cause of the issue so it works out of the box for other users as well.
Well the modeline you report in the opening post and last post is the same
Modeline "3840x2160"x0.0 533.25 3840 3888 3920 4000 2160 2163 2168 2222 -hsync -vsync (133.3 kHz eP)
and the values are consistent with a 60Hz refresh rate (and reduced blanking interval)…
~> cvt 3840 2160 -r
# 3840x2160 59.97 Hz (CVT 8.29M9-R) hsync: 133.25 kHz; pclk: 533.00 MHz
Modeline "3840x2160R" 533.00 3840 3888 3920 4000 2160 2163 2168 2222 +hsync -vsync
I don’t see a 30Hz refresh rate modeline reported.
This is bleeding edge technology. I note a lot of posts online discussing users struggling to get 60Hz refresh with these 4K monitors. There may be limitations with the GPU impacting here.
Also don’t rule out energy saving modes of these new monitors.
There may be limitations with the GPU impacting here.
I don’t think this is the case as when I was using Ubuntu with Gnome on Wayland before it did always use 60Hz.
I do have an Ubuntu 16 installation on this same machine which runs on Xorg so I can do some testing with that to rule out KDE and OpenSUSE.
Also don’t rule out energy saving modes of these new monitors.
The Xorg log shows it’s getting DDC information from the monitor which results in the given modeline.
If I parsed the modeline correctly, the monitor seems to report 59.9966246624662Hz.
As the monitor reports this, I don’t think it has anything to do with power savings.
I did some testing with Ubuntu 16 (Xorg and Unity) and it always runs at 60Hz.
I used to run Ubuntu 17.10 with Gnome which also ran fine.
So it seems to be either KDE or openSUSE related.
I also verified when I set the refresh rate to auto in openSUSE it will always run at 30Hz.
So it seems like it is simply a misinterpretation of the Modelines.
Next step would be to install either Gnome on openSUSE or KDE on Ubuntu.
However as deano_ferrari mentioned the xserver is setting the display mode, this would imply that if I would have the same Xorg version on both Ubuntu and openSUSE there should be no difference right?
I’m currenty testing on Manjaro with KDE which also has the same issue.
So it’s not an openSUSE issue.