Android Emulator lagging after update

After a system and android-studio update the android emulator started being unusable due to lags and freezes.
I tried emulators with API 35 and API 36, emulator tool is version 36. Seems to be somehow related to my AMD gpu or to the fact that the emulator might not be able to use wayland and tries X.