Ubuntu 18.04.1 LTS R9 390X amdgpu guide / testing summary











up vote
-1
down vote

favorite












I cannot get amdgpu to load as driver. Instead it always loads radeon.



Setup:




  • Ubuntu 18.04.1 LTS


  • i7-5830k


  • 2x R9 390X











share|improve this question









New contributor




audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    -1
    down vote

    favorite












    I cannot get amdgpu to load as driver. Instead it always loads radeon.



    Setup:




    • Ubuntu 18.04.1 LTS


    • i7-5830k


    • 2x R9 390X











    share|improve this question









    New contributor




    audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      -1
      down vote

      favorite









      up vote
      -1
      down vote

      favorite











      I cannot get amdgpu to load as driver. Instead it always loads radeon.



      Setup:




      • Ubuntu 18.04.1 LTS


      • i7-5830k


      • 2x R9 390X











      share|improve this question









      New contributor




      audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I cannot get amdgpu to load as driver. Instead it always loads radeon.



      Setup:




      • Ubuntu 18.04.1 LTS


      • i7-5830k


      • 2x R9 390X








      18.04 radeon amdgpu mesa vulkan






      share|improve this question









      New contributor




      audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited Nov 20 at 8:45





















      New contributor




      audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Nov 20 at 8:27









      audacus

      11




      11




      New contributor




      audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          This is a guide and a testing summary for enabling amdgpu (instead of radeon) on Ubuntu 18.04.1 having a R9 390X installed and trying out various kernels.



          After reading this and reading/watching Level1Techs guide and many others I finally managed to get amdgpu loaded instead of radeon. The following steps show how to accomplish that.



          Problem



          I want to play games on Linux via DXVK using an open source driver (not amdgpu-pro). Since DXVK only works with the amdgpu driver I had to get rid of Ubuntu loading radeon all the time.



          My setup




          • Ubuntu 18.04.1 LTS


          • i7-5830k


          • R9 390X (actually 2, but should not matter)



          How to



          I. Newest drivers



          @NOT-TESTED: It should also work with the official drivers delivered with the Ubuntu 18.04.1 installation. If you do not want to run unofficial drivers skip this step.



          @NOTE: Download newer unofficial drivers from PPA to get better performance in DXVK. May be unstable.



          Install the latest driver from https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers:



          sudo add-apt-repository ppa:oibaf/graphics-drivers
          sudo apt update && sudo apt dist-upgrade
          sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386


          @ERROR unmet dependencies: install original drivers first:



          sudo add-apt-repository --remove ppa:oibaf/graphics-drivers
          sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386


          @ATTENTION: Ensure you do not have another graphics driver PPA like ppa:paulo-miguel-dias/mesa added. You may check his Mesa drivers out: STABLE or UNSTABLE



          @ERROR general error due to PPA: Purge graphic driver PPA(s) to fall back to original drivers and clean up:



          sudo apt install ppa-purge && aptitude
          sudo ppa-purge ppa:oibaf/graphics-drivers
          sudo apt autoremove && sudo apt autoclean


          You may start over.



          II. Xorg configuration



          Create a xorg configuration file that will be loaded automatically on boot:



          /usr/share/X11/xorg.conf.d/<nr-name>.conf for example 42-amdgpu.conf



          #/usr/share/X11/xorg.conf.d/42-amdgpu.conf
          Section "Device"
          Identifier "AMDGPU"
          Driver "amdgpu"
          Option "AccelMethod" "glamor"
          Option "DRI" "3"
          EndSection


          @NOT-TESTED: Add this to the already existing 10-amdgpu.conf file. May gets overwritten by driver installation.



          @OPTION: You can also add this to /etc/X11/xorg.conf or /etc/xorg.conf.



          III. Blacklist radeon



          Create a blacklist file with the module that shall be blacklisted:



          /etc/modprobe.d/<name>.conf for example blacklist-radeon.conf



          #/etc/modprobe.d/blacklist-radeon.conf
          blacklist radeon


          @OPTION: It is possible to use already existing blacklist.conf files by just appending blacklist radeon somewhere.



          IV. GRUB configuration



          Add or change these parameters in the grub configuration /etc/default/grub:



          #/etc/default/grub
          ...
          GRUB_GFXMODE=1920x1080x32
          GRUB_CMDLINE_LINUX_DEFAULT="radeon.si_support=0 radeon.cik_support=0 amdgpu.si_support=1 amdgpu.cik_support=1 amdgpu.dc=1 amdgpu.dpm=1 amdgpu.modeset=1"
          ...


          @DID-NOT-WORK: I made a copy of the 40_custom file in /etc/grub.d/. It did not work when I placed it in 40_amdgpu instead of /etc/default/grub. (see the /etc/grub.d/README for more info)



          V. Update GRUB and the initial ramdisk



          Let the changes above take affect:



          sudo update-grub2 && sudo update-initramfs -u -k all


          and



          reboot


          VI. Verify



          To verify that the amdgpu driver has loaded and is in use, execute one or more of the following commands:



          lsmod | egrep 'Used|amdgpu'

          sudo lspci -v | grep amdgpu -B 19

          sudo lshw -c video | grep amdgpu -B 10 -A 1


          Run a Vulkan test application:



          sudo apt install vulkan-utils


          and



          vulkan-smoketest


          VII.I Testing with newer kernels (as of 2018-11-19)



          I tried to boot various kernels after the steps above.



          To install other kernels I used the Ubuntu Kernel Update Utility:



          sudo apt-add-repository -y ppa:teejee2008/ppa
          sudo apt update
          sudo apt install ukuu


          Here is the summary of my testing:



          4.15.0 WORKING! Ubuntu 18.04.1 LTS default kernel



          4.17.5 WORKING! kernel used in this video



          4.18.0 WORKAROUND! current default kernel of Ubuntu 19.10 Disco (2018-11-19)



          4.18.15 WORKAROUND! latest 4.18.x kernel with changes to amdgpu



          4.18.19 WORKAROUND! latest 4.18.x kernel



          4.19 FAILURE! blackscreen or dmesg:



          [drm:dm_pp_get_static_clocks [amdgpu]] *ERROR* DM_PPLIB: invalid powerlevel state: 0!


          4.19.1 FAILURE! blackscreen or dmesg:



          drm:dm_pp_get_static_clocks [amdgpu]] *ERROR* DM_PPLIB: invalid powerlevel state: 0!
          drm:amdgpu_vce_ring_test_ring [amdgpu]] *ERROR* amdgpu: ring 12 test failed
          drm:amdgpu_device_init.cold.28 [amdgpu]] *ERROR* hw_init of IP block <vce_v2_0> failed -110
          amdgpu 0000:05:00.0: amdgpu_device_ip_init failed
          amdgpu 0000:05:00.0: Fatal error during GPU init


          4.19.2 FAILURE! dmesg:



          Direct firmware load for amdgpu/hawaii_mc.bin failed with error -2



          @NOTE: I did not investigate more on the errors of the 4.19.x kernels yet.



          VII.II Workaround



          4.18-4.18.19



          To get 4.18 kernels working:





          1. Backup your current firmware files:



            sudo cp -r /lib/firmware /lib/firmware-$(uname -r)



          2. Download the linux-firmware of Ubuntu 19.10 Disco (current Disco version uses kernel 4.18.0 as default) from https://packages.ubuntu.com/en/disco/linux-firmware or:



            wget http://archive.ubuntu.com/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.176.tar.gz



          3. Extract files:



            tar -xvzf linux-firmware_1.76.tar.gz



          4. Go into the new firmware direcotry:



            cd linux-firmware



          5. Install the firmware:



            sudo make install



          6. Reboot



            reboot







          share|improve this answer










          New contributor




          audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.


















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });






            audacus is a new contributor. Be nice, and check out our Code of Conduct.










             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1094443%2fubuntu-18-04-1-lts-r9-390x-amdgpu-guide-testing-summary%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            This is a guide and a testing summary for enabling amdgpu (instead of radeon) on Ubuntu 18.04.1 having a R9 390X installed and trying out various kernels.



            After reading this and reading/watching Level1Techs guide and many others I finally managed to get amdgpu loaded instead of radeon. The following steps show how to accomplish that.



            Problem



            I want to play games on Linux via DXVK using an open source driver (not amdgpu-pro). Since DXVK only works with the amdgpu driver I had to get rid of Ubuntu loading radeon all the time.



            My setup




            • Ubuntu 18.04.1 LTS


            • i7-5830k


            • R9 390X (actually 2, but should not matter)



            How to



            I. Newest drivers



            @NOT-TESTED: It should also work with the official drivers delivered with the Ubuntu 18.04.1 installation. If you do not want to run unofficial drivers skip this step.



            @NOTE: Download newer unofficial drivers from PPA to get better performance in DXVK. May be unstable.



            Install the latest driver from https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers:



            sudo add-apt-repository ppa:oibaf/graphics-drivers
            sudo apt update && sudo apt dist-upgrade
            sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386


            @ERROR unmet dependencies: install original drivers first:



            sudo add-apt-repository --remove ppa:oibaf/graphics-drivers
            sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386


            @ATTENTION: Ensure you do not have another graphics driver PPA like ppa:paulo-miguel-dias/mesa added. You may check his Mesa drivers out: STABLE or UNSTABLE



            @ERROR general error due to PPA: Purge graphic driver PPA(s) to fall back to original drivers and clean up:



            sudo apt install ppa-purge && aptitude
            sudo ppa-purge ppa:oibaf/graphics-drivers
            sudo apt autoremove && sudo apt autoclean


            You may start over.



            II. Xorg configuration



            Create a xorg configuration file that will be loaded automatically on boot:



            /usr/share/X11/xorg.conf.d/<nr-name>.conf for example 42-amdgpu.conf



            #/usr/share/X11/xorg.conf.d/42-amdgpu.conf
            Section "Device"
            Identifier "AMDGPU"
            Driver "amdgpu"
            Option "AccelMethod" "glamor"
            Option "DRI" "3"
            EndSection


            @NOT-TESTED: Add this to the already existing 10-amdgpu.conf file. May gets overwritten by driver installation.



            @OPTION: You can also add this to /etc/X11/xorg.conf or /etc/xorg.conf.



            III. Blacklist radeon



            Create a blacklist file with the module that shall be blacklisted:



            /etc/modprobe.d/<name>.conf for example blacklist-radeon.conf



            #/etc/modprobe.d/blacklist-radeon.conf
            blacklist radeon


            @OPTION: It is possible to use already existing blacklist.conf files by just appending blacklist radeon somewhere.



            IV. GRUB configuration



            Add or change these parameters in the grub configuration /etc/default/grub:



            #/etc/default/grub
            ...
            GRUB_GFXMODE=1920x1080x32
            GRUB_CMDLINE_LINUX_DEFAULT="radeon.si_support=0 radeon.cik_support=0 amdgpu.si_support=1 amdgpu.cik_support=1 amdgpu.dc=1 amdgpu.dpm=1 amdgpu.modeset=1"
            ...


            @DID-NOT-WORK: I made a copy of the 40_custom file in /etc/grub.d/. It did not work when I placed it in 40_amdgpu instead of /etc/default/grub. (see the /etc/grub.d/README for more info)



            V. Update GRUB and the initial ramdisk



            Let the changes above take affect:



            sudo update-grub2 && sudo update-initramfs -u -k all


            and



            reboot


            VI. Verify



            To verify that the amdgpu driver has loaded and is in use, execute one or more of the following commands:



            lsmod | egrep 'Used|amdgpu'

            sudo lspci -v | grep amdgpu -B 19

            sudo lshw -c video | grep amdgpu -B 10 -A 1


            Run a Vulkan test application:



            sudo apt install vulkan-utils


            and



            vulkan-smoketest


            VII.I Testing with newer kernels (as of 2018-11-19)



            I tried to boot various kernels after the steps above.



            To install other kernels I used the Ubuntu Kernel Update Utility:



            sudo apt-add-repository -y ppa:teejee2008/ppa
            sudo apt update
            sudo apt install ukuu


            Here is the summary of my testing:



            4.15.0 WORKING! Ubuntu 18.04.1 LTS default kernel



            4.17.5 WORKING! kernel used in this video



            4.18.0 WORKAROUND! current default kernel of Ubuntu 19.10 Disco (2018-11-19)



            4.18.15 WORKAROUND! latest 4.18.x kernel with changes to amdgpu



            4.18.19 WORKAROUND! latest 4.18.x kernel



            4.19 FAILURE! blackscreen or dmesg:



            [drm:dm_pp_get_static_clocks [amdgpu]] *ERROR* DM_PPLIB: invalid powerlevel state: 0!


            4.19.1 FAILURE! blackscreen or dmesg:



            drm:dm_pp_get_static_clocks [amdgpu]] *ERROR* DM_PPLIB: invalid powerlevel state: 0!
            drm:amdgpu_vce_ring_test_ring [amdgpu]] *ERROR* amdgpu: ring 12 test failed
            drm:amdgpu_device_init.cold.28 [amdgpu]] *ERROR* hw_init of IP block <vce_v2_0> failed -110
            amdgpu 0000:05:00.0: amdgpu_device_ip_init failed
            amdgpu 0000:05:00.0: Fatal error during GPU init


            4.19.2 FAILURE! dmesg:



            Direct firmware load for amdgpu/hawaii_mc.bin failed with error -2



            @NOTE: I did not investigate more on the errors of the 4.19.x kernels yet.



            VII.II Workaround



            4.18-4.18.19



            To get 4.18 kernels working:





            1. Backup your current firmware files:



              sudo cp -r /lib/firmware /lib/firmware-$(uname -r)



            2. Download the linux-firmware of Ubuntu 19.10 Disco (current Disco version uses kernel 4.18.0 as default) from https://packages.ubuntu.com/en/disco/linux-firmware or:



              wget http://archive.ubuntu.com/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.176.tar.gz



            3. Extract files:



              tar -xvzf linux-firmware_1.76.tar.gz



            4. Go into the new firmware direcotry:



              cd linux-firmware



            5. Install the firmware:



              sudo make install



            6. Reboot



              reboot







            share|improve this answer










            New contributor




            audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.






















              up vote
              0
              down vote













              This is a guide and a testing summary for enabling amdgpu (instead of radeon) on Ubuntu 18.04.1 having a R9 390X installed and trying out various kernels.



              After reading this and reading/watching Level1Techs guide and many others I finally managed to get amdgpu loaded instead of radeon. The following steps show how to accomplish that.



              Problem



              I want to play games on Linux via DXVK using an open source driver (not amdgpu-pro). Since DXVK only works with the amdgpu driver I had to get rid of Ubuntu loading radeon all the time.



              My setup




              • Ubuntu 18.04.1 LTS


              • i7-5830k


              • R9 390X (actually 2, but should not matter)



              How to



              I. Newest drivers



              @NOT-TESTED: It should also work with the official drivers delivered with the Ubuntu 18.04.1 installation. If you do not want to run unofficial drivers skip this step.



              @NOTE: Download newer unofficial drivers from PPA to get better performance in DXVK. May be unstable.



              Install the latest driver from https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers:



              sudo add-apt-repository ppa:oibaf/graphics-drivers
              sudo apt update && sudo apt dist-upgrade
              sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386


              @ERROR unmet dependencies: install original drivers first:



              sudo add-apt-repository --remove ppa:oibaf/graphics-drivers
              sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386


              @ATTENTION: Ensure you do not have another graphics driver PPA like ppa:paulo-miguel-dias/mesa added. You may check his Mesa drivers out: STABLE or UNSTABLE



              @ERROR general error due to PPA: Purge graphic driver PPA(s) to fall back to original drivers and clean up:



              sudo apt install ppa-purge && aptitude
              sudo ppa-purge ppa:oibaf/graphics-drivers
              sudo apt autoremove && sudo apt autoclean


              You may start over.



              II. Xorg configuration



              Create a xorg configuration file that will be loaded automatically on boot:



              /usr/share/X11/xorg.conf.d/<nr-name>.conf for example 42-amdgpu.conf



              #/usr/share/X11/xorg.conf.d/42-amdgpu.conf
              Section "Device"
              Identifier "AMDGPU"
              Driver "amdgpu"
              Option "AccelMethod" "glamor"
              Option "DRI" "3"
              EndSection


              @NOT-TESTED: Add this to the already existing 10-amdgpu.conf file. May gets overwritten by driver installation.



              @OPTION: You can also add this to /etc/X11/xorg.conf or /etc/xorg.conf.



              III. Blacklist radeon



              Create a blacklist file with the module that shall be blacklisted:



              /etc/modprobe.d/<name>.conf for example blacklist-radeon.conf



              #/etc/modprobe.d/blacklist-radeon.conf
              blacklist radeon


              @OPTION: It is possible to use already existing blacklist.conf files by just appending blacklist radeon somewhere.



              IV. GRUB configuration



              Add or change these parameters in the grub configuration /etc/default/grub:



              #/etc/default/grub
              ...
              GRUB_GFXMODE=1920x1080x32
              GRUB_CMDLINE_LINUX_DEFAULT="radeon.si_support=0 radeon.cik_support=0 amdgpu.si_support=1 amdgpu.cik_support=1 amdgpu.dc=1 amdgpu.dpm=1 amdgpu.modeset=1"
              ...


              @DID-NOT-WORK: I made a copy of the 40_custom file in /etc/grub.d/. It did not work when I placed it in 40_amdgpu instead of /etc/default/grub. (see the /etc/grub.d/README for more info)



              V. Update GRUB and the initial ramdisk



              Let the changes above take affect:



              sudo update-grub2 && sudo update-initramfs -u -k all


              and



              reboot


              VI. Verify



              To verify that the amdgpu driver has loaded and is in use, execute one or more of the following commands:



              lsmod | egrep 'Used|amdgpu'

              sudo lspci -v | grep amdgpu -B 19

              sudo lshw -c video | grep amdgpu -B 10 -A 1


              Run a Vulkan test application:



              sudo apt install vulkan-utils


              and



              vulkan-smoketest


              VII.I Testing with newer kernels (as of 2018-11-19)



              I tried to boot various kernels after the steps above.



              To install other kernels I used the Ubuntu Kernel Update Utility:



              sudo apt-add-repository -y ppa:teejee2008/ppa
              sudo apt update
              sudo apt install ukuu


              Here is the summary of my testing:



              4.15.0 WORKING! Ubuntu 18.04.1 LTS default kernel



              4.17.5 WORKING! kernel used in this video



              4.18.0 WORKAROUND! current default kernel of Ubuntu 19.10 Disco (2018-11-19)



              4.18.15 WORKAROUND! latest 4.18.x kernel with changes to amdgpu



              4.18.19 WORKAROUND! latest 4.18.x kernel



              4.19 FAILURE! blackscreen or dmesg:



              [drm:dm_pp_get_static_clocks [amdgpu]] *ERROR* DM_PPLIB: invalid powerlevel state: 0!


              4.19.1 FAILURE! blackscreen or dmesg:



              drm:dm_pp_get_static_clocks [amdgpu]] *ERROR* DM_PPLIB: invalid powerlevel state: 0!
              drm:amdgpu_vce_ring_test_ring [amdgpu]] *ERROR* amdgpu: ring 12 test failed
              drm:amdgpu_device_init.cold.28 [amdgpu]] *ERROR* hw_init of IP block <vce_v2_0> failed -110
              amdgpu 0000:05:00.0: amdgpu_device_ip_init failed
              amdgpu 0000:05:00.0: Fatal error during GPU init


              4.19.2 FAILURE! dmesg:



              Direct firmware load for amdgpu/hawaii_mc.bin failed with error -2



              @NOTE: I did not investigate more on the errors of the 4.19.x kernels yet.



              VII.II Workaround



              4.18-4.18.19



              To get 4.18 kernels working:





              1. Backup your current firmware files:



                sudo cp -r /lib/firmware /lib/firmware-$(uname -r)



              2. Download the linux-firmware of Ubuntu 19.10 Disco (current Disco version uses kernel 4.18.0 as default) from https://packages.ubuntu.com/en/disco/linux-firmware or:



                wget http://archive.ubuntu.com/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.176.tar.gz



              3. Extract files:



                tar -xvzf linux-firmware_1.76.tar.gz



              4. Go into the new firmware direcotry:



                cd linux-firmware



              5. Install the firmware:



                sudo make install



              6. Reboot



                reboot







              share|improve this answer










              New contributor




              audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.




















                up vote
                0
                down vote










                up vote
                0
                down vote









                This is a guide and a testing summary for enabling amdgpu (instead of radeon) on Ubuntu 18.04.1 having a R9 390X installed and trying out various kernels.



                After reading this and reading/watching Level1Techs guide and many others I finally managed to get amdgpu loaded instead of radeon. The following steps show how to accomplish that.



                Problem



                I want to play games on Linux via DXVK using an open source driver (not amdgpu-pro). Since DXVK only works with the amdgpu driver I had to get rid of Ubuntu loading radeon all the time.



                My setup




                • Ubuntu 18.04.1 LTS


                • i7-5830k


                • R9 390X (actually 2, but should not matter)



                How to



                I. Newest drivers



                @NOT-TESTED: It should also work with the official drivers delivered with the Ubuntu 18.04.1 installation. If you do not want to run unofficial drivers skip this step.



                @NOTE: Download newer unofficial drivers from PPA to get better performance in DXVK. May be unstable.



                Install the latest driver from https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers:



                sudo add-apt-repository ppa:oibaf/graphics-drivers
                sudo apt update && sudo apt dist-upgrade
                sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386


                @ERROR unmet dependencies: install original drivers first:



                sudo add-apt-repository --remove ppa:oibaf/graphics-drivers
                sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386


                @ATTENTION: Ensure you do not have another graphics driver PPA like ppa:paulo-miguel-dias/mesa added. You may check his Mesa drivers out: STABLE or UNSTABLE



                @ERROR general error due to PPA: Purge graphic driver PPA(s) to fall back to original drivers and clean up:



                sudo apt install ppa-purge && aptitude
                sudo ppa-purge ppa:oibaf/graphics-drivers
                sudo apt autoremove && sudo apt autoclean


                You may start over.



                II. Xorg configuration



                Create a xorg configuration file that will be loaded automatically on boot:



                /usr/share/X11/xorg.conf.d/<nr-name>.conf for example 42-amdgpu.conf



                #/usr/share/X11/xorg.conf.d/42-amdgpu.conf
                Section "Device"
                Identifier "AMDGPU"
                Driver "amdgpu"
                Option "AccelMethod" "glamor"
                Option "DRI" "3"
                EndSection


                @NOT-TESTED: Add this to the already existing 10-amdgpu.conf file. May gets overwritten by driver installation.



                @OPTION: You can also add this to /etc/X11/xorg.conf or /etc/xorg.conf.



                III. Blacklist radeon



                Create a blacklist file with the module that shall be blacklisted:



                /etc/modprobe.d/<name>.conf for example blacklist-radeon.conf



                #/etc/modprobe.d/blacklist-radeon.conf
                blacklist radeon


                @OPTION: It is possible to use already existing blacklist.conf files by just appending blacklist radeon somewhere.



                IV. GRUB configuration



                Add or change these parameters in the grub configuration /etc/default/grub:



                #/etc/default/grub
                ...
                GRUB_GFXMODE=1920x1080x32
                GRUB_CMDLINE_LINUX_DEFAULT="radeon.si_support=0 radeon.cik_support=0 amdgpu.si_support=1 amdgpu.cik_support=1 amdgpu.dc=1 amdgpu.dpm=1 amdgpu.modeset=1"
                ...


                @DID-NOT-WORK: I made a copy of the 40_custom file in /etc/grub.d/. It did not work when I placed it in 40_amdgpu instead of /etc/default/grub. (see the /etc/grub.d/README for more info)



                V. Update GRUB and the initial ramdisk



                Let the changes above take affect:



                sudo update-grub2 && sudo update-initramfs -u -k all


                and



                reboot


                VI. Verify



                To verify that the amdgpu driver has loaded and is in use, execute one or more of the following commands:



                lsmod | egrep 'Used|amdgpu'

                sudo lspci -v | grep amdgpu -B 19

                sudo lshw -c video | grep amdgpu -B 10 -A 1


                Run a Vulkan test application:



                sudo apt install vulkan-utils


                and



                vulkan-smoketest


                VII.I Testing with newer kernels (as of 2018-11-19)



                I tried to boot various kernels after the steps above.



                To install other kernels I used the Ubuntu Kernel Update Utility:



                sudo apt-add-repository -y ppa:teejee2008/ppa
                sudo apt update
                sudo apt install ukuu


                Here is the summary of my testing:



                4.15.0 WORKING! Ubuntu 18.04.1 LTS default kernel



                4.17.5 WORKING! kernel used in this video



                4.18.0 WORKAROUND! current default kernel of Ubuntu 19.10 Disco (2018-11-19)



                4.18.15 WORKAROUND! latest 4.18.x kernel with changes to amdgpu



                4.18.19 WORKAROUND! latest 4.18.x kernel



                4.19 FAILURE! blackscreen or dmesg:



                [drm:dm_pp_get_static_clocks [amdgpu]] *ERROR* DM_PPLIB: invalid powerlevel state: 0!


                4.19.1 FAILURE! blackscreen or dmesg:



                drm:dm_pp_get_static_clocks [amdgpu]] *ERROR* DM_PPLIB: invalid powerlevel state: 0!
                drm:amdgpu_vce_ring_test_ring [amdgpu]] *ERROR* amdgpu: ring 12 test failed
                drm:amdgpu_device_init.cold.28 [amdgpu]] *ERROR* hw_init of IP block <vce_v2_0> failed -110
                amdgpu 0000:05:00.0: amdgpu_device_ip_init failed
                amdgpu 0000:05:00.0: Fatal error during GPU init


                4.19.2 FAILURE! dmesg:



                Direct firmware load for amdgpu/hawaii_mc.bin failed with error -2



                @NOTE: I did not investigate more on the errors of the 4.19.x kernels yet.



                VII.II Workaround



                4.18-4.18.19



                To get 4.18 kernels working:





                1. Backup your current firmware files:



                  sudo cp -r /lib/firmware /lib/firmware-$(uname -r)



                2. Download the linux-firmware of Ubuntu 19.10 Disco (current Disco version uses kernel 4.18.0 as default) from https://packages.ubuntu.com/en/disco/linux-firmware or:



                  wget http://archive.ubuntu.com/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.176.tar.gz



                3. Extract files:



                  tar -xvzf linux-firmware_1.76.tar.gz



                4. Go into the new firmware direcotry:



                  cd linux-firmware



                5. Install the firmware:



                  sudo make install



                6. Reboot



                  reboot







                share|improve this answer










                New contributor




                audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                This is a guide and a testing summary for enabling amdgpu (instead of radeon) on Ubuntu 18.04.1 having a R9 390X installed and trying out various kernels.



                After reading this and reading/watching Level1Techs guide and many others I finally managed to get amdgpu loaded instead of radeon. The following steps show how to accomplish that.



                Problem



                I want to play games on Linux via DXVK using an open source driver (not amdgpu-pro). Since DXVK only works with the amdgpu driver I had to get rid of Ubuntu loading radeon all the time.



                My setup




                • Ubuntu 18.04.1 LTS


                • i7-5830k


                • R9 390X (actually 2, but should not matter)



                How to



                I. Newest drivers



                @NOT-TESTED: It should also work with the official drivers delivered with the Ubuntu 18.04.1 installation. If you do not want to run unofficial drivers skip this step.



                @NOTE: Download newer unofficial drivers from PPA to get better performance in DXVK. May be unstable.



                Install the latest driver from https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers:



                sudo add-apt-repository ppa:oibaf/graphics-drivers
                sudo apt update && sudo apt dist-upgrade
                sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386


                @ERROR unmet dependencies: install original drivers first:



                sudo add-apt-repository --remove ppa:oibaf/graphics-drivers
                sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386


                @ATTENTION: Ensure you do not have another graphics driver PPA like ppa:paulo-miguel-dias/mesa added. You may check his Mesa drivers out: STABLE or UNSTABLE



                @ERROR general error due to PPA: Purge graphic driver PPA(s) to fall back to original drivers and clean up:



                sudo apt install ppa-purge && aptitude
                sudo ppa-purge ppa:oibaf/graphics-drivers
                sudo apt autoremove && sudo apt autoclean


                You may start over.



                II. Xorg configuration



                Create a xorg configuration file that will be loaded automatically on boot:



                /usr/share/X11/xorg.conf.d/<nr-name>.conf for example 42-amdgpu.conf



                #/usr/share/X11/xorg.conf.d/42-amdgpu.conf
                Section "Device"
                Identifier "AMDGPU"
                Driver "amdgpu"
                Option "AccelMethod" "glamor"
                Option "DRI" "3"
                EndSection


                @NOT-TESTED: Add this to the already existing 10-amdgpu.conf file. May gets overwritten by driver installation.



                @OPTION: You can also add this to /etc/X11/xorg.conf or /etc/xorg.conf.



                III. Blacklist radeon



                Create a blacklist file with the module that shall be blacklisted:



                /etc/modprobe.d/<name>.conf for example blacklist-radeon.conf



                #/etc/modprobe.d/blacklist-radeon.conf
                blacklist radeon


                @OPTION: It is possible to use already existing blacklist.conf files by just appending blacklist radeon somewhere.



                IV. GRUB configuration



                Add or change these parameters in the grub configuration /etc/default/grub:



                #/etc/default/grub
                ...
                GRUB_GFXMODE=1920x1080x32
                GRUB_CMDLINE_LINUX_DEFAULT="radeon.si_support=0 radeon.cik_support=0 amdgpu.si_support=1 amdgpu.cik_support=1 amdgpu.dc=1 amdgpu.dpm=1 amdgpu.modeset=1"
                ...


                @DID-NOT-WORK: I made a copy of the 40_custom file in /etc/grub.d/. It did not work when I placed it in 40_amdgpu instead of /etc/default/grub. (see the /etc/grub.d/README for more info)



                V. Update GRUB and the initial ramdisk



                Let the changes above take affect:



                sudo update-grub2 && sudo update-initramfs -u -k all


                and



                reboot


                VI. Verify



                To verify that the amdgpu driver has loaded and is in use, execute one or more of the following commands:



                lsmod | egrep 'Used|amdgpu'

                sudo lspci -v | grep amdgpu -B 19

                sudo lshw -c video | grep amdgpu -B 10 -A 1


                Run a Vulkan test application:



                sudo apt install vulkan-utils


                and



                vulkan-smoketest


                VII.I Testing with newer kernels (as of 2018-11-19)



                I tried to boot various kernels after the steps above.



                To install other kernels I used the Ubuntu Kernel Update Utility:



                sudo apt-add-repository -y ppa:teejee2008/ppa
                sudo apt update
                sudo apt install ukuu


                Here is the summary of my testing:



                4.15.0 WORKING! Ubuntu 18.04.1 LTS default kernel



                4.17.5 WORKING! kernel used in this video



                4.18.0 WORKAROUND! current default kernel of Ubuntu 19.10 Disco (2018-11-19)



                4.18.15 WORKAROUND! latest 4.18.x kernel with changes to amdgpu



                4.18.19 WORKAROUND! latest 4.18.x kernel



                4.19 FAILURE! blackscreen or dmesg:



                [drm:dm_pp_get_static_clocks [amdgpu]] *ERROR* DM_PPLIB: invalid powerlevel state: 0!


                4.19.1 FAILURE! blackscreen or dmesg:



                drm:dm_pp_get_static_clocks [amdgpu]] *ERROR* DM_PPLIB: invalid powerlevel state: 0!
                drm:amdgpu_vce_ring_test_ring [amdgpu]] *ERROR* amdgpu: ring 12 test failed
                drm:amdgpu_device_init.cold.28 [amdgpu]] *ERROR* hw_init of IP block <vce_v2_0> failed -110
                amdgpu 0000:05:00.0: amdgpu_device_ip_init failed
                amdgpu 0000:05:00.0: Fatal error during GPU init


                4.19.2 FAILURE! dmesg:



                Direct firmware load for amdgpu/hawaii_mc.bin failed with error -2



                @NOTE: I did not investigate more on the errors of the 4.19.x kernels yet.



                VII.II Workaround



                4.18-4.18.19



                To get 4.18 kernels working:





                1. Backup your current firmware files:



                  sudo cp -r /lib/firmware /lib/firmware-$(uname -r)



                2. Download the linux-firmware of Ubuntu 19.10 Disco (current Disco version uses kernel 4.18.0 as default) from https://packages.ubuntu.com/en/disco/linux-firmware or:



                  wget http://archive.ubuntu.com/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.176.tar.gz



                3. Extract files:



                  tar -xvzf linux-firmware_1.76.tar.gz



                4. Go into the new firmware direcotry:



                  cd linux-firmware



                5. Install the firmware:



                  sudo make install



                6. Reboot



                  reboot








                share|improve this answer










                New contributor




                audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer








                edited Nov 20 at 16:15





















                New contributor




                audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered Nov 20 at 8:43









                audacus

                11




                11




                New contributor




                audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                audacus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






















                    audacus is a new contributor. Be nice, and check out our Code of Conduct.










                     

                    draft saved


                    draft discarded


















                    audacus is a new contributor. Be nice, and check out our Code of Conduct.













                    audacus is a new contributor. Be nice, and check out our Code of Conduct.












                    audacus is a new contributor. Be nice, and check out our Code of Conduct.















                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1094443%2fubuntu-18-04-1-lts-r9-390x-amdgpu-guide-testing-summary%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                    Mangá

                    Eduardo VII do Reino Unido