currently out of date as of September 2022, needs a fresh update
TLDR; edit the amdgpu-install script to add pop as supported debian distribution, comment out check for linux-modules-extra-[versions] since they're provided by linux-modules [per Jeremy Solle of System_76], then run with --no-dkms
3 EDIT: 4 things need to be done.
Problem 1) Pop!_OS not valid install target "Unsupported OS: /etc/os-release ID 'pop'" The issue as of now is that amdgpu-install doesnt recognize pop as a valid installation candidate. Solution is to add pop as a valid target in the amdgpu-install script.
As of Dec 1 2021: change line 241 to include
| pop
Pop!_OS will then be seen as a valid installation target
Problem 2) No linux-modules-extra package available
Package linux-modules-extra-5.15.5-76051505-generic is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'linux-modules-extra-5.15.5-76051505-generic' has no installation candidate
Pop!_OS includes what would normally be in linux modules extra in the standard linux-modules package, then marks linux-modules-extra as a virtual package [see https://twitter.com/jeremy_soller/status/1466061665548390402?s=20]
Solution is to remove the check by commenting out lines 360-363 Edit:the lines may have moved depending on version. You're loocking for the lines referencing linux-modules-extra
Problem 3) DPKG error kernel package not supported
ERROR (dkms apport): kernel package linux-headers-5.15.5-76051505-generic is not supported
Error! Bad return status for module build on kernel: 5.15.5-76051505-generic (amd64)
Consult /var/lib/dkms/amdgpu/5.11.32-1337797/build/make.log for more information.
dpkg: error processing package amdgpu-dkms (--configure):
installed amdgpu-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
amdgpu-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
DKMS isnt needed, we're better off using the in kernel module already provided
Solution is to use the --no-dkms flag at install time
EDIT:2022/03/24
Problem 4) With the move from Hirsute to Impish, some repositories are no longer available and will cause the building of rocm-llvm to fail. The missing packages on a near vanilla instalation are: python-six, libgcc-5 series and libgcc-7 series.
As of now the best way to deal with this is to add the legacy LTS repositories from 18.04 LTS which have all missing packages to our apt sources and proceed that way.
Edit /etc/apt/sources.list
and add the line
deb http://mirrors.kernel.org/ubuntu bionic main universe
sudo apt update
Then run the command as before with the relevant options.
As always this isnt fully sanctioned and supported by AMD or System76 (creators and maintaners of Pop!_OS) but being as this is downstream Debian/Ubuntu you shouldn't run into any issues. No guarentees, but it seems fine on my end.
I'm able to recreate the issue on the latest release, looking into it
Edit: installing
python-six
fixes the python issuesEdit2: installing the recommended multilibs is good practice anyway, but more relevant is running
amdgpu-install --dryrun --no-dkms --no-32
which returns the expected commands from the script so we can find out where things are going wrong.the update we can ignore, the soft linking at the end the same.
then it's a question of which of the 3 (if not all? is causing the issue)
Edit3: after testing the 3, the first 2 proceed with no issue, the problems are related to the hip runtime. Something I notice when looking at the package data (apt info [package name]) is that it requires rocm-core, rocm-language-runtime, rocminfo and hip-rocclr. Of the first 3, 2 weren't installed and the fourth is a virtual package.
installing the 3rd (rocminfo) didnt fix the issues.
looking further into it, the package does exist in the ubuntu repoes....
https://packages.ubuntu.com/impish/amd64/libstdc++5/download
. (notice this is the lib, not the dev headers.)and checking
/etc/apt/sources.list.d/system.sources
forimpish
to includemain
anduniverse
both are thereFurther down the rabbit hole, the dev headers are only available in the bionic beaver release repos of ubuntu, see https://packages.ubuntu.com/bionic/amd64/libstdc++-5-dev/download
therefore as a workaround, we could work with dpkg directly and do: wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-30ubuntu2_amd64.deb && sudo dpkg --install http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-30ubuntu2_amd64.deb for each of the pkgs, but that would be a miserable endeavour requiring dozens of individuals packages and their sources.
in this case I'm thinking the way to do it is to add the 18.04 LTS repository to sources.list.
this will probably error out with a "no_pubkey error" because kernel.org, debian and ubuntu aren't always upto date with sharing their keys with each other.
for the kernel.org mirror the command was sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32, but just switch out the last part with the key you're missing.
After all of the above debugging running
amdgpu-install --no-32 --no-dkms
was able to successfully install.