Mint 20, AMD RX580, 4K HDMI stuck at 30Hz

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
AreaAffect

Mint 20, AMD RX580, 4K HDMI stuck at 30Hz

Post by AreaAffect »

Hello everyone,

I've spent the last 5 or so hours searching and trying to figure this out.

I have 4K display using HDMI. On this same PC booted into Windows 10 I can achieve 4K at 60Hz. Additionally, this same display connected to my Macbook Pro can also achieve 4K at 60Hz. This is using the same cable, plugged into the same 4K 60Hz port (noted as such) on the display.

I seem to be going in circles here. I thought installing the official AMD driver package would fix this, but apparently I am not experienced enough to do this. There is a "check" in the install script which halts the install if anything other than Ubuntu is detected, so I am stuck using the onboard version which seems to be not working right.

I have read through this thread: viewtopic.php?t=289859

GPU

Code: Select all

09:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev e7) (prog-if 00 [VGA controller])
	Subsystem: Micro-Star International Co., Ltd. [MSI] Radeon RX 580 Armor 4G OC
	Flags: bus master, fast devsel, latency 0, IRQ 51, NUMA node 0
	Memory at d0000000 (64-bit, prefetchable) [size=256M]
	Memory at cfe00000 (64-bit, prefetchable) [size=2M]
	I/O ports at e000 [size=256]
	Memory at fe980000 (32-bit, non-prefetchable) [size=256K]
	Expansion ROM at 000c0000 [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

Code: Select all

Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] 
           vendor: Micro-Star MSI driver: amdgpu v: kernel bus ID: 09:00.0 
           Display: x11 server: X.Org 1.20.8 driver: amdgpu,ati unloaded: fbdev,modesetting,radeon,vesa 
           resolution: 3840x2160~30Hz 
           OpenGL: renderer: Radeon RX 580 Series (POLARIS10 DRM 3.35.0 5.4.0-58-generic LLVM 11.0.0) 
           v: 4.6 Mesa 21.0.0-devel (git-2472f52 2020-12-24 focal-oibaf-ppa) direct render: Yes 
Display

Code: Select all

xrandr --listmonitors
Monitors: 1
 0: +*HDMI-A-1 3840/941x2160/529+0+0  HDMI-A-1
Simply setting to 60Hz does nothing and the display remains at 30Hz. I have tried

Code: Select all

xrandr --output HDMI-A-1 --mode 3840x2160 --rate 60

Code: Select all

xrandr --prop
Screen 0: minimum 320 x 200, current 3840 x 2160, maximum 16384 x 16384
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
	GAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	DEGAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	GAMMA_LUT: 0 
		range: (0, 65535)
	CTM: 0 
	DEGAMMA_LUT: 0 
		range: (0, 65535)
	TearFree: auto 
		supported: off, on, auto
	vrr_capable: 0 
		range: (0, 1)
	max bpc: 8 
		range: (8, 16)
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 59 
		supported: 59
	non-desktop: 0 
		range: (0, 1)
DisplayPort-1 disconnected (normal left inverted right x axis y axis)
	GAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	DEGAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	GAMMA_LUT: 0 
		range: (0, 65535)
	CTM: 0 
	DEGAMMA_LUT: 0 
		range: (0, 65535)
	TearFree: auto 
		supported: off, on, auto
	vrr_capable: 0 
		range: (0, 1)
	max bpc: 8 
		range: (8, 16)
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 63 
		supported: 63
	non-desktop: 0 
		range: (0, 1)
HDMI-A-0 disconnected (normal left inverted right x axis y axis)
	GAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	DEGAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	GAMMA_LUT: 0 
		range: (0, 65535)
	CTM: 0 
	DEGAMMA_LUT: 0 
		range: (0, 65535)
	TearFree: auto 
		supported: off, on, auto
	vrr_capable: 0 
		range: (0, 1)
	max bpc: 8 
		range: (8, 16)
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 67 
		supported: 67
	non-desktop: 0 
		range: (0, 1)
HDMI-A-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 941mm x 529mm
	EDID: 
		00ffffffffffff00593a111001010101
		00180103805e35782a922da355539c25
		0b474a200000d1c0d1fc010101010101
		01010101010104740030f2705a80b058
		8a00ad113200001e023a801871382d40
		582c4500ad113200001e000000fc004d
		34332d43310a202020202020000000fd
		00194c0f8c1e000a2020202020200146
		020338714a0203059004203f5d5f6432
		00000000000000000000000009070715
		0750830100006d030c005000383c2000
		60010304e30e6166023a801871382d40
		582c4500ad113200001e011d007251d0
		1e206e285500ad113200001e00000000
		00000000000000000000000000000000
		00000000000000000000000000000089
	GAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	DEGAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	GAMMA_LUT: 0 
		range: (0, 65535)
	CTM: 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 
		0 1 
	DEGAMMA_LUT: 0 
		range: (0, 65535)
	TearFree: auto 
		supported: off, on, auto
	vrr_capable: 0 
		range: (0, 1)
	max bpc: 8 
		range: (8, 16)
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 71 
		supported: 71
	non-desktop: 0 
		range: (0, 1)
   3840x2160     30.00*+  24.00    29.97    23.98  
   4096x2160     30.00    24.00    29.97    23.98  
   1920x1200     30.00  
   1920x1080    120.00   119.88    60.00    59.94    24.00    23.98  
   1600x1200     30.00  
   1680x1050     30.00  
   1280x1024     30.00  
   1440x900      30.00  
   1280x800      30.00  
   1280x720      60.00    59.94  
   1024x768      30.00  
   800x600       30.00  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
