Tuesday 2 January 2018

KActivityManager blocking unmounting

While un-mounting a partition to safely remove the external hard drive, I got an error about the device being busy. Both Dolphin and the command line said the same thing.

umount /run/media/myuser/New\ Volume/
umount: /run/media/myuser/New Volume: target is busy.


It seems kactivitymanagerd was using it.


[root@clown myuser]# fuser -vm /run/media/myuser/New\ Volume/
                    USER        PID ACCESS COMMAND
/run/media/myuser/New Volume:
                     myuser     612 ..c.. kactivitymanage


I tried to stop the daemon but I got the following error.

root@clown myuser]# /usr/bin/kactivitymanagerd
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0


After some discussion on Freenode, I got to know that when graphical apps are run with escalated priviledges, similar error is found. I guessed I was getting the error because I was trying to stop the daemon as root user. I tried changing back to my regular user and stopping the daemon. It worked  and I was able to unmount the drive after that.

/usr/bin/kactivitymanagerd stop
Service stopped
Cleaning up...


No comments: