'amdgpu' driver issue / GPU crashes on reaching >400MHz core clock speeds (AMD Radeon R5 M330/430)

Initially just after boot I get:

╰─λ glxinfo | grep "OpenGL renderer"
     DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Mesa Intel(R) HD Graphics 620 (KBL GT2)
OpenGL renderer string: AMD Radeon (TM) R5 M330 (HAINAN, DRM 3.41.0, 5.13.11-3-cacule, LLVM 12.0.1)

But after some time after boot, I get:

 ╰─λ glxinfo | grep "OpenGL renderer"
            DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Mesa Intel(R) HD Graphics 620 (KBL GT2)
OpenGL renderer string: Mesa Intel(R) HD Graphics 620 (KBL GT2)
  1. This is only the case with amdgpu driver, radeon driver doesn't behave like that.

  2. And whenever I run something heavy with DRI_PRIME=1, the screen gets stuck and I would have to force shutdown my system---> with amdgpu driver

Thank you

It would be really great if someone helped me with my first issue in the post.
This issue wasn't there in Linux Mint, but running something heavy with DRI_PRIME=1 also freezes the system in Linux Mint.

This is what I learnt by asking at reddit: https://www.reddit.com/r/Dell/comments/pd29te/how_does_amd_discrete_gpu_with_intel_integrated/

Apart from the fact that it is rude to push your post back up with a new help request, important information that was requested in template is missing.

Just reopened further to OP request in order to provide the solution found

2 Likes

The workaround to this issue is to disable dynamic power management by setting amdgpu.dpm=0 in front of GRUB_CMDLINE_LINUX_DEFAULT variale in the grub config (/etc/default/grub).

Found the solution here: https://www.reddit.com/r/archlinux/comments/pelxaw/amdgpu_driver_issue/hbfcxs1/?context=3

Now amdgpu driver works normally!

Even apps don't crash now on being run with DRI_PRIME=1!

This is not an appropriate solution

2 Likes

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

As requested by the OP.

So the main problem is, I don't know why but as the GPU's clock speed crosses 400-500MHz the GPU crashes. To prevent that from happening we can set power_dpm_state to be on battery mode, which gives an average of 400MHz of GPU without crashing.

(With DPM disabled, the max clock speed used to be 300MHz, so it seemed to be a solution at first)

  1. First, enable DPM by adding amdgpu.dpm=1 in front of GRUB_CMDLINE_LINUX_DEFAULT variale in the grub config (/etc/default/grub).

  2. Then sudo nano /etc/udev/rules.d/30-amdgpu-pm.rules and add the contents as below

 GNU nano 5.8                                                      /etc/udev/rules.d/30-amdgpu-pm.rules                                                                
KERNEL=="card1", SUBSYSTEM=="drm", DRIVERS=="amdgpu", ATTR{device/power_dpm_state}="battery"

(you might want to confirm if your AMD GPU is identified as card1 or card2 by checking if the directory /sys/class/drm/card1/device/ or /sys/class/drm/card0/device/ has the file power_dpm_state ----> this is only the case if you have multiple GPU, if you have only one GPU then it would be card0. And power_dpm_state setting is specific only for AMD cards and not all AMD card has this setting).

Only follow these instructions if you have the same issue as mentioned in the post.

You can also install corectrl and radeontop and check them out.

So this is the maximum I can get out of my GPU (around 400MHz of clock speed, and if it goes any more the GPU crashes). I also learned that my discrete AMD GPU doesn't work automatically to help render heavy graphics unless I start an application with DRI_PRIME=1 by using radeontop
And since I can't run my GPU at full capacity, it seems that the integrated intel GPU performs better than my AMD GPU when I run FlightGear.

It seems my AMD GPU is not useful in Linux !,
The same issue is there in my Linux Mint installation.
Also with radeon drivers as well

So I can't say this is a solution to this problem.

Following this answer, you can get the most of the AMD GPU(400MHz of clock speed), but the integrated GPU is better than 400MHz of AMD GPU

But in Windows, my same AMD card can go up to 1000-1200 MHz of clock speed.

It would be really wonderful if some Devs here can give me insight into this issue.

Should I mark it as the solution?

This is how I got to this explanation:Not able to execute this command: sudo echo balanced > /sys/class/drm/card0/device/power_dpm_state - #31 by Austin

:roll_eyes:

Thank you for your time.

1 Like

This might only be the reason why Games are not working as in windows

This is an answer I got from the Dell subreddit:

I tried to get to the root of your issue and tried to read the fine print of the generic AMD drivers that you were using.

And I have exactly found the issue and bring good and bad news to you.

The bad is your GPU model (AMD Radeon R5 M330/430) is not supported. Your GPU architecture is supported and so is your family of desktop cards, but your EXACT GPU model is not.

It is currently only officially supported up to R5 M3XX cards. Nothing is stopping you from installing the driver, but it will never work correctly.

This applies to both AMD directly, and the generic drivers that are available.

The GOOD news is that there is a person named Oibaf that has personally compiled drivers for your GPU and made it open source for anyone to modify or install on their own laptops.
The thing is this driver is only validated to work on Ubuntu. So hopefully this new information can put you at ease a bit. No point trying any further on getting the driver to work on Garuda unless you are willing to put in the work to have a custom driver created by yourself.

It even didn't work in Ubuntu, so there really is no point in trying to fix this.
That's it I learned a lot trying to fix this, but this has reached an unfortunate end.

2 Likes

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