某天突然发现公司的笔记本声音特别大,自己又没跑什么程序,就很好奇。
打开top一看,发现一个有一个线程叫 tracker-store,cpu占用超过100%,把它kill掉后果然电脑就没那么大声音了。但过了一会,这厮马上又复活了,杀了好几次就是杀不死。
原来,这厮有自启动能力,可以自动复活!
然后解决它:
cd /etc/xdg/autostart
将tracker-extract.desktop,tracker-miner-fs.desktop,tracker-store.desktop三个文件删除即可。
但是这个办法对我来说居然没用。。。
禁止tracker-*软件启动
通过修改/etc/xdg/autostart目录下的tracker-开头的快捷方式(.desktop文件)
sudo sed -i "s/X-GNOME-Autostart-enabled=true/X-GNOME-Autostart-enabled=false/g" /etc/xdg/autostart/tracker-*.desktop
tracker reset --hard
就这一个命令电脑瞬间就安静了,牛的!
(base) lyn@l00 sudo sed -i "s/X-GNOME-Autostart-enabled=true/X-GNOME-Autostart-enabled=false/g" /etc/xdg/autostart/tracker-*.desktop
sed: can't read /etc/xdg/autostart/tracker-*.desktop: No such file or directory
(base) lyn@l00 tracker reset --hard
CAUTION: This process may irreversibly delete data.
Although most content indexed by Tracker can be safely reindexed, it can’t be assured that this is the case for all data. Be aware that you may be incurring in a data loss situation, proceed at your own risk.
Are you sure you want to proceed? [y|N]: y
Found 3 PIDs…
Killed process 1458 — “tracker-extract”
Killed process 1459 — “tracker-miner-fs”
Killed process 11775 — “tracker-store”
_g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ‘gsettings-backend’
Setting database locations
Checking database directories exist
Checking database version
Checking whether database files exist
Removing all database/storage files
Removing database:'/home/lyn/.cache/tracker/meta.db'
Removing db-locale file:'/home/lyn/.cache/tracker/db-locale.txt'
Removing journal:'/home/lyn/.local/share/tracker/data/tracker-store.journal'
Removing db-version file:'/home/lyn/.cache/tracker/db-version.txt'
另外,在~/.config/autostart 文件中似乎也可以设置,但我没有设置。