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

  • 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
  • Ubuntu Debian Linux Cannot Install Wine Solution - wine1.6 : Depends: wine1.6-i386 (= 1:1.6.2-0ubuntu14.2) but it is not installable wine1.4 : Depends: wine1.6 but it is not going to be installed
  • How To Install python 3.4 3.5 and up on Linux with wine - Working Solution
  • using Xvfb on virtual remote ssh server to have X graphical programs work
  • ssh Received disconnect from port 22:2: Too many authentication failures
  • named bind errors - DNSKEY: unable to find a DNSKEY which verifies the DNSKEY RRset and also matches a trusted key for '.'
  • OpenVZ vs LXC DIR mode poor security in LXC
  • httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/php.conf: Cannot load modules/libphp5.so into server: /lib64/libresolv.so.2: symbol __h_errno, version GLIBC_PRIVATE not defined in file libc.s