Saturday 20 May 2017

A simple video card upgrade... not so much

I wanted to get a new video card and found a deal on a Sapphire RX580 and thought great, going from a RX390 to a RX580 should be easy. Both are AMD, both are just rehashes of an older card so drivers are established.

But no, seems the Sapphire card is cheap for a reason...

So started up in Linux and it booted to the point where it said switching to amdgpufb, then blank screen.  HDMI was UP (the card has two HDMI ports and one goes to an AV system for sound).  It's all working but you can't see anything. crtrl-alt-delete and try again.

Change kernel line options in grub to include nomodeset and it boots and you can see (apart from about 2 minutes of tearing when it tries to start gdm)

Logs look fine looks amdgpu is starting OK and recognising it as an RX480 which it is based on. Doh, wrong firmware.  OK so update from TONGA to POLARIS10 firmware blobs int he kernel. My kernel doesn't use ramdisk it just boots and includes all the firmware for video, wifi etc.  Not the linux way but it works and it's quick.

Boot again, but still blank screen and now firmware loads and the card looks to be running. Hmmm...

Boot into windows and just make sure and the card is fine.

Run make menuconfig on the kernel and check for options but everything is just amdgpu generic not specific to a model.  Found a firmware option related to EDID and checked the docs on this in /usr/src/linux/Documenation/EDID/Howto.txt.  This talks about video starting but cards not reading EDID from the monitor correctly and stopping at a blank screen when start KMS.  OK sounds promising...

Making a EDID file is as simple as running make in that directory to use the default ones.

Copy 1920x1080.bin to /lib/firmware and add that to the kernel blobs and reboot. Still no good.

Google comes to the rescue to find an Arch Linux article (damn these guys document well) which is similar to Gentoo and it mentions you need to turn on this firmware at boot with a kernel option

drm_kms_helper.edid_firmware=1920x108.bin

and sure enough it boots and video stays on.

So if you have a Sapphire RX580 (pulse in my case) and linux and have blank video issues try this. I'm sorry to sapphire if it's a general RX580 thing but I didn't find any other posts etc on this issue so I'm guessing not.

I can post line by line if anyone comes across this and it doesn't make sense to them.




Gentoo grub-probe not working

 I have a bunch of history commands I run when I d a new kernel etc and one stopped working. grub-mkconfig would fail with grub-probe for /....