Announcement

Collapse
No announcement yet.

Using AMDGPU with HAWAII on Debian 8

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using AMDGPU with HAWAII on Debian 8

    I've been attempting to use the AMDGPU driver for my Radeon 390 (Hawaii) board with Debian 8 for a couple of months without any success. I've been using kernels that I've compiled myself through this time in the 4.7 and later 4.8 branches. I did once try the 4.7.0 kernel available in backports, but it didn't work for me.

    As I sit today, I have a 4.8.15 kernel built with both AMDGPU and CIK support toggled on. I've added the amdgpu.exp_hw_support=1 kernel parameter to my grub config just in case. If I create an xorg.conf and specify a device section with the driver set to amdgpu, X fails to start. If I change the driver to radeon, X starts successfully. If I blacklist the radeon module and set the driver to amdgpu, X fails to start albeit with a different resulting Xorg.0.log.

    I'm using the latest stable firmware-linux-nonfree for the firmware binaries. The firmware seems to be in the correct place and working since the radeon driver loads without incident. I tried the firmware-amd-graphics package in backports, but it causes my system to give me an entirely black screen (sometimes with a blinking caret) when X starts even if using the radeon driver.

    I'm committed to trying to get this working on Debian 8 and without resorting to make install madness. I want to use packages from the official repos, though I don't mind building kernels myself.

    Any help is appreciated. Thanks guys.

    Kernel compile options:
    Code:
    CONFIG_DRM_RADEON=m
    CONFIG_DRM_RADEON_USERPTR=y
    CONFIG_DRM_AMDGPU=m
    CONFIG_DRM_AMDGPU_CIK=y
    CONFIG_DRM_AMDGPU_USERPTR=y
    # CONFIG_DRM_AMDGPU_GART_DEBUGFS is not set
    CONFIG_DRM_AMD_POWERPLAY=y
    The xorg.conf I'm using:
    Code:
    Section "Device"
        Identifier "AMDGPU"
        Driver "amdgpu"
        Option "AccelMethod" "glamor"
        Option "DRI" "3"
    EndSection
    The resulting Xorg.0.log:
    Code:
    [    42.253] 
    X.Org X Server 1.16.4
    Release Date: 2014-12-20
    [    42.253] X Protocol Version 11, Revision 0
    [    42.253] Build Operating System: Linux 3.16.0-4-amd64 x86_64 Debian
    [    42.253] Current Operating System: Linux tim-d 4.8.15-gms-amd64 #1 SMP Sun Dec 18 15:44:39 CST 2016 x86_64
    [    42.253] Kernel command line: BOOT_IMAGE=/vmlinuz-4.8.15-gms-amd64 root=UUID=040779d6-a0cf-4347-b8f9-fd60afc500f4 ro quiet amdgpu.exp_hw_support=1
    [    42.253] Build Date: 11 February 2015  12:32:02AM
    [    42.253] xorg-server 2:1.16.4-1 (http://www.debian.org/support) 
    [    42.253] Current version of pixman: 0.32.6
    [    42.253]     Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
    [    42.253] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    [    42.253] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Dec 22 23:13:58 2016
    [    42.254] (==) Using config file: "/etc/X11/xorg.conf"
    [    42.254] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
    [    42.254] (==) No Layout section.  Using the first Screen section.
    [    42.254] (==) No screen section available. Using defaults.
    [    42.254] (**) |-->Screen "Default Screen Section" (0)
    [    42.254] (**) |   |-->Monitor "<default monitor>"
    [    42.254] (==) No device specified for screen "Default Screen Section".
        Using the first device section listed.
    [    42.254] (**) |   |-->Device "AMDGPU"
    [    42.254] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
    [    42.254] (==) Automatically adding devices
    [    42.254] (==) Automatically enabling devices
    [    42.254] (==) Automatically adding GPU devices
    [    42.254] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
    [    42.254]     Entry deleted from font path.
    [    42.254] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/100dpi/:unscaled,
        /usr/share/fonts/X11/75dpi/:unscaled,
        /usr/share/fonts/X11/Type1,
        /usr/share/fonts/X11/100dpi,
        /usr/share/fonts/X11/75dpi,
        built-ins
    [    42.254] (==) ModulePath set to "/usr/lib/xorg/modules"
    [    42.254] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
    [    42.254] (II) Loader magic: 0x562927591d80
    [    42.254] (II) Module ABI versions:
    [    42.254]     X.Org ANSI C Emulation: 0.4
    [    42.254]     X.Org Video Driver: 18.0
    [    42.254]     X.Org XInput driver : 21.0
    [    42.254]     X.Org Server Extension : 8.0
    [    42.255] (II) xfree86: Adding drm device (/dev/dri/card0)
    [    42.257] (--) PCI:*(0:1:0:0) 1002:67b1:174b:e324 rev 128, Mem @ 0xc0000000/268435456, 0xd0000000/8388608, 0xfea00000/262144, I/O @ 0x0000e000/256, BIOS @ 0x????????/131072
    [    42.257] (II) LoadModule: "glx"
    [    42.257] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
    [    42.258] (II) Module glx: vendor="X.Org Foundation"
    [    42.258]     compiled for 1.16.4, module version = 1.0.0
    [    42.258]     ABI class: X.Org Server Extension, version 8.0
    [    42.258] (==) AIGLX enabled
    [    42.258] (II) LoadModule: "amdgpu"
    [    42.258] (II) Loading /usr/lib/xorg/modules/drivers/amdgpu_drv.so
    [    42.258] (II) Module amdgpu: vendor="X.Org Foundation"
    [    42.258]     compiled for 1.16.4, module version = 1.1.2
    [    42.258]     Module class: X.Org Video Driver
    [    42.258]     ABI class: X.Org Video Driver, version 18.0
    [    42.258] (II) AMDGPU: Driver for AMD Radeon chipsets: OLAND, OLAND, OLAND, OLAND,
        OLAND, OLAND, OLAND, OLAND, OLAND, OLAND, OLAND, OLAND, OLAND, OLAND,
        OLAND, OLAND, OLAND, HAINAN, HAINAN, HAINAN, HAINAN, HAINAN, HAINAN,
        TAHITI, TAHITI, TAHITI, TAHITI, TAHITI, TAHITI, TAHITI, TAHITI,
        TAHITI, TAHITI, TAHITI, TAHITI, TAHITI, PITCAIRN, PITCAIRN, PITCAIRN,
        PITCAIRN, PITCAIRN, PITCAIRN, PITCAIRN, PITCAIRN, PITCAIRN, PITCAIRN,
        PITCAIRN, PITCAIRN, VERDE, VERDE, VERDE, VERDE, VERDE, VERDE, VERDE,
        VERDE, VERDE, VERDE, VERDE, VERDE, VERDE, VERDE, VERDE, VERDE, VERDE,
        VERDE, VERDE, VERDE, VERDE, VERDE, VERDE, VERDE, PITCAIRN, BONAIRE,
        BONAIRE, BONAIRE, BONAIRE, BONAIRE, BONAIRE, BONAIRE, BONAIRE,
        BONAIRE, BONAIRE, BONAIRE, KABINI, KABINI, KABINI, KABINI, KABINI,
        KABINI, KABINI, KABINI, KABINI, KABINI, KABINI, KABINI, KABINI,
        KABINI, KABINI, KABINI, MULLINS, MULLINS, MULLINS, MULLINS, MULLINS,
        MULLINS, MULLINS, MULLINS, MULLINS, MULLINS, MULLINS, MULLINS,
        MULLINS, MULLINS, MULLINS, MULLINS, KAVERI, KAVERI, KAVERI, KAVERI,
        KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI,
        KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI,
        KAVERI, KAVERI, HAWAII, HAWAII, HAWAII, HAWAII, HAWAII, HAWAII,
        HAWAII, HAWAII, HAWAII, HAWAII, HAWAII, HAWAII, TOPAZ, TOPAZ, TOPAZ,
        TOPAZ, TOPAZ, TONGA, TONGA, TONGA, TONGA, TONGA, TONGA, TONGA, TONGA,
        TONGA, CARRIZO, CARRIZO, CARRIZO, CARRIZO, CARRIZO, FIJI, STONEY,
        POLARIS11, POLARIS11, POLARIS11, POLARIS11, POLARIS11, POLARIS11,
        POLARIS11, POLARIS11, POLARIS11, POLARIS10, POLARIS10, POLARIS10,
        POLARIS10, POLARIS10, POLARIS10, POLARIS10, POLARIS10, POLARIS10,
        POLARIS10, POLARIS10
    [    42.260] (++) using VT number 7
    
    [    42.260] (II) [KMS] Kernel modesetting enabled.
    [    42.260] (EE) AMDGPU(0): amdgpu_device_initialize failed
    [    42.261] (II) [KMS] Kernel modesetting enabled.
    [    42.261] (EE) AMDGPU(G0): amdgpu_device_initialize failed
    [    42.261] (II) [KMS] Kernel modesetting enabled.
    [    42.261] (EE) AMDGPU(1): amdgpu_device_initialize failed
    [    42.261] (EE) Screen 0 deleted because of no matching config section.
    [    42.261] (II) UnloadModule: "amdgpu"
    [    42.261] (EE) Screen 0 deleted because of no matching config section.
    [    42.261] (II) UnloadModule: "amdgpu"
    [    42.261] (EE) Device(s) detected, but none match those in the config file.
    [    42.261] (EE) 
    Fatal server error:
    [    42.261] (EE) no screens found(EE) 
    [    42.262] (EE) 
    Please consult the The X.Org Foundation support 
         at http://wiki.x.org
     for help. 
    [    42.262] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
    [    42.262] (EE) 
    [    42.270] (EE) Server terminated with error (1). Closing log file.
    The resulting Xorg.0.log if the radeon module is blacklisted (the error at the end changes a bit):
    Code:
    [    41.192] 
    X.Org X Server 1.16.4
    Release Date: 2014-12-20
    [    41.192] X Protocol Version 11, Revision 0
    [    41.192] Build Operating System: Linux 3.16.0-4-amd64 x86_64 Debian
    [    41.192] Current Operating System: Linux tim-d 4.8.15-gms-amd64 #1 SMP Sun Dec 18 15:44:39 CST 2016 x86_64
    [    41.192] Kernel command line: BOOT_IMAGE=/vmlinuz-4.8.15-gms-amd64 root=UUID=040779d6-a0cf-4347-b8f9-fd60afc500f4 ro quiet amdgpu.exp_hw_support=1
    [    41.192] Build Date: 11 February 2015  12:32:02AM
    [    41.192] xorg-server 2:1.16.4-1 (http://www.debian.org/support) 
    [    41.192] Current version of pixman: 0.32.6
    [    41.192]     Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
    [    41.192] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    [    41.192] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Dec 22 23:16:30 2016
    [    41.193] (==) Using config file: "/etc/X11/xorg.conf"
    [    41.193] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
    [    41.193] (==) No Layout section.  Using the first Screen section.
    [    41.193] (==) No screen section available. Using defaults.
    [    41.193] (**) |-->Screen "Default Screen Section" (0)
    [    41.193] (**) |   |-->Monitor "<default monitor>"
    [    41.193] (==) No device specified for screen "Default Screen Section".
        Using the first device section listed.
    [    41.193] (**) |   |-->Device "AMDGPU"
    [    41.193] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
    [    41.193] (==) Automatically adding devices
    [    41.193] (==) Automatically enabling devices
    [    41.193] (==) Automatically adding GPU devices
    [    41.193] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
    [    41.193]     Entry deleted from font path.
    [    41.193] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/100dpi/:unscaled,
        /usr/share/fonts/X11/75dpi/:unscaled,
        /usr/share/fonts/X11/Type1,
        /usr/share/fonts/X11/100dpi,
        /usr/share/fonts/X11/75dpi,
        built-ins
    [    41.193] (==) ModulePath set to "/usr/lib/xorg/modules"
    [    41.193] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
    [    41.193] (II) Loader magic: 0x56166c441d80
    [    41.193] (II) Module ABI versions:
    [    41.193]     X.Org ANSI C Emulation: 0.4
    [    41.193]     X.Org Video Driver: 18.0
    [    41.193]     X.Org XInput driver : 21.0
    [    41.193]     X.Org Server Extension : 8.0
    [    41.195] (--) PCI:*(0:1:0:0) 1002:67b1:174b:e324 rev 128, Mem @ 0xc0000000/268435456, 0xd0000000/8388608, 0xfea00000/262144, I/O @ 0x0000e000/256, BIOS @ 0x????????/131072
    [    41.195] (II) LoadModule: "glx"
    [    41.195] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
    [    41.196] (II) Module glx: vendor="X.Org Foundation"
    [    41.196]     compiled for 1.16.4, module version = 1.0.0
    [    41.196]     ABI class: X.Org Server Extension, version 8.0
    [    41.196] (==) AIGLX enabled
    [    41.196] (II) LoadModule: "amdgpu"
    [    41.196] (II) Loading /usr/lib/xorg/modules/drivers/amdgpu_drv.so
    [    41.196] (II) Module amdgpu: vendor="X.Org Foundation"
    [    41.196]     compiled for 1.16.4, module version = 1.1.2
    [    41.196]     Module class: X.Org Video Driver
    [    41.196]     ABI class: X.Org Video Driver, version 18.0
    [    41.196] (II) AMDGPU: Driver for AMD Radeon chipsets: OLAND, OLAND, OLAND, OLAND,
        OLAND, OLAND, OLAND, OLAND, OLAND, OLAND, OLAND, OLAND, OLAND, OLAND,
        OLAND, OLAND, OLAND, HAINAN, HAINAN, HAINAN, HAINAN, HAINAN, HAINAN,
        TAHITI, TAHITI, TAHITI, TAHITI, TAHITI, TAHITI, TAHITI, TAHITI,
        TAHITI, TAHITI, TAHITI, TAHITI, TAHITI, PITCAIRN, PITCAIRN, PITCAIRN,
        PITCAIRN, PITCAIRN, PITCAIRN, PITCAIRN, PITCAIRN, PITCAIRN, PITCAIRN,
        PITCAIRN, PITCAIRN, VERDE, VERDE, VERDE, VERDE, VERDE, VERDE, VERDE,
        VERDE, VERDE, VERDE, VERDE, VERDE, VERDE, VERDE, VERDE, VERDE, VERDE,
        VERDE, VERDE, VERDE, VERDE, VERDE, VERDE, VERDE, PITCAIRN, BONAIRE,
        BONAIRE, BONAIRE, BONAIRE, BONAIRE, BONAIRE, BONAIRE, BONAIRE,
        BONAIRE, BONAIRE, BONAIRE, KABINI, KABINI, KABINI, KABINI, KABINI,
        KABINI, KABINI, KABINI, KABINI, KABINI, KABINI, KABINI, KABINI,
        KABINI, KABINI, KABINI, MULLINS, MULLINS, MULLINS, MULLINS, MULLINS,
        MULLINS, MULLINS, MULLINS, MULLINS, MULLINS, MULLINS, MULLINS,
        MULLINS, MULLINS, MULLINS, MULLINS, KAVERI, KAVERI, KAVERI, KAVERI,
        KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI,
        KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI,
        KAVERI, KAVERI, HAWAII, HAWAII, HAWAII, HAWAII, HAWAII, HAWAII,
        HAWAII, HAWAII, HAWAII, HAWAII, HAWAII, HAWAII, TOPAZ, TOPAZ, TOPAZ,
        TOPAZ, TOPAZ, TONGA, TONGA, TONGA, TONGA, TONGA, TONGA, TONGA, TONGA,
        TONGA, CARRIZO, CARRIZO, CARRIZO, CARRIZO, CARRIZO, FIJI, STONEY,
        POLARIS11, POLARIS11, POLARIS11, POLARIS11, POLARIS11, POLARIS11,
        POLARIS11, POLARIS11, POLARIS11, POLARIS10, POLARIS10, POLARIS10,
        POLARIS10, POLARIS10, POLARIS10, POLARIS10, POLARIS10, POLARIS10,
        POLARIS10, POLARIS10
    [    41.197] (++) using VT number 7
    
    [    41.199] (II) [KMS] drm report modesetting isn't supported.
    [    41.199] (EE) Screen 0 deleted because of no matching config section.
    [    41.199] (II) UnloadModule: "amdgpu"
    [    41.199] (EE) Device(s) detected, but none match those in the config file.
    [    41.199] (EE) 
    Fatal server error:
    [    41.199] (EE) no screens found(EE) 
    [    41.199] (EE) 
    Please consult the The X.Org Foundation support 
         at http://wiki.x.org
     for help. 
    [    41.199] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
    [    41.199] (EE) 
    [    41.200] (EE) Server terminated with error (1). Closing log file.

  • #2
    AFAICS your amdgpu kernel driver module is not initializing correctly.

    In the first X log the amdgpu X driver is trying to connect to the radeon driver (which won't work) and in the second case the amdgpu X driver is not able to connect to any KMS driver.

    Can you please pastebin your dmesg output from the second case (where radeon is blacklisted) ? That will let us figure out why amdgpu is not initializing correctly.

    Comment


    • #3
      Here is the output from dmesg when using the radeon driver:
      http://pastebin.com/BSUdPrv8

      And here is the output from dmseg when trying to use the amdgpu driver with the radeon driver blacklisted:
      http://pastebin.com/iGmTSD2p

      I noticed that in both cases it complains that it can't load some of the firmware blobs. I find that odd though since the radeon driver seems to work despite it. I tried copying the firmware blobs from being uppercase to lowercase in case it was a case sensitivity issue, but it resulted in the same error messages. I'm out of my league here.

      Listing of my /lib/firmware/radeon directory:
      http://pastebin.com/6tN0QxPr

      Comment


      • #4
        Originally posted by Particle View Post
        I'm using the latest stable firmware-linux-nonfree for the firmware binaries. The firmware seems to be in the correct place and working since the radeon driver loads without incident. I tried the firmware-amd-graphics package in backports, but it causes my system to give me an entirely black screen (sometimes with a blinking caret) when X starts even if using the radeon driver.
        If i reading this right, you are using firmwares for 3.16 kernel and expect those should work with 4.8?

        Set of firmwares should match the kernel... so i guess probably not right set of firmwares you are trying to use.
        Last edited by dungeon; 12-23-2016, 01:58 PM.

        Comment


        • #5
          Good catch, dungeon. I didn't realize that the firmware binaries were kernel version sensitive. To be honest, I don't fully understand how the driver stack works in Linux, and this has been quite a learning experience. I fetched the latest firmware binaries from the kernel.org git and placed them in /lib/firmware/radeon and restarted with radeon blacklisted and amdgpu specified as the driver in xorg.conf. The AMDGPU driver loaded successfully at that point. Thanks guys. I hope this helps someone in the future.

          --- Notes for future readers in my same position ---

          I backed up the firmware I already had by copying it to a backup folder:
          mkdir ~/Backup/Firmware
          cd ~/Backup/Firmware
          cp /lib/firmware/radeon/* .

          I fetched the latest available firmware by issuing:
          mkdir ~/Downloads/Firmware
          cd ~/Downloads/Firmware
          git clone https://kernel.googlesource.com/pub/...x-firmware.git .

          I then copied the firmware over my existing firmware:
          sudo cp HAWAII*.bin /lib/firmware/radeon/
          sudo cp hawaii*.bin /lib/firmware/radeon/

          There were firmware binaries for both upper and lower cases, so I copied them both. I didn't already have the lower case versions, but the upper case ones were overwritten.

          Finally, I blacklisted the radeon driver:
          echo "blacklist radeon" | sudo tee /etc/modprobe.d/radeon.conf

          And set my /etc/X11/xorg.conf to use the amdgpu driver again:
          Section "Device"
          Identifier "AMDGPU"
          Driver "amdgpu"
          Option "AccelMethod" "glamor"
          Option "DRI" "3"
          EndSection

          Comment


          • #6
            It's not so much "kernel version sensitive" as "age sensitive"... a distro with an old kernel tends to also have old microcode files, but when you install a newer kernel it might be looking for newer microcode files that weren't available before.

            Comment


            • #7
              Originally posted by Particle View Post
              Good catch, dungeon. I didn't realize that the firmware binaries were kernel version sensitive.
              Yeah, just make sure set of firmware versions are in sync with kernel version... not just for AMD hardware, you might have issues with other hardware potentinaly too.

              Debian separates all firmwares and microcodes out of kernel package into different set of packages and didn't even install them by default without question, so that is why everything is separated. For example on my AMD APU and my MB, i install AMD GPU firmwares (in case you use opensource driver of course), Realtek firmwares and also newer AMD's CPU microcode... for someone else those might be different, etc... So if you do something unofficial or on your own there, keep that in mind

              And yeah, some of those firmware packages are renamed recently and of course for jessie-backports repo too... but you already spotted that, OK
              Last edited by dungeon; 12-24-2016, 06:42 AM.

              Comment

              Working...
              X