Bug 375840 - MTP connection crashes after few minutes on several phones
Summary: MTP connection crashes after few minutes on several phones
Status: RESOLVED DUPLICATE of bug 396527
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: MTP (show other bugs)
Version: 5.9.0
Platform: Neon Linux
: NOR grave
Target Milestone: ---
Assignee: Plasma Development Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-01 12:28 UTC by Tom Kijas
Modified: 2018-08-16 10:20 UTC (History)
9 users (show)

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


Attachments
Multiple entries for 'open with file manager' (29.79 KB, image/png)
2017-04-03 07:34 UTC, Axel Braun
Details
error 150 (85.49 KB, image/png)
2017-04-03 07:34 UTC, Axel Braun
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Kijas 2017-02-01 12:28:55 UTC
MTP connection works only for few seconds, then gone crazy and still asks for allowe MTP connection in phone.

Every time I connect phone with new Android (5,6,7), no matter what phone (LG G4, G5, Samsung Galaxy S7 EDGE...), the KDE connects it using MTP, then I allow the MTP connection in phone and everything seems OK BUT, after few minutes, the phone starts to call for allowing the MTP like crazy. This occurs mainly when I want to copy/write something using Dolphin from phone to computer.

The same bug occurs in KDE NEON, Ubuntu 16.04 etc.
Comment 1 Aleix Pol 2017-02-01 12:37:57 UTC
How do you know it is crashing?
Do you have a backtrace?
Comment 2 jmaspons 2017-02-01 16:35:49 UTC
Do you have mtpfs installed? It seems necessary in kubuntu https://phabricator.kde.org/T5117
Comment 3 Axel Braun 2017-04-03 07:33:52 UTC
Same experience on openSUSE Tumbleweed (Plasma 5.9.4)
- First there appear two entries for the phone: The second entry (Samsung_Android) has two entries for 'open whith file manage'
- then you are asked several times (on the phone) to grant access to Content (I guess KDE is tryying to access pictures etc)
- opening again with filemanager the 'error 150' appears
- After some more requests for access the Error message 'USB Gerät kann nicht belegt werden' (or similar) appears. Finally the KDE session hangs completely and the X-Server needs to be killed
Comment 4 Axel Braun 2017-04-03 07:34:35 UTC
Created attachment 104852 [details]
Multiple entries for 'open with file manager'
Comment 5 Axel Braun 2017-04-03 07:34:56 UTC
Created attachment 104853 [details]
error 150
Comment 6 Michał Walenciak 2017-10-22 17:58:15 UTC
Same here. When I connect camera to PC, I can browse (dolphin) its contentbut if I touch any file (copy or open) it 'crashes' with error 150.
Comment 7 Michał Walenciak 2017-10-22 18:16:32 UTC
some output from kdeinit5:
kamera.kio: KameraProtocol::~KameraProtocol()
kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "stash"
qt.accessibility.core: Cannot create accessible child interface for object:  PlacesView(0x55f7b755c670)  index:  10
kf5.kio.trash: listdir:  QUrl("trash:/")
kamera.kio: stat(" "/" ")
kamera.kio: KameraProtocol::listDir( "/" )
kamera.kio: Found cameras:  ""
kf5.kio.core: UDSEntry for '.' not found, creating a default one. Please fix the "kio_kamera" KIO slave
kamera.kio: stat(" "/" ")
kamera.kio: stat(" "/USB%20PTP%20Class%20Camera@usb:003,023" ")
kamera.kio: statRegular(" "/USB%20PTP%20Class%20Camera@usb:003,023" ")
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Initializing camera
kamera.kio: Opening camera model  "USB PTP Class Camera"  at  "usb:003,023"
kamera.kio: KameraProtocol::openCamera at  14267
kamera.kio: openCamera succeeded at  14267
kamera.kio: stat(" "/" ")
kamera.kio: stat(" "/USB%20PTP%20Class%20Camera@usb:003,023" ")
kamera.kio: statRegular(" "/USB%20PTP%20Class%20Camera@usb:003,023" ")
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: stat(" "/USB%20PTP%20Class%20Camera@usb:003,023" ")
kamera.kio: statRegular(" "/USB%20PTP%20Class%20Camera@usb:003,023" ")
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: KameraProtocol::special() at  14267 . idletime:  0
kamera.kio: stat(" "/USB%20PTP%20Class%20Camera@usb:003,023" ")
kamera.kio: statRegular(" "/USB%20PTP%20Class%20Camera@usb:003,023" ")
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: KameraProtocol::listDir( "/USB%20PTP%20Class%20Camera@usb:003,023" )
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: KameraProtocol::readCameraFolder( "/" )
kf5.kio.core: UDSEntry for '.' not found, creating a default one. Please fix the "kio_kamera" KIO slave
kamera.kio: stat(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001" ")
kamera.kio: statRegular(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001" ")
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: stat(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001" ")
kamera.kio: statRegular(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001" ")
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: KameraProtocol::special() at  14267 . idletime:  0
kamera.kio: stat(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001" ")
kamera.kio: statRegular(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001" ")
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: KameraProtocol::special() at  14267 . idletime:  0
kamera.kio: KameraProtocol::listDir( "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001" )
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: KameraProtocol::readCameraFolder( "/store_00010001" )
kf5.kio.core: UDSEntry for '.' not found, creating a default one. Please fix the "kio_kamera" KIO slave
kamera.kio: stat(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22" ")
kamera.kio: statRegular(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22" ")
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: statRegular() Requesting directories list for  "/store_00010001"
kamera.kio: stat(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/INFO" ")
kamera.kio: statRegular(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/INFO" ")
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: statRegular() Requesting directories list for  "/store_00010001"
kamera.kio: stat(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22" ")
kamera.kio: statRegular(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22" ")
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: statRegular() Requesting directories list for  "/store_00010001"
kamera.kio: KameraProtocol::special() at  14267 . idletime:  0
kamera.kio: stat(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22" ")
kamera.kio: statRegular(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22" ")
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: statRegular() Requesting directories list for  "/store_00010001"
kamera.kio: KameraProtocol::listDir( "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22" )
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: KameraProtocol::readCameraFolder( "/store_00010001/2017-10-22" )
kf5.kio.core: UDSEntry for '.' not found, creating a default one. Please fix the "kio_kamera" KIO slave
kamera.kio: stat(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22/20171022171458.MTS" ")
kamera.kio: statRegular(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22/20171022171458.MTS" ")
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: statRegular() Requesting directories list for  "/store_00010001/2017-10-22"
kamera.kio: KameraProtocol::special() at  14267 . idletime:  0
kamera.kio: KameraProtocol::get( "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22/20171022171458.MTS" )
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: get() retrieving the thumbnail
kf5.kio.core: mimetype() emitted again, or after sending first data!; job URL = QUrl("camera:/USB%2520PTP%2520Class%2520Camera@usb:003,023/store_00010001/2017-10-22/20171022171458.MTS")
Qt: Session management error: networkIdsList argument is NULL
Seeking in video failed
[swscaler @ 0x55b8f5fb4c20] deprecated pixel format used, make sure you did set range correctly
kamera.kio: stat(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22/20171022171458.MTS" ")
kamera.kio: statRegular(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22/20171022171458.MTS" ")
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: statRegular() Requesting directories list for  "/store_00010001/2017-10-22"
kamera.kio: stat(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22/20171022171458.MTS" ")
kamera.kio: statRegular(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22/20171022171458.MTS" ")
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: statRegular() Requesting directories list for  "/store_00010001/2017-10-22"
QLayout: Attempting to add QLayout "" to PhononWidget "", which already has a layout
kamera.kio: stat(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22/20171022171458.MTS" ")
kamera.kio: statRegular(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22/20171022171458.MTS" ")
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: statRegular() Requesting directories list for  "/store_00010001/2017-10-22"
kamera.kio: KameraProtocol::get( "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22/20171022171458.MTS" )
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: get() retrieving the thumbnail
kf5.kio.core: mimetype() emitted again, or after sending first data!; job URL = QUrl("camera:/USB%2520PTP%2520Class%2520Camera@usb:003,023/store_00010001/2017-10-22/20171022171458.MTS")
Seeking in video failed
[swscaler @ 0x55b8f60257c0] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x55b8f60257c0] Warning: data is not aligned! This can lead to a speedloss
kamera.kio: KameraProtocol::special() at  14267 . idletime:  0
kamera.kio: KameraProtocol::special() at  14267 . idletime:  0
kamera.kio: KameraProtocol::special() at  14267 . idletime:  1
kamera.kio: KameraProtocol::special() at  14267 . idletime:  2
kamera.kio: KameraProtocol::special() at  14267 . idletime:  3
kamera.kio: KameraProtocol::special() at  14267 . idletime:  4
kamera.kio: KameraProtocol::special() at  14267 . idletime:  5
kamera.kio: KameraProtocol::special() at  14267 . idletime:  6
kamera.kio: KameraProtocol::special() at  14267 . idletime:  7
kamera.kio: KameraProtocol::special() at  14267 . idletime:  8
kamera.kio: KameraProtocol::special() at  14267 . idletime:  9
kamera.kio: KameraProtocol::special() at  14267 . idletime:  10
kamera.kio: KameraProtocol::special() at  14267 . idletime:  11
kamera.kio: KameraProtocol::special() at  14267 . idletime:  12
Qt: Session management error: networkIdsList argument is NULL
kamera.kio: KameraProtocol::special() at  14267 . idletime:  13
kamera.kio: KameraProtocol::special() at  14267 . idletime:  14
kamera.kio: KameraProtocol::special() at  14267 . idletime:  15
kamera.kio: KameraProtocol::special() at  14267 . idletime:  16
kamera.kio: KameraProtocol::special() at  14267 . idletime:  17
kamera.kio: stat(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22/20171022171458.MTS" ")
kamera.kio: statRegular(" "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22/20171022171458.MTS" ")
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: statRegular() Requesting directories list for  "/store_00010001/2017-10-22"
kamera.kio: KameraProtocol::get( "/USB%20PTP%20Class%20Camera@usb:003,023/store_00010001/2017-10-22/20171022171458.MTS" )
kamera.kio: KameraProtocol::setCamera( "USB PTP Class Camera" ,  "usb:003,023" )
kamera.kio: Configuration is same, nothing to do.
kamera.kio: get() retrieving the thumbnail
kf5.kio.core: mimetype() emitted again, or after sending first data!; job URL = QUrl("camera:/USB%2520PTP%2520Class%2520Camera@usb:003,023/store_00010001/2017-10-22/20171022171458.MTS")
Seeking in video failed
[swscaler @ 0x55b8f6032b00] deprecated pixel format used, make sure you did set range correctly
kamera.kio: KameraProtocol::special() at  14267 . idletime:  0
kamera.kio: KameraProtocol::special() at  14267 . idletime:  0
kamera.kio: KameraProtocol::special() at  14267 . idletime:  1
kamera.kio: KameraProtocol::special() closing camera.
Comment 8 Chris 2018-08-03 07:58:12 UTC
Same here on Debian Stretch.
Comment 9 Ovidiu Chi 2018-08-13 12:22:50 UTC
Same here, on Kubuntu 18.04, default install: kdef 5.44, plasma 5.12.6.

