I've recently bought an Acer Nitro 5 laptop with AMD Ryzen 7 4800H and GTX 1650Ti,that came with Windows 10 as its operating system, and installed Ubuntu 20.04.3 to it, in a dual boot configuration. Although Windows runs fine, Ubuntu keeps lagging its UI once some interruption is done, being it a mouse interaction, such as a window closing; a sound adjustment through Youtube or, as it is the most frequently problem, when the keyboard is typed rapidily, and the screen response freezes for 2 to 3 seconds before showing what was typed. This is really weird, considering that CPU usage is most times below 50%, the dedicated GPU is only used agressively when playing games, and that this lagging problem occurs even when RAM is really low.
Initially, the laptop only had drivers for AMD's integrated graphics, and I can't recall if this happened then, but even when I removed NVIDIA proprietary drivers, the problem kept happening, so I don't think it is related to graphical drivers especifically. I've also disable all GNOME extensions, and the lagging/freezing didn't vanished.
This problem is not just annoying, as it doesn't seem to make sense at all. At my previous laptop, a Toshiba Sattelite with Intel i3-4000M and Intel HD Graphics 4600, Ubuntu 20.04.2 never presented such behavior. The only problem I had was with laptop lid being closed and the system not booting back up, that was solved by downgrading the kernel used. For my recent Acer Nitro 5, this error happened as well, but it has been kinda solved, as now suspension after lid is closed happens only 20, 30 seconds after being closed (probably "solved" through adding noveau.modeset=0 to GRUB configurations). I've also changed display manager from gdm3 to lightdm, trying to solve the lid's problem, and it didn't impact in UI I/O-related lagging, that kept happening.
And yes, I have downloaded a previous kernel, the one which I was using in my previous laptop, but when I tried to load it through GRUB, I only get a black screen that prints the NVMe's partition in which Ubuntu is installed, followed by something like / clean, / files, where ni are some probably some numbers related to how this partition is filled.
So, to summarize, Ubuntu is being a mess in this laptop.I don't really know what could be happening, besides some possibilities that I didn't find a way to solve till now, such as some I/O messed up configuration; some GUI rendering blocking related to I/O; Ubuntu 20.04.3 kernel (5.11.0-27+) trashing the whole system performance; or this Ubuntu release incompability with the CPU.
I hope someone who gone through similar problems could help me out, given that, for problematic lid behavior on laptops at least, the problem is quite frequent, given the amount of questions in forums related to it, primarly happening in Ubuntu's most recent releases. But, unfortunately, the solutions given for lagging/freezing I/O-related UI issues in these forums didn't solve the ones presented in my Ubuntu installation.