GNOME Shell hangs indefinitely/crashes when there's a CPU load peak and CPU frequency scaling occurs
I'm running GNOME 3.28.2 from Arch Linux on Wayland, hardware:
- Intel® Core
™️ i5-6300U CPU @ 2.40GHz - Intel® HD Graphics 520 (Skylake GT2)
- Lenovo ThinkPad X1 Yoga 1st - model 20FR
I've been constantly experiencing this issue for the entire 3.28 release, and similar ones on 3.26: when I'm using the powersave governor and there's a CPU usage peak, which triggers a sudden CPU frequency scaling (i.e. when it suddenly switches from the average 500-900MHz up to 2.9GHz), GNOME Shell hangs most of the times.
I tried to restore everything to stock settings (I erased my home - packages all stock, no AUR - no extensions, Adwaita everything) and it still hangs, though less frequently (with many extensions it hangs all the time).
The only workaround I found is to manually set the governor to performance and set the minimum frequency to a very high value, so it constantly stays around the maximum. It still hangs at times but seldom.
By it hangs I mean that video is frozen, input is frozen - including Ctrl+Alt+F# to change VT (I tried to use keyboard shortcuts to blindly open a terminal and reboot and it didn't work), however apps continue to run in the background (i.e. if the browser is playing music, it doesn't stop).
When it hangs, half of the times it hangs indefinitely, the other half it crashes and I'm brought back to GDM.
Chances it's still online and reachable through SSH are very high, so if you can tell me what to do I can SSH to it with my phone and do some troubleshooting while it's stuck.