Enable AMDGPU Linux Driver in Debian Ubuntu mint

To enable amdgpu we have to set special kernel boot parameters.  The easiest way is to make it permanent and apply to all kernels (no messing around with grub.cfg) so we'll edit those defaults in /etc/default/grub by changing the GRUB_CMDLINE_LINUX_DEFAULT parameter.  After that don't forget to run "update-grub" to apply it (otherwise amdgpu will never be enabled).

Requirements

No clue really as it really depends. But for example this does not work on older 4.4 kernels.  I tested this on a newer kernel such as 4.15 and it worked fine.  So if you follow this and it doesn't work, try updating to the latest possible kernel for your distro.

1. Edit /etc/default/grub

vi /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amdgpu.cik_support=1 amdgpu.si_support=1 radeon.si_support=0 radeon.cik_support=0"

sudo update-grub

2. Remove any old radeon.conf files otherwise Xorg will not start

sudo mv /usr/share/X11/xorg.conf.d/20-radeon.conf ~/

3. Now put in an amdgpu conf file

sudo vi /usr/share/X11/xorg.conf.d/10-amdgpu.conf


Section "OutputClass"
    Identifier "AMDgpu"
    MatchDriver "amdgpu"
    Driver "amdgpu"
EndSection

Section "Device"
    Identifier "Card0"
    Driver "amdgpu"
    Option "TearFree" "on"
    Option "DRI3" "1"
EndSection

4. Now reboot and cross your fingers!

and check to see if amdgpu is enabled

Notice one card is using amdgpu because it supports it (Kabini based SI Radeon HD 8330E) but the other card (Radeon E6460) is using radeon.  This is because that card isn't supported by the amdgpu driver.

sudo lshw -c video


  *-display              
       description: VGA compatible controller
       product: Kabini [Radeon HD 8330E]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 1
       bus info: pci@0000:00:01.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
       configuration: driver=amdgpu latency=0
       resources: irq:37 memory:e0000000-efffffff memory:f0000000-f07fffff ioport:3000(size=256) memory:f0a00000-f0a3ffff memory:c0000-dffff
  *-display
       description: VGA compatible controller
       product: Seymour [Radeon E6460]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:01:00.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
       configuration: driver=radeon latency=0
       resources: irq:43 memory:d0000000-dfffffff memory:f0900000-f091ffff ioport:2000(size=256) memory:f0940000-f095ffff

 

Other Performance Tuning Tweaks

You can set the dpm performance level to push the memory and GPU frequency to the highest levels (maximum performance).  I find this is much more desirable than auto on any video card where you get some 2D lag at some points while the GPU ramps up performance.

By default the performance of the card is set to 'auto' if you want high performance or max performance do this:

echo "high" > /sys/class/drm/card0/device/power_dpm_force_performance_level

Check clockspeed and other info:

cat /sys/kernel/debug/dri/0/amdgpu_pm_info
Clock Gating Flags Mask: 0x0
    Graphics Medium Grain Clock Gating: Off
    Graphics Medium Grain memory Light Sleep: Off
    Graphics Coarse Grain Clock Gating: Off
    Graphics Coarse Grain memory Light Sleep: Off
    Graphics Coarse Grain Tree Shader Clock Gating: Off
    Graphics Coarse Grain Tree Shader Light Sleep: Off
    Graphics Command Processor Light Sleep: Off
    Graphics Run List Controller Light Sleep: Off
    Graphics 3D Coarse Grain Clock Gating: Off
    Graphics 3D Coarse Grain memory Light Sleep: Off
    Memory Controller Light Sleep: Off
    Memory Controller Medium Grain Clock Gating: Off
    System Direct Memory Access Light Sleep: Off
    System Direct Memory Access Medium Grain Clock Gating: Off
    Bus Interface Medium Grain Clock Gating: Off
    Bus Interface Light Sleep: Off
    Unified Video Decoder Medium Grain Clock Gating: Off
    Video Compression Engine Medium Grain Clock Gating: Off
    Host Data Path Light Sleep: Off
    Host Data Path Medium Grain Clock Gating: Off
    Digital Right Management Medium Grain Clock Gating: Off
    Digital Right Management Light Sleep: Off
    Rom Medium Grain Clock Gating: Off
    Data Fabric Medium Grain Clock Gating: Off

uvd    disabled
vce    disabled
power level 4    sclk: 49656 vddc: 3800

 


Tags:

enable, amdgpu, linux, grub_cmdline_linux_default, quot, splash, cik_support, si_support, radeon, dpm,

Latest Articles

  • Linux Ubuntu Wifi Disabled Only Works When Laptop Plugged Into Wall AC Power
  • CentOS 6 impossible to compile a newer libguestfs
  • chroot
  • How To Get Started on Ubuntu with gpt-2 OpenAI Text Prediction
  • Remove cloud-init in your VM
  • QEMU-KVM KVM Command Line Practical Guide
  • Linux How To Change NIC Name to eth0 instead of enps33 or enp0s25
  • virt-resize: error: libguestfs error: could not create appliance through libvirt.
  • Asterisk Does Not Retry When Authentication Fails
  • Linux Debian Ubuntu How To Install PEPPER Faster and Latest Adobe Flash Player in Firefox
  • How To Speed Up Linux Ubuntu and Debian Based Computers By Improving CPU Performance and Changing the CPU Governor
  • Convert data or file to base64 on a single line
  • Linux Mint Ubuntu Debian radeon slow 2D performance issues radeon_dp_aux_transfer_native: 158 callbacks suppressed
  • mdadm: super0.90 cannot open /dev/sdb1: Device or resource busy mdadm: /dev/sdb1 is not suitable for this array.
  • How To Install NextCloud on Centos 7 and Centos 8
  • AH01630: client denied by server configuration:
  • ERROR: Could not find a version that satisfies the requirement PIL (from versions: none) ERROR: No matching distribution found for PIL
  • ZTE Camera Cannot Work unable to connect to camera. Camera has been disabled becaue of security policies or is being used by other apps
  • QEMU KVM how to boot off a physical CD/DVD/BDROM Drive
  • How To Install OpenProject on Centos 7 Step-by-Step Guide