I wanted to install my AMD Radeon R5 graphic card (integrated in the laptop) drivers of my Lenovo laptop in Ubuntu 18.04 for a modelling program inside ROS. My Ubuntu wasn't detecting the graphic card in Software & Updates -> Additional Drivers, as Windows 10 does. I checked the AMD page and I didn't found the compatible drivers for my case.
So, after making a quick research, I've followed the steps in this answer. Note I'm new to Ubuntu and I typed the following commands in a desktop Terminal, but I think I should have configured first "nomodoset" mode.
sudo apt update && \
sudo apt upgrade && \
sudo apt autoremove && \
sudo apt autoclean
sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt-get update
sudo apt upgrade
sudo apt install --reinstall xserver-xorg-video-amdgpu
sudo dpkg --configure -a
sudo dpkg-reconfigure gdm3 ubuntu-session xserver-xorg-video-amdgpu
sudo apt-get install mesa-vdpau-drivers
mpv --hwdec=vdpau yourvideofile
The problem now is that the mouse is not working (neither the touchpad) in the desktop, but yes in the login page. After a while, the screen turns black and it gets blocked, which seems a common error (example).
Even if I've tried troubleshooting on my own, I haven't succeeded to solve previous issues, which makes my Ubuntu useless. I've perfomed the following tests in Recovery Mode (following this answer):
Simply uninstall the installed packages
sudo apt remove xserver-xorg-video-amdgpu
sudo apt remove mesa-vdpau-drivers
sudo apt update && \
sudo apt upgrade && \
sudo apt autoremove && \
sudo apt autoclean
Editing GRUB (tutorial)
Add "nomodeset" after clicking "E" in the "*Ubuntu" OS selection
sudo update-grub
Try to reset Ubuntu to default settings (not working in Recovery Mode)
dconf reset -f /
Any help to revert the previous installation is welcome.
Thanks!