11 Replies Latest reply on Dec 4, 2016 2:06 PM by thearchitect

    AMDGPU 16.40 ubuntu radeon install fail

    kanick

      AMDGPU-Pro Driver Version 16.40 for Ubuntu 16.04

      Trying to install this driver on completely fresh install of Ubuntu 16.10.  Scripts fails as follows:

       

      mike@game:~/Downloads/amdgpu-pro-16.40-348864$ sudo ./amdgpu-pro-install

      [sudo] password for mike:

      tee: /etc/aptsources.list.d/amdgpu-pro.list: No such file or directory deb [ trusted=yes ] file:/var/opt/amdgpu-pro-local/ ./

      mike@game:~/Downloads/amdgpu-pro-16.40-348864$

       

      I'm quite stuck having reinstalled (with and without live updates) Ubuntu and retrying the install from different directories and using GUI and terminal.  I have a peer who reports that he simply extracted the driver package and ran the script... (he is also on U16.10) so I'm quite unclear on how to complete this.  Thanks for any help.

        • Re: AMDGPU 16.40 ubuntu radeon install fail
          alturigo

          Looks like a mistake in the installation script. It is missing a slash: /etc/apt/sources.list.d/amdgpu-pro.list

          • Re: AMDGPU 16.40 ubuntu radeon install fail
            kanick

            i agree with your observation.  in the script below, how might one edit it to correct the problem?

             

            #!/bin/bash

            #

             

            set -e

             

            REPOSITORY="/var/opt/amdgpu-pro-local"

             

            usage() {

                cat <<END_USAGE

            Usage: $PROG [options...]

             

            Options:

              -h|--help  display this help message

              --px      PX platform support

             

              Unless the -h|--help option is given, 'apt-get' options may be present.

             

            END_USAGE

            }

             

            function stderr() {

                cat - 1>&2

            }

             

            function os_release() {

                [[ -r  /etc/os-release ]] && . /etc/os-release

             

                case "$ID" in

                ubuntu)

                    PACKAGES="amdgpu-pro amdgpu-pro-lib32 amdgpu-pro-dkms"

                    ;;

                steamos)

                    PACKAGES="amdgpu-pro-driver amdgpu-pro-lib32 "`

                        `"glx-alternative-amdgpu-pro amdgpu-pro-dkms"

                    ;;

                *)

                    echo "Unsupported OS" | stderr

                    exit 1

                    ;;

                esac

            }

             

            function source_list() {

                local dir etc sourceparts

             

                eval $(apt-config shell dir Dir)

                eval $(apt-config shell etc Dir::Etc)

                eval $(apt-config shell sourceparts Dir::Etc::sourceparts)

             

                echo ${dir}${etc}${sourceparts}/amdgpu-pro.list

            }

             

            function amdgpu_pro_install() {

                local src=$(cd ${0%/*} && pwd -P)

                local index=$src/Packages

             

                amdgpu_pro_uninstall $@

             

                if [[ -r $index ]]; then

                    $SUDO mkdir -p $REPOSITORY && $SUDO cp -af $src/* $_

                    $SUDO ln -s $_/$PROG $SBIN/${PROG%-*}-uninstall

             

                    echo "deb [ trusted=yes ] file:$REPOSITORY/ ./" | \

                        $SUDO tee $(source_list)

                    $SUDO apt-get update ||:

                    $SUDO apt-get $@ install $PACKAGES

                fi

            }

             

            function amdgpu_pro_uninstall() {

                local p

                local installed=()

             

                [[ -r "$(source_list)" ]] || return 0

             

                for p in $(cat $REPOSITORY/Packages | awk '{

                    if ($1 == "Package:")

                        p = $2;

                    else if ($1 == "Architecture:")

                        print p ":" $2

                }')

                do

                    if dpkg -s $p >/dev/null 2>&1; then

                        installed+=($p)

                    fi

                done

             

                if [[ ${#installed[@]} -ne 0 ]]; then

                    $SUDO apt-get $@ remove --purge ${installed[@]}

                fi

             

                $SUDO rm -rf $SBIN/${PROG%-*}-uninstall $(source_list) $REPOSITORY

                $SUDO apt-get update ||:

            }

             

            PROG=${0##*/}

            SUDO=$([[ $(id -u) -ne 0 ]] && echo "sudo" ||:)

            SBIN="/usr/bin"

            os_release

             

            while (($#))

            do

                case "$1" in

                -h|--help)

                    usage

                    exit 0

                    ;;

                --px)

                    PACKAGES="$PACKAGES xserver-xorg-video-modesetting-amdgpu-pro"

                    shift

                    ;;

                *)

                    ARGS+="$1 "

                    shift

                    ;;

                esac

            done

             

            set -- $ARGS

            amdgpu_pro_${0##*-} $@

            • Re: AMDGPU 16.40 ubuntu radeon install fail
              kanick

              i have given up and will install win7.

              • Re: AMDGPU 16.40 ubuntu radeon install fail
                happyfiower

                Maybe you can help me?? I get the same kinda problem.

                • Re: AMDGPU 16.40 ubuntu radeon install fail
                  thearchitect

                  Yeaap, this is a bug in amdgpu-pro-install that will affect any linux platform. For shame, AMD, for shame. They botched the final echo path in their source_list() function by forgetting to add slashes (lol, noobs). Edit line 69 as follows:

                   

                  function source_list() {

                    local dir etc sourceparts

                   

                    eval $(apt-config shell dir Dir)

                    eval $(apt-config shell etc Dir::Etc)

                    eval $(apt-config shell sourceparts Dir::Etc::sourceparts)

                   

                    echo ${dir}/${etc}/${sourceparts}/amdgpu-pro.list

                  }

                   

                   

                  If you had a previous failed installation you'll need to remove the symbolic link it created to avoid aforementioned "file exists" problem:

                   

                  rm /usr/bin/amdgpu-pro-uninstall

                   

                  Depending on your platform you may need to add i386 to the list of architectures that dpkg accepts

                   

                  sudo dpkg --add-architecture i386

                   

                  After that I was able to install without any errors on my system, a Debian derivative.

                   

                  Linux parrot 4.8.0-parrot-amd64 #1 SMP Debian 4.8.5-2parrot0 (2016-11-20) x86_64 GNU/Linux

                  • Re: AMDGPU 16.40 ubuntu radeon install fail
                    happyfiower

                    Thanks!!!

                     

                    I installed 16.04 too, and chance the script and it workt!!!!!!:DD