Is your laptop laggy for 20-30 seconds after waking up from sleep? Try this fix!

Guide

Ok, so this has been driving me nuts since I switched to Omarchy. Any time I wake my laptop after a few hours of sleep, it would be laggy and slow for 20-30 seconds before truly resuming full speed. I thought it had something to do with my Lunar Lake processor not being fully supported in Linux but I was wrong.

I sent Codex on an investigation mission and it turns out the culprit is the plocate database indexing, which happens on a schedule. If the database update is scheduled to happen while the laptop is sleeping, it will trigger the update right when it wakes up, causing the lag .

Before I submit a PR, I would like others experiencing the same issue to test the following fix to make sure I'm not the only one affected by this. What the fix does is to run the plocate DB update when the laptop runs on AC. For some reason, the lag is not as bad on AC.

Here's the commands you can run in your terminal to test the fix:

sudo install -d /etc/systemd/system/plocate-updatedb.service.d
printf '%s\n' '[Unit]' 'ConditionACPower=true' | sudo tee /etc/systemd/system/plocate-updatedb.service.d/ac-only-conf
sudo systemctl daemon-reload
sudo systemctl restart plocate-updatedb.timer

There is still a bit of lag but it's really not as bad. Write a comment below if that fixes the issue for you too!

Posted Mar 6, 2026, 5:31 PM UTC · edited

713
Loading comments…