DVI-D-0 disconnected (normal left inverted right x axis y axis)
	GAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	DEGAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	GAMMA_LUT: 0 
		range: (0, 65535)
	CTM: 0 
	DEGAMMA_LUT: 0 
		range: (0, 65535)
	TearFree: auto 
		supported: off, on, auto
	max bpc: 8 
		range: (8, 16)
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 76 
		supported: 76
	non-desktop: 0 
		range: (0, 1)

I have gone so far as to add the new mode and setting the mode as well, but the refresh never changes. Even after doing this it never shows 60Hz when looking at the Displays GUI panel, and you can tell just using the display that it's half speed.


Any suggestions or ideas would be appreciated. I have done my best to solve this before coming here, but I am out of ideas!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Mint 20, AMD RX580, 4K HDMI stuck at 30Hz

Post by roblm »

Here is some info extracted from the monitor’s EDID from the xrandr --prop output. The maximum dotclock (pixel clock) allowed is only 300 MHz:
Monitor ranges (GTF): 25-76Hz V, 15-140kHz H, max dotclock 300MHz
Here is a reduced blanking mode generated by the cvt utility for a 3840x2160 @ 60 Hz mode:

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

The required dotclock is 533 MHz, which greatly exceeds the 300 MHz limit from the EDID.

This mode is from the EDID. The dotclock is 297.00, which is for a 30 Hz refresh rate:

Code: Select all

Detailed mode: Clock 297.000 MHz, 941 mm x 529 mm
               3840 4016 4104 4400 hborder 0
               2160 2168 2178 2250 vborder 0
               +hsync +vsync

Here is a method to try forcing the use of another EDID with the correct values:
I generated this edid.bin file using edid-generator, that has the correct values for 60 Hz. These are the relevant lines from the EDID:

Code: Select all

Detailed mode: Clock 594.000 MHz, 1000 mm x 562 mm
               3840 4016 4104 4400 hborder 0
               2160 2168 2178 2250 vborder 0
               +hsync +vsync 

Monitor ranges (GTF): 59-61Hz V, 134-136kHz H, max dotclock 600MHz
To use this EDID, download the 3840x3160.zip file below, which contains the 3840x3160.bin file.
3840x2160.zip
(275 Bytes) Downloaded 47 times

Open the Downloads folder. Right click on the downloaded file and select Extract Here.
Right click in the empty space and select Open in Terminal.

Use this command to create a folder named edid in /lib/firmware/:
sudo mkdir /lib/firmware/edid

Copy the edid file to /lib/firmware/edid: sudo cp 3840x2160.bin /lib/firmware/edid/

Open the grub file: xed admin:///etc/default/grub

Change this line:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
To this:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash drm.edid_firmware=edid/3840x2160.bin"
Update grub and reboot: sudo update-grub
AreaAffect

Re: Mint 20, AMD RX580, 4K HDMI stuck at 30Hz

Post by AreaAffect »

roblm, thank you very much for the time you spent on that - far more than I expected. Let me work through your action plan, thank you again.
gregk
Level 1
Level 1
Posts: 3
Joined: Wed Jul 09, 2014 10:58 am

Re: Mint 20, AMD RX580, 4K HDMI stuck at 30Hz

Post by gregk »

I tried roblm's bin file, during boot I encountered:

Code: Select all

[    5.055811] platform HDMI-A-1: Direct firmware load for edid/3840x2160.bin failed with error -2
[    5.055825] [drm:edid_load [drm]] *ERROR* Requesting EDID firmware "edid/3840x2160.bin" failed (err=-2)
Would this be because my HDMI port is HDMI-A-0? (according to xrandr --prop)

Update:

I used cvt to generate a mode line as input for edid-generator but it has a few issues with higher resolutions, and only gave me a list of strange resolutions up to 1792x1008 @ 60Hz.

Code: Select all

cvt -r 3840 2160 60
# 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
This is the output from edid-parse of the .bin file produced (reduced clock):

Code: Select all

Section "Monitor"
	Identifier "3840x2160R"
	ModelName "3840x2160R"
	VendorName "LNX"
	# Monitor Manufactured week 5 of 2012
	# EDID version 1.3
	# Analog Display
	DisplaySize 1000 560
	Gamma 2.20
	Option "DPMS" "true"
	Horizsync 132-134
	VertRefresh 59-61
	# Maximum pixel clock is 540MHz
	#Not giving standard mode: 1792x1008, 60Hz
	Modeline 	"Mode 0" 533.00 3840 3888 3920 4000 2160 2163 2168 2222 +hsync +vsync 
EndSection
Locked

Return to “Graphics Cards & Monitors”