By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 2211

Summary: TDE presents unnecessary dialog when connecting ebook reader
Product: TDE Reporter: Darrell <darrella>
Component: tdelibsAssignee: Timothy Pearson <kb9vqf>
Status: RESOLVED FIXED    
Severity: normal CC: bugwatch, darrella, kb9vqf
Priority: P5    
Version: R14.0.0 [Trinity]   
Hardware: Other   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Attachments: TDEHW screen capture
Screen capture of TDE deamon dialogs
lsusb and udevadm outputs for ebook reader

Description Darrell 2014-11-25 15:27:59 CST
I have a Sony PRS-950 ebook reader. I use a USB connection and a file manager to manage files.

When I connect the reader with TDE, I receive two TDE Daemon popup dialogs. One for SETTING and the other for READER. The only popup that should appear is READER.

Testing on KDE4 and gvfs systems (GNOME, Mate, Cinnamon), only one popup appears, for READER. As expected the SETTING popup never appears.

lsusb shows the following:

Bus 001 Device 011: ID 054c:031e Sony Corp. PRS-300/PRS-505 eBook reader

lssci shows the following:

[10:0:0:0]   disk    Sony     PRS-950          1.00  /dev/sde
[10:0:0:1]   disk    Sony     PRS-950 MS       1.00  /dev/sdf
[10:0:0:2]   disk    Sony     PRS-950 SD       1.00  /dev/sdg
[10:0:0:3]   disk    Sony     PRS-950 Launcher 1.00  /dev/sdh

c/fdisk reveals sdf (PRS-950 MS) and sdg (PRS-950 SD) are not accessible. Probably system partitions accessible only by rooting the device. sdh (PRS-950 Launcher) is read-only and likely is the SETTING partition. Only sde (PRS-950) is read-write and likely is the READER partition.

The kcontrol hardware device lister shows sdf and sdg as not mountable and sde and sdh as mountable.

Konqueror Storage Media (media:/) lists both the SETTING and READER device.

I don't know how KDE4 or gvfs detect but they work as expected. Only TDE presents a SETTING dialog. That SETTING (sdh) is mountable (as read-only) seems irrelevant and should be ignored at the desktop level.

I do not own or have access to any other ebook readers.

The bug might be related to bug 1726.
Comment 1 Timothy Pearson 2014-11-25 15:31:40 CST
Sounds like the notification daemon should check for mountability before popping up dialogs.

