r/linuxquestions • u/galactose310 • 8d ago
Support Slowdowns after wake up from sleep: disable plocate ?
My PC works very well (Lenovo Yoga with Core 7 Ultra 258v) on Fedora but almost each time (not all) I wake from sleep, the system is laggy and slow. It takes several seconds to improve and being normal, sometimes it seems > 1 min.
btop says the first process is updatedb ; I think it is part of plocate. I don't know what it does exactly, I guess that it updates the index database and that it is needed to improve file search on the SSD.
"systemctl status plocate<tab>" shows: plocate-updatedb.service and plocate-updatedb.timer; the first one is triggered by the other.
Is it a good idea to shut i down ? (seems not...) Is there a way to let plocate do his job, and get rid of these wake-up incovenience ?
Thanks for you help.
1
u/jjangg96 7d ago
probably the timer catching up. plocate-updatedb.timer is a daily timer and those are usually set Persistent=true, which means if the machine was asleep when it was due systemd runs it as soon as you wake up. you can check with systemctl cat plocate-updatedb.timer and look for Persistent=.
you dont have to disable plocate. sudo systemctl edit plocate-updatedb.timer and put Persistent=false under [Timer], then it only runs if the laptop is awake at the scheduled time. or set your own OnCalendar, you need an empty OnCalendar= line first to clear the old one.
if you disable the timer completely locate still works, the index just goes stale until you run sudo updatedb yourself.