76

appstreamcli is overheating my laptop by constantly using 100% of a core. My only solution is to kill it. Here's a screenshot of top:

output of top showing appstreamcli with 100% cpu usage

I can kill appstreamcli with either sudo kill pid or sudo killall appstreamcli. But once I do sudo apt update, the appstreamcli process returns again and hangs the update. If I then kill it, I get the following output:

Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success
'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli;
 then appstreamcli refresh > /dev/null;
 fi'
E: Sub-process returned an error code

What is this process and why is it using so much CPU?

Hee Jin
  • 886
nazar2sfive
  • 1,493

2 Answers2

79

This is caused by a bug https://bugs.launchpad.net/ubuntu/+source/appstream/+bug/1579712
The working solution (just tried myself):

First kill appstreamcli, either manually or with

sudo kill -KILL $(pgrep appstreamcli)

or

sudo pkill -KILL appstreamcli

Then:

wget -P /tmp https://launchpad.net/ubuntu/+archive/primary/+files/appstream_0.9.4-1ubuntu1_amd64.deb https://launchpad.net/ubuntu/+archive/primary/+files/libappstream3_0.9.4-1ubuntu1_amd64.deb
sudo dpkg -i /tmp/appstream_0.9.4-1ubuntu1_amd64.deb /tmp/libappstream3_0.9.4-1ubuntu1_amd64.deb

After this you will be able to proceed with apt-get update as usual

David Foerster
  • 36,890
  • 56
  • 97
  • 151
sam50
  • 701
2

Alternatively for what ever reason, if you don't want to install an out of repo package and just wait for an update you can uninstall it completely.

This will remove Discover on KDE:Plasma so I assume it will also remove the Gnome Software, or what ever your Ubuntu Flavor adds. If this is the case you can just use Muon on Kubuntu, or Synaptic on GTK based DEs.

Before you run this make sure you check the packages being removed to make sure that is ok with you.

You can figure out what something is by running

apt show appstream

to uninstall appstream run

sudo apt remove appstream
Goddard
  • 4,860