[Linux, flatpak] Background mpv becomes stuck at 100% CPU usage after a while

Hello I’m using Anki from flatpak, version 25.02.4.

I keep Anki open while doing other things for adding cards with Anki Connect.

I do not have audio cards, or any media cards for that matter.

After a while that Anki is open and without me interacting with it I hear the fans of my laptop start spinning heavily.

I check top and I see this process at 100% cpu:

mpv --idle --no-terminal --force-window=no --ontop --audio-display=no --keep-open=no --autoload-files=no --gapless-audio=no --config-dir=/home/user/.var/app/net.ankiweb.Anki/data/Anki2 --input-ipc-server=/var/tmp/mpv.evuecc4d

Every time I have to kill the process to make it stop.

Is there a way to prevent it? Even prevent mpv from running in the first place.

By the way: I’m not sure why this background process is needed, but couldn’t it be run on demand only the first time an audio card is seen?

1 Like

The mpv process shouldn’t be doing anything while you aren’t doing anything in the app. It sits there idle and quiet for me [Windows, not Linux] until I’m studying a card with audio or adding audio to a note.

Do you have add-ons that are running in the background? If you’re seeing this happen regularly, try running Anki in safe mode – Troubleshooting Checklist #2 – so your add-ons are disabled.

I do not have any other add-ons except Anki Connect.

It does this always. It does it also on my desktop computer, so this rules out very specific hardware issues.

I will try with safemode although I would be surprised if Anki Connect is causing this.

AFAIK, you can simply uninstall mpv using your package manager.

unfortunately no, mpv is packaged in the flatpak with Anki

Please report the issues to the flatpak author.

I have the same problem with the official, normal binary release from Github. Perhaps it is not specific to Flatpak.

And uninstalling mpv is perhaps an option sometimes, but not for me as I actually use mpv for actually playing videos. Would be great if there was a way to instruct Anki to ignore/disable mpv integration.

I didn’t test this (and I do not have the problem you’re facing on any of my debian systems) but you could try to use mplayer instead of mpv: Arch Linux - Audio Not Working - #12 by Cassie.