Issues with system being sluggish with medium system load or when 4k monitor is connected

Hello everyone,

I have been a Manjaro user for many years now and never encountered similar issues. I can’t really figure out what is going on, so I hope that someone here might be able to help me out.

I have recently obtained a Thinkpad X1 Extreme with an i9-9880H @ 2.30GHz (listed as 16 cores), 32 GB memory and an NVidia GeForce GTX 1650, so I would consider this a really powerful setup. Nonetheless, I am sometimes experiencing issues once the CPU load increases slightly. For example, PyCharm becomes extremely sluggish, and when I push the Windows-key, it takes a few seconds until Gnome shows me the overview. I notice that this issue seems to become more noticeable when I connect an external 4k monitor.

I suspect that my GPU is not set up correctly, or that there might be issues with OpenGL. I previously used a laptop without dedicated GPU and PyCharm ran way smoother, but I am not sure how to verify those things. I don’t mind my GPU running permanently if this means an increases performance. The GPU drivers definitely seem to be installed:

mhwd -li       INT ✘ 
> Installed PCI configs:
                  NAME               VERSION          FREEDRIVER           TYPE
video-hybrid-intel-nvidia-prime            2020.11.30               false            PCI
     video-modesetting            2020.01.13                true            PCI

and it seems like OpenGL is fine too:

glxinfo                                                                                          ✔ 
name of display: :1
display: :1  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4

I would appreciate any comments. Maybe my expectations are just to high or I should try LXDE.
Thanks a lot!