Weird behavior with AMD 3400G hybrid dual display setup

I was running with AMD 2200G and RX580 for 2 years, recently I upgraded my CPU to AMD 3400G which should have a better integrated graphic card.

When I ran alacritty from the display that connected to RX580, it works fine, as soon as I move the window to the display that is connected to the HDMI port on the motherboard, it became super slow.

I manage to debug with glxinfo and glxgears.

When the glxgears window on RX580 display it gets 60fps, on integrated display, it drops to 1FPS exactly, perfectly 1FPS.

Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
1260 frames in 5.8 seconds = 216.140 FPS
5 frames in 5.0 seconds = 1.000 FPS
6 frames in 6.0 seconds = 1.000 FPS
5 frames in 5.0 seconds = 1.000 FPS
X connection to :1 broken (explicit kill or server shutdown).

The next weird thing is that most X-based programs work fine on the integrated display, alacritty fails because it uses GPU acceleration, but gnome-terminal works fine.

I googled a lot, but it seems that I’m the first lucky guy to run into this.

I’m running 5.11.19-1-MANJARO GNOME and all drivers are pretty ok, anyone has any idea how to debug this problem?