Stk-code: 2160p60 nonfunctional

Created on 13 Jan 2019  路  2Comments  路  Source: supertuxkart/stk-code

STK release version: git System: Arch - AMDGPU

It switches me to 30hz upon opening the game and then switches me back to 60hz when I exit.

I use xrandr --newmode "mymode" 594 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync
every time I boot the system to add the mode, as there is some problem with my drivers or display, 0 A.D. has no problems with this, but SuperTuxKart does. I only recently got a HDMI 2.1 cable, otherwise I would have tested this earlier

Graphics minor fixed defect

Most helpful comment

I made a commit anyway, because it's more correct. You can see if it helped.

All 2 comments

Could you show the output of "xrandr" command? If these two modes 30hz and 60hz have equal resolution, it should choose the one with higher refresh rate, because we already check it.

Actually you can try this patch:

diff --git a/lib/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp b/lib/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp
index 04e5d2d3c..17b26d0d1 100644
--- a/lib/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp
+++ b/lib/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp
@@ -453,7 +453,7 @@ bool CIrrDeviceLinux::changeResolution()
                refresh_rate_new = (mode->dotClock * 1000.0) / (mode->hTotal * mode->vTotal);

                if (refresh_rate_new <= refresh_rate)
-                   break;
+                   continue;

                for (int j = 0; j < output->nmode; j++)
                {

Because if you have the same resolution in two different modes, maybe it breaks early and it doesn't check the second one.

I made a commit anyway, because it's more correct. You can see if it helped.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bebehei picture bebehei  路  3Comments

mitros123 picture mitros123  路  4Comments

Arthur-D picture Arthur-D  路  3Comments

ghost picture ghost  路  3Comments

kryptot7 picture kryptot7  路  5Comments