You can then install using this method,
In order to get the drivers, you need to go to the AMD Download Page, and grab the latest version of the drivers that matches your card. The release should come in the form of a tarball. Either extract the tarball automatically with your GUI archive manager through your browser or let it download and extract it using tar from the command line.
tar -xf amdgpu-pro_*.tar.xz
A directory containing all of the necessary packages will be created based on the version of the drivers. cd into that directory.
cd amdgpu-pro-XX.XX-XXXXXX
Donāt worry about installing all of those packages individually. Thereās an installer script that will handle everything for you. Run the script as a regular user. It will ask you for your password to use sudo. If you want to be lazy, add the -y flag to answer āYesā to every question.
./amdgpu-pro-install -y
Let the script run and install all of your packages. Itāll take a bit of time, but once itās done, your system will be ready. Just restart, and you can start using your new drivers.
The makefile cannot be modified, as it is extracted by the amdgpu-install bash script, so it doesn't exist before running that script, and you can't run amdgpu-install twice without running amdgpu-uninstall first (it complains), which deletes the makefile. I did try adding --no-dkms and --pro options to install script, but neither solved the issue.
Yes, the makefile is in the source, which must then be compiled using gcc and then run as an installer.
I do not remember off the top of my head all the steps without looking them up - but I will see if I can make an outline while youa re following the advice suggested by @swarfendor437
thanks that's very generous, but to be honest i don't think adding changes to set the os name to ubuntu will work, as the script is failing before those checks are done, when it tries to look for an environment variable that doesn't exist. i have ordered a low-end NVIDIA card for $95AUD, hopefully that fixes it, will confirm when it arrives.
So confirming switching AMD for an NVIDIA card fixed the graphics issue. For the benefit of others, when I replaced the card, I was greeted by this on bootup:
But I could access tty, so proceeded to uninstall AMD gpu drivers using:
amdgpu-install --uninstall
then listed available nvidia drivers using:
apt search nvidia-driver
then using nvidia's website i checked the applicable driver version for linux 64-bit, which in my case was nvidia-driver-470, and installed it using: