probonopd / go-appimage

Go implementation of AppImage tools
MIT License
795 stars 70 forks source link

Cannot see volumes come and go on Kubuntu 20.04 #48

Open probonopd opened 4 years ago

probonopd commented 4 years ago

image

probonopd commented 4 years ago

org.kde.Solid.Device messages are there, but apparently the way we determine whether we can see volumes come and go does not work on Kubuntu 20.04.

me@host:~$ dbus-monitor 2>&1 | grep -i setupDone
   string "type='signal',path='/org/kde/solid/Device__2Forg_2Ffreedesktop_2FUDisks2_2Fblock_5Fdevices_2Fsdb2',interface='org.kde.Solid.Device',member='setupDone'"
   string "type='signal',path='/org/kde/solid/Device__2Forg_2Ffreedesktop_2FUDisks2_2Fblock_5Fdevices_2Fsdb2',interface='org.kde.Solid.Device',member='setupDone'"
   string "type='signal',path='/org/kde/solid/Device__2Forg_2Ffreedesktop_2FUDisks2_2Fblock_5Fdevices_2Fsdb1',interface='org.kde.Solid.Device',member='setupDone'"
   string "type='signal',path='/org/kde/solid/Device__2Forg_2Ffreedesktop_2FUDisks2_2Fblock_5Fdevices_2Fsdb1',interface='org.kde.Solid.Device',member='setupDone'"
   string "type='signal',path='/org/kde/solid/Device__2Forg_2Ffreedesktop_2FUDisks2_2Fblock_5Fdevices_2Fsdb2',interface='org.kde.Solid.Device',member='setupDone'"
   string "type='signal',path='/org/kde/solid/Device__2Forg_2Ffreedesktop_2FUDisks2_2Fblock_5Fdevices_2Fsdb2',interface='org.kde.Solid.Device',member='setupDone'"
   string "type='signal',path='/org/kde/solid/Device__2Forg_2Ffreedesktop_2FUDisks2_2Fblock_5Fdevices_2Fsdb1',interface='org.kde.Solid.Device',member='setupDone'"
   string "type='signal',path='/org/kde/solid/Device__2Forg_2Ffreedesktop_2FUDisks2_2Fblock_5Fdevices_2Fsdb1',interface='org.kde.Solid.Device',member='setupDone'"
signal time=1596290595.248776 sender=:1.39 -> destination=(null destination) serial=509 path=/org/kde/solid/Device__2Forg_2Ffreedesktop_2FUDisks2_2Fblock_5Fdevices_2Fsdb1; interface=org.kde.Solid.Device; member=setupDone
probonopd commented 4 years ago

How to do this correctly?

https://github.com/probonopd/go-appimage/blob/a97af9b0ef17c3e22f44b9161243286e44bdaa9e/src/appimaged/udisks.go#L115-L122

soredake commented 2 years ago

Same warning on fedora kde 36.

luzat commented 2 years ago

I recently started getting the same warning on Debian with KDE. There are two problems which have been responsible:

  1. KDE's Power Devil (apt install powerdevil) was not installed and did not provide org.kde.Solid.PowerManagement.
  2. appimaged starts early and before powerdevil is up (race condition). I would suggest that appimaged polls or listens for the DBus services (if that is possible) to come up, at least up to a certain amount of time.

The warning is somewhat annoying and I am not sure if it does have any negative consequences.

probonopd commented 2 years ago

Makes me wonder...

luzat commented 2 years ago

@probonopd

  1. I did try adding After=/Wants=plasma-powerdevil.service without success. Manually first starting powerdevil and then appimaged works, though. It might take some more time for org.kde.Solid.PowerManagement becomes available on DBUS. I don't have experience with DBUS, but isn't there some way to get notified about new services becoming available or poll for that and only initialize that part of appimaged once this has happened?

  2. I would ignore the issue of people not installing powerdevil, because most standard installs would come with a more complete set of services. On Debian, most people would probably install a larger meta-package or with recommended packages installed.

  3. I still do not know why appimaged needs that and what feature doesn't work if it's not available, but if a large part of the functionality is working just fine, it'd be nice to at least have an option to disable that warning which currently pops up after every login here (which is a bit weird, because a few weeks ago this worked fine on the same system; currently can't look much more into that, unfortunately).

probonopd commented 2 years ago

Thanks @luzat.

I still do not know why appimaged needs that and what feature doesn't work

The functionality is needed to see volumes come and go, so that when you plug in a disk or USB stick containing applications they can be integrated into the system, and can be unintegrated again when the disk is unmounted.

I don't have experience with DBUS, but isn't there some way to get notified about new services becoming available or poll for that and only initialize that part of appimaged once this has happened?

We don't want a half-working appimaged. If it can't work properly then it should quit itself and tell the user that it can't work on that kind of system.

lukebemish commented 1 year ago

Since I don't particularly want/need appimages on new volumes to be integrated, and would disable that feature if possible, I feel like a way to turn off this notification at the very least would be quite nice. Currently I get a notification for a feature I don't want and that doesn't work on every login, which isn't optimal.

probonopd commented 1 year ago

This is a reminder that go-appimage was not developed for and has never been tested on the kind of system you are running it on. There are too many Linux distributions, and the are all slightly different and ever-changing. This is why I am using FreeBSD nowadays.

parkerlreed commented 1 year ago

I got around appimaged starting before powerdevil by just adding a delay to the appimaged.service

ExecStartPre=/bin/sleep 10

Also tried adding powerdevil to the After= with no success just like above.

probonopd commented 1 year ago

What is powerdevil?

parkerlreed commented 1 year ago

It's the service mentioned above that provides org.kde.Solid.PowerManagement

CalebQ42 commented 1 year ago

Looked into this a little bit and it shouldn't be too hard to detect if powerdevil is installed and if so wait for it to get started or just sleep for a bit. I don't use KDE so I'll have to set up a VM to test it properly.

KaKi87 commented 7 months ago

Hello, Any news on this ? Thanks

CalebQ42 commented 7 months ago

Hello, Any news on this ? Thanks

Everything should be working since #247, but if you're still having issues I could look into it.

KaKi87 commented 7 months ago

Well, I'm receiving this notification at every boot and don't know what to do about it. Thanks PS : On KDE neon 6.

CalebQ42 commented 7 months ago

Well, I'm receiving this notification at every boot and don't know what to do about it. Thanks PS : On KDE neon 6.

What distro? Are you also on Kubuntu or something else?

KaKi87 commented 7 months ago

Sorry, I edited my message right after submitting it to add this info : KDE neon 6.

probonopd commented 7 months ago

Possibly KDE 6 changed something regarding org.kde.Solid.Device?