Skip to content

Instantly share code, notes, and snippets.

@Kreyren
Last active March 20, 2020 10:44
Show Gist options
  • Save Kreyren/3e55e9a754e58956e1690e38b1888de7 to your computer and use it in GitHub Desktop.
Save Kreyren/3e55e9a754e58956e1690e38b1888de7 to your computer and use it in GitHub Desktop.
HELP-WANTED: blackscreen on amdgpu load after bootloader

After bootloader i'm getting blackscreen

monitor outputing eqvivalent of no input message

i belive that this is being triggered on initialization of amdgpu since it's happening at the point where display usually changes the resolution and adding amdgpu.si_support=0 radeon.si_support=0 in kerneli cli allows me to boot and use GUI.

This is also happening on systemrescuecd with image that worked before on this system

This issue appeared suddenly while playing witcher2 after debian sandbox update

GPU was cleaned and repasted

no visible damage on the hardware

This is Southern Islands PITCAIRN GPU (based on https://wiki.gentoo.org/wiki/AMDGPU#Feature_support) where same issue is present on radeon.si_support=1 amdgpu.si_support=0

Previously systemrescuecd was used without problems, but testing that same image now results in same issue as main OS.

Different ports on the HDMI monitor has been tried with same issue (also on systemrescuecd)

Different monitor has been tried with same result using DVI to VGA reduction (also on systemrescuecd)

Different GPU has been tested which does no have these issues

Same issue on windows

Assumption

  1. Kernel 5.4 bug (according to AMDGPU devs)
[   26.265638] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring sdma0 timeout, signaled seq=1, emitted seq=2
[   26.265764] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* Process information: process  pid 0 thread  pid 0
[   26.265771] [drm] GPU recovery disabled.
  1. Corrupted VBIOS after a system update (end-user diagnostics)
  • Adapter works
  • GPU doesn't seem to have any visible damage and was tested using multimeter
  • Tried different monitor and port which doesn't have an effect on the result
  • Works without drivers loaded

CONCLUSION: Assuming

Additional info

SYSTEM INFO

OS Kreyrock Linux 9999 Anubis x86_64 (LFS with bedrock-linux functionality)
Host: Z68A-D3-B3 
Kernel: 5.4.0-3-amd64 (grabbed from debian + custom config)
Packages: 2624 (dpkg), 368 (emerge), 366 (cave) 
WM: Openbox 
Theme: Adwaita [GTK3] 
Icons: Adwaita [GTK3] 
Terminal: xfce4-terminal 
Terminal Font: Monospace 12 
CPU: Intel i7-2600K (8) @ 3.800GHz 
GPU: AMD ATI Radeon HD 7870 GHz Edition 
Memory: 3000MiB / 16000MiB

Xorg log captured from SSH

Capture Xorg.0.log from SSH, it was required to log-in blindfolded and invoking dhclient ADAPTER

https://gist.githubusercontent.com/Kreyren/cb05788f1e12d44f75e0291f64095d0d/raw/f05fe6640e42ebc13722a83e0080d79e022c011c/gistfile1.txt

Dmesg on "driverless(?)" configuration

Acquired on system with amdgpu.si_support=0 radeon.si_support=0

https://gist.githubusercontent.com/Kreyren/72bd9097b5c7a66f620c9dc4f4f2eb36/raw/8c92ea227d8be3aa57e498a9204aca26df048f8a/gistfile1.txt

Dmesg on affected configuration

Acquired on a system with amdgpu.si_support=1 radeon.si_support=0 fetched from SSH

https://gist.githubusercontent.com/Kreyren/e35587d8710e63e511e69d8653fd996b/raw/628df1c76ff99adab1d2161e6a20f631de101d5c/gistfile1.txt

Green dots on the initialization of bios

I'm also getting these green dots at the initialization of bios which were not there before.

These dots are present only there and nowhere else.

Same issue is present on using different port on different monitor (using DVI to VGA reduction)

image

List of installed packages

Debian - https://gist.githubusercontent.com/Kreyren/422c9fca7f48b968073a8093b6f58da2/raw/91392473d456d1ff9ca87c1021f860500aab44c6/gistfile1.txt

Kreyherbo (Exherbo built from LFS base with minor changes to downstream, because i'm too incompetent to contribute) - https://gist.githubusercontent.com/Kreyren/bb19b8e6735a6836a5527f16a8c15698/raw/a1346420401db6f6a5272873337037a62b40140a/gistfile1.txt

Gentoo - https://gist.githubusercontent.com/Kreyren/f8ca86a4aa3cc21ae3983e93fb7a9cb0/raw/eebc114a808dec56151ad3462f790558175ab839/gistfile1.txt

Dmesg on linux-5.5 (manually compiled)

https://gist.githubusercontent.com/Kreyren/2fa75d30e0632d73311a13c2e872cfe6/raw/78d367f890eb64026e64597091a2a2f40bdbe46a/gistfile1.txt

Kernel has been compiled manually using this config https://gist.githubusercontent.com/Kreyren/7b20ad875ca42381d4a0a8e5b1b26a2c/raw/171747682e49fe28cb653b2e45ee42390ca59338/gistfile1.txt

Comparing VBIOS on linux

From https://01.org/linuxgraphics/documentation/development/how-dump-video-bios i found following:

echo 1 > /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/rom
cat /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/rom > ~/rom.dump
echo 0 > /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/rom

which seems to be able to dump the vbios: image

Checksum of ROM:

root@dreamon:/home/kreyren# sha256sum ~/rom.dump 
69c2b0cc0dca35b67127af47805feeee760fb453eadc67fae85a81c949fbb72d  /root/rom.dump

Comparing Checksum of VBIOS found on https://www.techpowerup.com/vgabios/131669/sapphire-hd7870-2048-120924

root@dreamon:/home/kreyren# sha256sum /home/kreyren/Downloads/Sapphire.HD7870.2048.120924.rom 
f831e9574d562900e3ed6fbab8bce2244f8716a4fd48a7c978172bf66df2cabd  /home/kreyren/Downloads/Sapphire.HD7870.2048.120924.rom

Comparing to checksum of VBIOS found on https://www.techpowerup.com/vgabios/137483/sapphire-hd7870-2048-120928 (Seems to be the same GPU)

root@dreamon:/home/kreyren# sha256sum Downloads/Sapphire.HD7870.2048.120928.rom 
e758b34ca421abb55288e293796a9e851078894a55587fcb9f91a4fd7cc366a0  Downloads/Sapphire.HD7870.2048.120928.rom

Comparing to checksum of VBIOS found on https://www.techpowerup.com/vgabios/120360/sapphire-hd7870-2048-120229

root@dreamon:/home/kreyren# sha256sum /home/kreyren/Downloads/Sapphire.HD7870.2048.120229.rom 
9eb57d797d00930b53bbdfaf89d355a86084e3e6b5c6a356daee79319cb8418c  /home/kreyren/Downloads/Sapphire.HD7870.2048.120229.rom

Comparing to checksum of VBIOS found on https://www.techpowerup.com/vgabios/118446/sapphire-hd7870-2048-120223

root@dreamon:/home/kreyren# sha256sum /home/kreyren/Downloads/Sapphire.HD7870.2048.120223.rom
3f7b4e1e7f7cc10e4902d81f4e2ca86bbd1877d4a6fcd7cb7115a7669b66b9c2  /home/kreyren/Downloads/Sapphire.HD7870.2048.120223.rom

Comparing checksum of VBIOS found on https://www.techpowerup.com/vgabios/117941/sapphire-hd7870-2048-120309

root@dreamon:/home/kreyren# sha256sum /home/kreyren/Downloads/Sapphire.HD7870.2048.120309.rom 
3b68f2318ecf78c18862656aad7a0b8c1a913f4db0a1e4f88f3a17cf61d5ad51  /home/kreyren/Downloads/Sapphire.HD7870.2048.120309.rom

No other VBIOSes found that would match the specs -> Assuming kernel driver corrupting VBIOS

Assuming the time of change and visual apparence of the GPU this https://www.techpowerup.com/vgabios/117941/sapphire-hd7870-2048-120309 should be the expected VBIOS (time at the header of the ROM does not match)

Header of the file matches the time: image

I was able to flash the VBIOS using atiflash.

kreyren@dreamon:~/Downloads/atiflash/AtiFlash 4.07 (Linux)$ sudo ./atiflash -pci -p 0 ~/Downloads/Sapphire.HD7870.2048.120309.rom -f
Old SSID: E217
New SSID: E217
Old P/N: 113-217XTHE-O02
New P/N: 113-217XTHE-O02
Old DeviceID: 6818
New DeviceID: 6818
Old Product Name: PITCAIRN A1 XT GDDR5 64MX32 2GB 
New Product Name: PITCAIRN A1 XT GDDR5 64MX32 2GB 
Old BIOS Version: 015.017.000.000.000000
New BIOS Version: 015.017.000.000.000000
Flash type: M25P10/c
20000/20000h bytes programmed
20000/20000h bytes verified

Restart System To Complete VBIOS Update.

Same issue, after reboot rom sha256sum is:

root@dreamon:/home/kreyren# sha256sum ~/afterreboot.rom 
69c2b0cc0dca35b67127af47805feeee760fb453eadc67fae85a81c949fbb72d  /root/afterreboot.rom

Maybe it did not flash?

Even though the header of the file is different: image

EDIT: It is same as original and different from expected -> It did not flash?

EDIT: Tried different ROM -> It flashes using atiflash on linux

Relevant issue on windows

https://youtu.be/eycFbulmiQ0?t=210 (Thread is removed now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment