For some time I had been having a problem with my laptop freezing upon an attempt to resume after suspending.
The Symptoms:
- Immediately upon coming out of suspend, the desktop would be displayed in the same state as when suspend was entered. (It should instead have shown the unlock screen and prompt.)
- The mouse pointer was frozen. Could not move it with either the touchpad, an external bluetooth mouse, or by tapping the touchscreen.
- The keyboard was unresponsive. None of the keys did anything, including Alt+F2.
- The only remedy was to long-press the power button to force a restart.
My System:
- Ubuntu MATE 22.04.5 LTS
- Lenovo IdeaPad Flex 3 11ADA05
- Kernel: 6.8.0-52-generic
- MATE 1.26.0
- WM: Metacity (Marco)
- CPU: AMD Athlon Silver 3050e (4) @ 1.400GHz
- GPU: AMD ATI Radeon Vega Series / Radeon Vega Mobile Series
- RAM: 1455MiB / 3299MiB
Background:
The freezing didn't happen with every suspend/resume cycle. With some experimentation, I eventually surmised that the problem was probably caused by a network race condition, or perhaps a deadlock. I use both Proton VPN and pCloud. By quitting those two apps before suspending, the incidence of freezing was vastly reduced, but not entirely eliminated.
The Solution:
So I began searching for settings to tweak and finally found this one in dconf editor:
As you can see, I disabled the "Use default value" switch ("False") and selected "True" as my new custom value.
This completely solved the problem. In the week since I made this change, I've not had even a single episode of freezing, and I'm running Proton VPN and pCloud simultaneously, and I don't have to quit either one before suspending.
A web search turned up no information about this setting, so I don't know why MATE provides it. Evidently they know that some hardware/software combinations have issues with suspend/resume in connection with the network.
So far, I haven't noticed any ill effects or drawbacks to disconnecting the Network Manager before suspending. The only potential drawback I can see is that it might interfere with Wake-On-LAN. But my laptop is only connected via WiFi, not ethernet. And since the WiFi radio gets powered down during suspend, this setting doesn't really change anything. I've found that both Proton VPN and pCloud reconnect normally upon resume, as do any open tabs in Brave browser.