Bug 440794 - Dolphin needs to be re-opened in order to access MTP device, after state changed between "No file transmission" and "File transmission"
Summary: Dolphin needs to be re-opened in order to access MTP device, after state chan...
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: MTP (show other bugs)
Version: 21.04.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords: usability
: 413204 448770 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-08-09 15:15 UTC by postix
Modified: 2023-01-13 01:25 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: 22.04
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description postix 2021-08-09 15:15:37 UTC
SUMMARY

When I plugin in my phone, the applet drops down and asking me to "mount and open" the Android 11 device, which I do. However, if the phone's state has been in "no file transmission" at this time,
I cannot open the MTP storage now in this Dolphin instance. Instead Dolphin opens `mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4/` and claims `so suitable MTP device found.

In order to fix this I need to change the state of the phone's usb connection to "file transmission" AND to open another instance of Dolphin. Using the current one is not possible as shown in the following at the hand of the journalctl log. It would however be convenient if Dolphin recognized that the state has changed and auto-fix the issue within the current instance.


# What did I do?


1) Plug in device via usb-c, set as "no file transmission"

16:59:30  kiod5[32025]: kf5.kiod.kmtpd: New device attached with udi= "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4" . Checking if PortableMediaPlayer...
16:59:30  kiod5[32025]: kf5.kiod.kmtpd: SOLID: New Device with udi= "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"
16:59:30  kiod5[32025]: kf5.kiod.kmtpd: new device, getting raw devices
16:59:30  kiod5[32025]: kf5.kiod.kmtpd: No Error, continuing
16:59:30  kiod5[32025]: kf5.kiod.kmtpd: Found device matching the Solid description
16:59:30  kiod5[32025]: kf5.kiod.kmtpd: Created device  "Pixel 4a"   with udi= "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"  and timeout  48

2) Open Dolphin

17:00:00  kdeinit5[3977]: kde.kio-mtp: Slave started
17:00:00  kdeinit5[3977]: kde.kio-mtp: Connected to kiod5 module: true
17:00:00  kdeinit5[3977]: kde.kio-mtp: fileSystemFreeSpace: QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4")
17:00:00  kdeinit5[3977]: kde.kio-mtp: udi =  "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"

3) Click on android device in Dolphin

In the address bar says: mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4/

17:00:51  kdeinit5[3977]: kde.kio-mtp: udi =  "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"
17:00:51  kdeinit5[3977]: kde.kio-mtp: fileSystemFreeSpace: QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4")
17:00:51  kdeinit5[3977]: kde.kio-mtp: udi =  "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"
17:00:51  kdeinit5[3977]: kde.kio-mtp: Listing storage media for device  "Pixel 4a"
17:00:57  kdeinit5[3977]: kde.kio-mtp: fileSystemFreeSpace: QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4")
17:00:57  kdeinit5[3977]: kde.kio-mtp: udi =  "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"
17:01:03  kdeinit5[3977]: kde.kio-mtp: fileSystemFreeSpace: QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4")
17:01:03  kdeinit5[3977]: kde.kio-mtp: udi =  "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"

4) Change to "File transer" at Android device

17:01:36  kiod5[32025]: kf5.kiod.kmtpd: SOLID: Device with udi= "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"  removed.
17:01:36  kiod5[32025]: kf5.kiod.kmtpd: release device: "Pixel 4a"
17:01:36  org.kde.kiod5[32025]: ERROR: Could not close session!
17:01:36  org.kde.kiod5[32025]: inep: usb_get_endpoint_status(): No suitable device found
17:01:36  org.kde.kiod5[32025]: outep: usb_get_endpoint_status(): No suitable device found
17:01:36  kdeinit5[3457]: kde.kio-mtp: fileSystemFreeSpace: QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4")
17:01:36  kdeinit5[3457]: kde.kio-mtp: udi =  "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"
17:01:37  kiod5[32025]: kf5.kiod.kmtpd: New device attached with udi= "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4" . Checking if PortableMediaPlayer...
17:01:37  kiod5[32025]: kf5.kiod.kmtpd: SOLID: New Device with udi= "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"
17:01:37  kiod5[32025]: kf5.kiod.kmtpd: new device, getting raw devices
17:01:37  kiod5[32025]: kf5.kiod.kmtpd: No Error, continuing
17:01:37  kiod5[32025]: kf5.kiod.kmtpd: Found device matching the Solid description
17:01:37  kiod5[32025]: kf5.kiod.kmtpd: Created device  "Pixel 4a"   with udi= "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"  and timeout  48

17:01:57  kdeinit5[3977]: kde.kio-mtp: fileSystemFreeSpace: QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4")
17:01:57  kdeinit5[3977]: kde.kio-mtp: udi =  "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"
17:02:03  kdeinit5[3977]: kde.kio-mtp: fileSystemFreeSpace: QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4")
17:02:03  kdeinit5[3977]: kde.kio-mtp: udi =  "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"

5) In Dolphin, click on device again

17:02:30  kdeinit5[3977]: kde.kio-mtp: udi =  "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"
17:02:30  kdeinit5[3977]: kde.kio-mtp: Listing storage media for device  "Pixel 4a"

6) Leave the Dolphin window open, start another instance of Dolphin

17:03:14  kdeinit5[4807]: kde.kio-mtp: Slave started
17:03:14  kdeinit5[4807]: kde.kio-mtp: Connected to kiod5 module: true
17:03:14  kdeinit5[4807]: kde.kio-mtp: fileSystemFreeSpace: QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4")
17:03:14  kdeinit5[4807]: kde.kio-mtp: udi =  "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"

7) Click in this new instance on the device

17:03:51  kdeinit5[4807]: kde.kio-mtp: udi =  "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"
17:03:51  kdeinit5[4807]: kde.kio-mtp: fileSystemFreeSpace: QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4")
17:03:51  kdeinit5[4807]: kde.kio-mtp: udi =  "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"
17:03:51  kdeinit5[4807]: kde.kio-mtp: Listing storage media for device  "Pixel 4a"
17:03:51  kdeinit5[4807]: kde.kio-mtp: [SUCCESS] :: Storage media: 1
17:03:57  kdeinit5[3977]: kde.kio-mtp: fileSystemFreeSpace: QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4")
17:03:57  kdeinit5[3977]: kde.kio-mtp: udi =  "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:08:00.3/usb4/4-4"



SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20210805
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Kernel Version: 5.13.6-1-default (64-bit)
Comment 1 Oswald Buddenhagen 2021-10-03 16:41:19 UTC
that might be related to Bug 412257 and/or Bug 442170 (the linked mageia bug has some potentially useful info).
Comment 2 Carl Schwan 2022-01-05 17:47:02 UTC
Sounds like this just got fixed by https://invent.kde.org/network/kio-extras/-/merge_requests/139.
Comment 3 Nate Graham 2022-01-05 19:44:12 UTC
Fixed by James John with https://invent.kde.org/network/kio-extras/-/commit/c345fd2e0622171a02db852cf817e626d70a5422 in kio-extras 22.04!
Comment 4 Méven Car 2022-01-06 08:48:26 UTC
kio-extras is part of KDE Gears.
Comment 5 Harald Sitter 2022-01-06 12:51:07 UTC
*** Bug 413204 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2022-01-06 15:10:36 UTC
It is, but the next Gear version is 22.04, not 22.06. :)
Comment 7 Gerhard 2022-01-09 21:35:13 UTC
This problem seems to be fixed only if you uncheck the box in Dolphins settings "Start | Open new folders in tabs". If you have this box checked, the dolphin instance seems to remember the first transfer state.

If you t.ex. activate transfer mode MTP on the Android phone, and you open Dolphin via the system tray, it will correctly display all files on the phone. If you then change the USB-settings on the phone to PTP, and open Dolphin again via the system tray, the new tab will still show MTP!

If you do the same without checking the setting "Start | Open new folders in tabs", Dolphin will create a new window each time and all will work file.

This behaviour is a bit annoying because I very often forget to set the USB transfer mode when I connect the phone, but leave it in "change only". The result is that Dolphin will correctly show me an error. However, as I usually like to work with tabs in Dolphin", it will still show me this error after correcting the transfer mode and attempting to open the phone again.
Comment 8 Gerhard 2022-01-09 21:37:03 UTC
Tested with Plasma 5.23.4, KF 5.89 and Qt 5.15.2, Apps 21.12.0
Comment 9 Gerhard 2022-01-09 21:40:17 UTC
Sorry, at the end of comment 7 I meant "charge only" ;-)
Comment 10 Nate Graham 2022-01-09 21:57:47 UTC
This was just fixed in git master software which you aren't using. See the "Version fixed in" field. :)
Comment 11 Nicolas Fella 2022-01-19 23:42:41 UTC
*** Bug 448770 has been marked as a duplicate of this bug. ***
Comment 12 magni 2022-04-16 13:59:46 UTC
The Bug is still present in Dolphin 21.12.3.
Tested in Kubuntu 22.04
Comment 13 Méven Car 2022-04-20 08:50:25 UTC
(In reply to fgrigore2003 from comment #12)
> The Bug is still present in Dolphin 21.12.3.
> Tested in Kubuntu 22.04

That is expected, the fix will be in KDE Gears/Dolphin/kio-extras 22.04.
Comment 14 Karl 2023-01-13 01:25:49 UTC
Sure would be nice to list a workaround until this gets out.  Some way to restart kiod5?