DRM error when plug in AC adapter


Hi all,
i have some problem with my hybrid graphic setup.
i was able to use my discrete graphic card, but there are some trick to do it. I have to boot up the machine without plug in the ac adapter, use the DRI_PRIME=1 and dont let the graphic card to idle. i have to use the DRI_PRIME=1 glx gears, so the discrete graphic will not turned off, then i can plug in my ac adapter. but when i pluged in the ac adapter without using the discrete graphic, the next time run DRI_PRIME=1 this error will come up

Invalid CIK pipe configuration, assuming P2
amdgpu: Cannot create addrlib.
do_winsys_init: DRM version is 3.8.0 but this driver is only compatible with 2.12.0 (kernel 3.2) or later.
libGL error: failed to create dri screen
libGL error: failed to load driver: radeonsi
Invalid CIK pipe configuration, assuming P2
amdgpu: Cannot create addrlib.

and the last dmesg will show the drm error

    [ 5128.535154] amdgpu 0000:01:00.0: GPU pci config reset
    [ 5128.891182] [drm:amdgpu_device_suspend [amdgpu]] *ERROR* amdgpu asic reset failed
    [ 5138.513408] [drm:atom_op_jump [amdgpu]] *ERROR* atombios stuck in loop for more than 5secs aborting
    [ 5138.513418] [drm:amdgpu_atom_execute_table_locked [amdgpu]] *ERROR* atombios stuck executing 74BA (len 272, WS 0, PS 4) @ 0x7503
    [ 5138.513425] [drm:amdgpu_atom_execute_table_locked [amdgpu]] *ERROR* atombios stuck executing 60F6 (len 79, WS 0, PS 8) @ 0x6125
    [ 5138.513432] [drm:amdgpu_device_resume [amdgpu]] *ERROR* amdgpu asic init failed
    [ 5139.240685] amdgpu 0000:01:00.0: Wait for MC idle timedout !
    [ 5139.605429] amdgpu 0000:01:00.0: Wait for MC idle timedout !
    [ 5139.679070] [drm] PCIE GART of 1927M enabled (table at 0x0000000000040000).
    [ 5139.682321] smu not running, upload firmware again 
    [ 5139.685339] Fail to Request SMU Load uCode
    [ 5139.685401] DPM is already running
    [ 5139.685405] cant't get the mac of 5 
    [ 5139.685462] [ powerplay ] Invalid VramInfo table.
    [ 5139.685553] SMC address must be 4 byte aligned.
    [ 5139.685553] Failed to initialize Graphics Level!
    [ 5139.685554] Failed to initialize SMC table!
    [ 5139.685567] Attempt to enable Master Deep Sleep switch failed!
    [ 5139.685568] Failed to enable deep sleep master switch!
    [ 5139.685588] Failed to enable voltage DPM during DPM Start Function!
    [ 5139.685588] Failed to start DPM!
    [ 5139.685591] Failed to enable CAC in SMC.
    [ 5139.685591] Failed to enable SMC CAC!
    [ 5139.685594] Failed to enable TDCLimit in SMC.
    [ 5139.685597] Failed to enable PkgPwrTracking in SMC.
    [ 5139.685597] Failed to enable power containment!
    [ 5139.685600] Failed to power control set level!
    [ 5139.685608] Failed to notify smc display settings!
    [ 5140.778239] [drm:gfx_v8_0_ring_test_ring [amdgpu]] *ERROR* amdgpu: ring 0 test failed (scratch(0xC040)=0xFFFFFFFF)
    [ 5140.778258] [drm:amdgpu_resume [amdgpu]] *ERROR* resume of IP block <gfx_v8_0> failed -22
    [ 5140.778267] [drm:amdgpu_device_resume [amdgpu]] *ERROR* amdgpu_resume failed (-22).
    [ 5140.778512] amdgpu 0000:01:00.0: couldn't schedule ib on ring <sdma1>
    [ 5140.778530] [drm:amdgpu_job_run [amdgpu]] *ERROR* Error scheduling IBs (-22)
    [ 5140.778542] [drm:amd_sched_main [amdgpu]] *ERROR* Failed to run job!
    [ 5140.805641] amdgpu 0000:01:00.0: couldn't schedule ib on ring <sdma0>
    [ 5140.805665] [drm:amdgpu_job_run [amdgpu]] *ERROR* Error scheduling IBs (-22)
    [ 5140.805677] [drm:amd_sched_main [amdgpu]] *ERROR* Failed to run job!
    [ 5147.231965] VI should always have 2 performance levels
    [ 5147.231970] Failed to notify smc display settings!
    [ 5147.746820] amdgpu 0000:01:00.0: GPU pci config reset
    [ 5148.106211] [drm:amdgpu_device_suspend [amdgpu]] *ERROR* amdgpu asic reset failed

i think the 2 perforrmance levels cause this problem.
can someone help me with this problem?
thank for all of your help, sorry for my messy post and bad english.

Hi :slight_smile:
What is your Graphicscards?

inxi -G

whats your mhwd state

mhwd -li


find /etc/mod* -iname "*.conf" -execdir cat '{}' ;

here the inxi -G

Graphics:  Card-1: Intel HD Graphics 620
           Card-2: Advanced Micro Devices [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445]
           Display Server: x11 (X.Org 1.19.4 )
           drivers: intel,amdgpu (unloaded: modesetting,vesa)
           Resolution: 1366x768@60.00hz
           OpenGL: renderer: Mesa DRI Intel HD Graphics 620 (Kaby Lake GT2)
           version: 4.5 Mesa 17.2.2

mhwd -li

> Installed PCI configs:
                  NAME               VERSION          FREEDRIVER           TYPE
          video-amdgpu            2017.03.24                true            PCI
               video-intel            2017.03.24                true            PCI

find /etc/mod* -iname "*.conf" -execdir cat {} +
# List of modules to load at boot

hm thats strange! For your setup there should be the prime config enabled can you please try:

pkexec mhwd -r pci $(mhwd -li | grep "video" | awk '{print $1}')
pkexec hwd -a pci free 0300

and tell me if it installs the video-hybrid-intel-amdgpu-prime config?

i have try to switch the driver, at first i use the video-hybrid-intel-amdgpu then i try video-intel and video-amdgpu. both setup work just fine before i plugged in the ac adapter. i have run the command you gave, and yes it installs video-hybrid-intel-amdgpu

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by