I cannot copy files from my Android phone or tablet via MTP with a USB cable.
The phone is Android 7.1 and the tablet is 4.1.

If I click the Plasma notification to "Open with file manager" it always says "No Storages found" even though the phone is unlocked and I had already selected "Transfer files" on the Android USB dialog. If I close this Dolphin dialog and the Dolphin window, the phone bleeps a few times as if trying to reconnect, ultimately showing me the USB connect dialog again where I can choose "Transfer files".

If I just open Dolphin, without using the Plasma notification, I can browse the phone, try to copy a file, Plasma says it "Cannot read file /Xperia...", Android shows the USB connect dialog again. I close the Dolphin dialog, Plasma says "Copying finished" although nothing is copied.
Sometimes I get a dialog saying "The process for the mtp protocol died unexpectedly."

If I never touch Dolphin or the Plasma notification and use Kate to open text files from Android everything works fine.

A dmesg output:

[  550.053611] usb 1-6: new high-speed USB device number 5 using xhci_hcd
[  550.203150] usb 1-6: New USB device found, idVendor=0fce, idProduct=01da
[  550.203156] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  550.203160] usb 1-6: Product: E5823
[  550.203163] usb 1-6: Manufacturer: Sony
[  550.203166] usb 1-6: SerialNumber: CB5A29YCBL
[  552.925803] usb 1-6: USB disconnect, device number 5
[  553.569647] usb 1-6: new high-speed USB device number 6 using xhci_hcd
[  553.718691] usb 1-6: New USB device found, idVendor=0fce, idProduct=01da
[  553.718697] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  553.718701] usb 1-6: Product: E5823
[  553.718705] usb 1-6: Manufacturer: Sony
[  553.718708] usb 1-6: SerialNumber: CB5A29YCBL
[  583.231694] usb 1-6: usbfs: process 3223 (mtp.so) did not claim interface 0 before use
[  583.357776] usb 1-6: reset high-speed USB device number 6 using xhci_hcd
[  583.507372] usb 1-6: usbfs: process 3223 (mtp.so) did not claim interface 0 before use
[  583.913876] usb 1-6: reset high-speed USB device number 6 using xhci_hcd
[  584.469654] usb 1-6: reset high-speed USB device number 6 using xhci_hcd
[  585.133709] usb 1-6: reset high-speed USB device number 6 using xhci_hcd
[  585.625857] usb 1-6: reset high-speed USB device number 6 using xhci_hcd
[  586.153759] usb 1-6: reset high-speed USB device number 6 using xhci_hcd
[  586.669717] usb 1-6: reset high-speed USB device number 6 using xhci_hcd
[  587.249617] usb 1-6: reset high-speed USB device number 6 using xhci_hcd
[  587.753812] usb 1-6: reset high-speed USB device number 6 using xhci_hcd
[  590.782870] usb 1-6: USB disconnect, device number 6
[  591.233459] usb 1-6: new high-speed USB device number 7 using xhci_hcd
[  591.382521] usb 1-6: New USB device found, idVendor=0fce, idProduct=01da
[  591.382526] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  591.382530] usb 1-6: Product: E5823
[  591.382533] usb 1-6: Manufacturer: Sony
[  591.382537] usb 1-6: SerialNumber: CB5A29YCBL
[  609.347624] usb 1-6: usbfs: process 3290 (mtp.so) did not claim interface 0 before use
[  609.473500] usb 1-6: reset high-speed USB device number 7 using xhci_hcd
[  609.622410] usb 1-6: usbfs: process 3290 (mtp.so) did not claim interface 0 before use
[  609.997533] usb 1-6: reset high-speed USB device number 7 using xhci_hcd
[  610.489521] usb 1-6: reset high-speed USB device number 7 using xhci_hcd
[  614.025512] usb 1-6: reset high-speed USB device number 7 using xhci_hcd
[  615.994965] usb 1-6: USB disconnect, device number 7
Comment 10 Elvis Angelaccio 2018-08-16 09:36:25 UTC
(In reply to Michał Walenciak from comment #7)
> some output from kdeinit5:
> kamera.kio: KameraProtocol::~KameraProtocol()

Please open another report against the kio product and the kamera component. This is unrelated from MTP.

The MTP issues here are probably related to bug #396527, closing as duplicate for now.

*** This bug has been marked as a duplicate of bug 396527 ***
Comment 11 Ovidiu Chi 2018-08-16 10:20:44 UTC
(In reply to Elvis Angelaccio from comment #10)

> The MTP issues here are probably related to bug #396527, closing as
> duplicate for now.
> 
> *** This bug has been marked as a duplicate of bug 396527 ***

Indeed, for me your comments on the workaround on that bug report are spot on. Thanks.