Thanks for the info that TDE already properly detects internally whether the partition is mountable; this should be an easy fix.
Comment 2 Timothy Pearson 2014-11-25 15:33:38 CST
(In reply to Timothy Pearson from comment #1)
> Sounds like the notification daemon should check for mountability before
> popping up dialogs.
> 
> Thanks for the info that TDE already properly detects internally whether the
> partition is mountable; this should be an easy fix.

Ah, nevermind.  On looking again at your answer it seems the only difference is that one is read only and one is read write, which can't be used to select popups.

Can you attach a screenshot of the TDE hardware manager showing both devices?

Thanks!
Comment 3 Darrell 2014-11-25 16:11:51 CST
Created attachment 2357 [details]
TDEHW screen capture

>On looking again at your answer it seems the only difference is that one is
>read only and one is read write, which can't be used to select popups.
Yes. The read-only partition is superfluous although mountable. As I shared, KDE4 and gvfs get this right and don't bother the user with the partition. I have no idea how they do that.

>Can you attach a screenshot of the TDE hardware manager showing both devices?
Attached. The list is exactly the same as the lsscsi output.
Comment 4 Darrell 2014-11-25 16:16:48 CST
Created attachment 2358 [details]
Screen capture of TDE deamon dialogs

Another note. One of the dialog options is to download photos with digikam. See the attached images.

I don't know how TDEHW distinguishes USB devices, if at all, but seems digikam should not be an option with an ebook reader.
Comment 5 Timothy Pearson 2014-11-25 17:14:49 CST
(In reply to Darrell from comment #4)
> Created attachment 2358 [details]
> Screen capture of TDE deamon dialogs
> 
> Another note. One of the dialog options is to download photos with digikam.
> See the attached images.
> 
> I don't know how TDEHW distinguishes USB devices, if at all, but seems
> digikam should not be an option with an ebook reader.

I've run into that particular bug myself with the SD card from a camera, so I'll see if I can fix it.  Not sure there's a whole lot I can do about the Ebook reader; out of curiousity what happens on KDE/gvfs when a multi-partition USB drive is inserted?
Comment 6 Timothy Pearson 2014-11-26 00:28:17 CST
(In reply to Timothy Pearson from comment #5)
> (In reply to Darrell from comment #4)
> > Created attachment 2358 [details]
> > Screen capture of TDE deamon dialogs
> > 
> > Another note. One of the dialog options is to download photos with digikam.
> > See the attached images.
> > 
> > I don't know how TDEHW distinguishes USB devices, if at all, but seems
> > digikam should not be an option with an ebook reader.
> 
> I've run into that particular bug myself with the SD card from a camera, so
> I'll see if I can fix it.  Not sure there's a whole lot I can do about the
> Ebook reader; out of curiousity what happens on KDE/gvfs when a
> multi-partition USB drive is inserted?

On digging further it looks like Digikam is an option for any removable device.  I'm not sure that this is wrong, as there is no way to know if the removable device is a camera memory card until it is mounted.

I do want to know how KDE handles multi-partition USB devices if you have some time to test.  Something tells me they only generate one popup per device instead of one popup per partition, but I could be wrong.

Can you attach the output of 'lsusb -vv' with your Ebook reader attached?  Also helpful would be the output of this command run once on each of the mountable partitions of your reader:
udevadm info --query=all --name=/dev/<node>

Thanks!
Comment 7 Darrell 2014-11-27 00:11:27 CST
Created attachment 2360 [details]
lsusb and udevadm outputs for ebook reader

I included the lsscsi output so you can match the udevadm outputs.

I confirm that digikam is an option regardless of the USB device. I tried several USB flash drives and the TDE Deamon dialog was always the same. I do not have a USB hard drive to test.

Regarding KDE, the System Settings Removable Devices module shows the Sony PRS-950 Launcher and Sony PRS-950. That is similar to the two TDE Daemon pop dialogs for SETTING and READDER respectively. The difference with KDE is when I mount the ebook reader, only the READER device mounts at /media/READER. The other device (SETTING) does not mount. So seems the KDE code does have a way to distinguish what to mount.

Curiously, there are two actions provided by KDE: 1) dowqnload photos with gwenview and 2) open with file manager. The digikam option in TDE is much the same.

I don't know the GTK systems well enough to know how to determine whether gvfs also sees the SETTING partition/device but also is coded not to mount. My guess is because the partition is read-only that gvfs more than likely sees the partition but ignores.
Comment 8 Darrell 2014-11-27 00:48:58 CST
I never mentioned, but the SETTING partition is Windows and Mac setup files for installing GUI apps for managing the ebook reader with a desktop computer.
Comment 9 Timothy Pearson 2014-11-27 01:58:49 CST
(In reply to Darrell from comment #7)
> Created attachment 2360 [details]
> lsusb and udevadm outputs for ebook reader
> 
> I included the lsscsi output so you can match the udevadm outputs.

Thanks for that; it looks like I can suppress the unwanted dialog after all by keying in on this setting:
UDISKS_IGNORE=1

This should be a trivial fix so it might make its way into R14 RC2.
 
> I confirm that digikam is an option regardless of the USB device. I tried
> several USB flash drives and the TDE Deamon dialog was always the same. I do
> not have a USB hard drive to test.

I'm going to say this is not a bug, especially given the mechanics behind the device detection and the fact that KDE hasn't figured out a way to do it any differently.

Thanks for the info!
Comment 10 Timothy Pearson 2014-11-27 02:18:44 CST
(In reply to Timothy Pearson from comment #9)
> (In reply to Darrell from comment #7)
> > Created attachment 2360 [details]
> > lsusb and udevadm outputs for ebook reader
> > 
> > I included the lsscsi output so you can match the udevadm outputs.
> 
> Thanks for that; it looks like I can suppress the unwanted dialog after all
> by keying in on this setting:
> UDISKS_IGNORE=1
> 
> This should be a trivial fix so it might make its way into R14 RC2.

This ended up being such a trivial patch that I decided to push it for RC2.  This bug should be fixed in GIT hashes 7b66a28 (tdelibs) and 5ab19b1 (tdebase).

Please test and verify that it is truly fixed; I obviously cannot test as I have no device that sets the Hidden flag.

Thanks!
Comment 11 Darrell 2014-11-28 00:14:43 CST
I now see only one TDE deamon dialog for READER.

I still see two desktop icons. The SETTING device is not auto-mounted, but I can manually mount using the icon popup menu.

I have mixed feelings about the second (SETTING) desktop icon still appearing. No such icon or device appears in the gvfs systems, which provides for a cleaner desktop. As the device/partition is read-only, I wonder about the value of being able to manually mount, other than mere curiosity. Is there a way the the read-only device is available in konqueror or kcontrol (Storage Media) but no desktop icon appears?
Comment 12 Timothy Pearson 2014-11-28 13:20:19 CST
(In reply to Darrell from comment #11)
> I now see only one TDE deamon dialog for READER.
> 
> I still see two desktop icons. The SETTING device is not auto-mounted, but I
> can manually mount using the icon popup menu.
> 
> I have mixed feelings about the second (SETTING) desktop icon still
> appearing. No such icon or device appears in the gvfs systems, which
> provides for a cleaner desktop. As the device/partition is read-only, I
> wonder about the value of being able to manually mount, other than mere
> curiosity. Is there a way the the read-only device is available in konqueror
> or kcontrol (Storage Media) but no desktop icon appears?

I chose to hide the udev hidden devices (e.g. the system partition) via TDE's hidden file mechanism.  This provides the best of both worlds; affected devices are hidden by default but can be exposed by selecting the standard Show Hidden Files menu option.

As I already had to rebuild tdebase to fix a twin crash that had snuck in (Bug 2218) I went ahead and committed this to GIT in hash 2c1d4ad.

Thanks for reporting, and for the information that led to the fix!
Comment 13 Darrell 2014-11-28 14:39:29 CST
I now see only the READER desktop icon and only one TDE deamon popup. For the curious user, the read-only SETTING partition is mountable and browsable through the Storage Media mechanism.

The updated behavior seems correct to me and is consistent with other desktops.

Thanks. :)