I am new linux user using desktop pc with AMD Ryzen 7 3700X 8-Core Processor and AMD Radeon RX 5700, OS 5.1 Hera, Linux 5.0.0-37-generic, GTK 3.22.30.
The issue is that I cannot update my system with sudo apt update and install about 100 packages without screwing up gpu driver.
I am currently running on "fresh" elementary os install with only amd proprietary gpu driver installed from here. The system is running fine in this state. However if I run sudo apt update and sudo apt upgrade and reboot, the system becomes unusable. The mouse movement is very laggy. Watching videos on youtube was fine though.
I found out, that using lshw -c video displays that driver=amdgpu.Then I ran modinfo amdgpu and the result (in flawless lagg-less state) is filename: /lib/modules/5.0.0-37-generic/extra/amdgpu.ko.
However after I ran sudo apt upgrade the result (in laggy state) is filename: /lib/modules/5.3.0-26-generic/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko. I tried uninstalling and running install script on proprietary drivers again. At 99% progress it displays WARNING: amdgpu dkms failed for running kernel. Rebooting the system and running lshw -c video -> modinfo amdgpu shows again /lib/modules/5.3.0-26-generic/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko.
I went through basically every ubuntu amd rx 5700 article google could find. I tried moving firmware manually like here.
I installed Additional Drivers (sudo apt install software-properties-gtk software-properties-common) to check if I can switch between the drivers located in /kernel/drivers and /extra, but it says "no additional drivers" and displays nothing.
I tried to purge package with name something like libdrmamdgpu, but other packages have dependencies on it. Force purge made me unable to boot even to recovery mode.
Then I tried holding packages with new kernel, so I could update just the rest. It installed the new gpu driver anyway and did not allow me to change back. So I went back with Timeshift and tried to hold a few packages that looked like they could be the one installing the new /kernel/driver. Unfortunately I didn't know how to identify the proper packages and the new display driver was installed anyway.
I tried holding kernel version, running sudo apt upgrade, rebooting. Then I tried to install the proprietary driver again and the /kernel/driver/ was still the one being used.
I have spent approximately 30 hours trying to solve this issue. Posting this on forum is my last resort. If I wasn't running elementary os on my laptop without any issues I would have given up on this a long time ago and just went back to Windows, where the system was running great ("windows great" though).
1)Can anyone tell me how to update everything (even the kernel) and run the system with smooth gpu driver, where the mouse isn't lagging?
2)If this isn't possible, can anyone tell how to hold proper packages so the sudo apt upgrade does not change the gpu driver to /kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.
Thank you for your reply.