Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't unmount external disk after playing video using Clapper #205

Closed
frnmz opened this issue Jan 17, 2022 · 6 comments
Closed

Can't unmount external disk after playing video using Clapper #205

frnmz opened this issue Jan 17, 2022 · 6 comments

Comments

@frnmz
Copy link

frnmz commented Jan 17, 2022

As the title says, after playing video with Clapper, unmounting external disk will result to error: "Volume is busy".
Even after the Clapper process is gone from system monitor and from flatpak ps.
lsof | grep resulting to xdg-document-portal is the process that keeping the disk busy by opening file that just opened by Clapper:

lsof | grep /run/media/lam/3f285e72-9d65-46a8-a57e-a88530e518ee
xdg-docum 4104                            lam   21u      REG               0,72 2856144411       3578 /run/media/lam/3f285e72-9d65-46a8-a57e-a88530e518ee/Anime HQ/A whisker away/A Whisker Away.mkv
xdg-docum 4104 4105 gmain                 lam   21u      REG               0,72 2856144411       3578 /run/media/lam/3f285e72-9d65-46a8-a57e-a88530e518ee/Anime HQ/A whisker away/A Whisker Away.mkv
xdg-docum 4104 4106 gdbus                 lam   21u      REG               0,72 2856144411       3578 /run/media/lam/3f285e72-9d65-46a8-a57e-a88530e518ee/Anime HQ/A whisker away/A Whisker Away.mkv
xdg-docum 4104 4110 fuse\x20m             lam   21u      REG               0,72 2856144411       3578 /run/media/lam/3f285e72-9d65-46a8-a57e-a88530e518ee/Anime HQ/A whisker away/A Whisker Away.mkv
xdg-docum 4104 4111 fuse\x20m             lam   21u      REG               0,72 2856144411       3578 /run/media/lam/3f285e72-9d65-46a8-a57e-a88530e518ee/Anime HQ/A whisker away/A Whisker Away.mkv
xdg-docum 4104 4112 fuse\x20m             lam   21u      REG               0,72 2856144411       3578 /run/media/lam/3f285e72-9d65-46a8-a57e-a88530e518ee/Anime HQ/A whisker away/A Whisker Away.mkv
xdg-docum 4104 4113 fuse\x20m             lam   21u      REG               0,72 2856144411       3578 /run/media/lam/3f285e72-9d65-46a8-a57e-a88530e518ee/Anime HQ/A whisker away/A Whisker Away.mkv
xdg-docum 4104 8858 pool-/usr             lam   21u      REG               0,72 2856144411       3578 /run/media/lam/3f285e72-9d65-46a8-a57e-a88530e518ee/Anime HQ/A whisker away/A Whisker Away.mkv

Killing xdg-document-portal process solves the problem.

@Rafostar
Copy link
Owner

Please check if example player from GTK4 demos also reproduces this issue:

flatpak run --command=sh com.github.rafostar.Clapper
gtk4-demo --run=video_player

@frnmz
Copy link
Author

frnmz commented Jan 17, 2022

Please check if example player from GTK4 demos also reproduces this issue:

Yup the problem can be reproduced using gtk4-demo.

Also I think it's a flatpak problem, see: flatpak/xdg-desktop-portal#689

@Rafostar
Copy link
Owner

If the problem is reproduce-able with gtk4-demo, then its something happening somewhere upstream (not in Clapper). It seems like you have found the real culprit in that flatpak issue you linked above, so this can be closed then.

@Rafostar
Copy link
Owner

Rafostar commented Jan 18, 2022

@frnmz

Until solved upstream, this can be used to give flatpak full permission (without using portals, thus working around that portal bug) to /run/media directory:

flatpak override com.github.rafostar.Clapper --filesystem=/run/media

This also makes D&D work from removable devices without waiting for GTK4 port of Nautilus file manager.

@frnmz
Copy link
Author

frnmz commented Jan 19, 2022

Until solved upstream, this can be used to give flatpak full permission (without using portals, thus working around that portal bug) to /run/media directory:

It does solves the problem.
If there were a fix on portals, how do I revert the change made by this?

@Rafostar
Copy link
Owner

If there were a fix on portals, how do I revert the change made by this?

flatpak override --reset com.github.rafostar.Clapper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants