5

I just have a fresh install of Kubuntu 20.04 on an Acer Swift 3 laptop. I ran into problem with transferring files from my Android phone. Here was the steps I went through:

  1. Plug the phone into USB port. The device shows up on Kubuntu (Dolphin and popup notification)
  2. Unlock the phone and accept permission.
  3. Click on the device and got the following error:

No storage media found. Make sure your device is unlocked and has MTP enabled in its USB connection settings.

When I run mtp-detect, I got the following error:

$ mtp-detect
libmtp version: 1.1.17

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
Found 1 device(s):
Samsung: Galaxy models (MTP) (04e8:6860) @ bus 3, dev 11
Attempting to connect device(s)
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device
Unable to open raw device 0
OK.

dmesg:

[ 1799.438225] usb 3-1: new high-speed USB device number 16 using xhci_hcd
[ 1799.593572] usb 3-1: New USB device found, idVendor=04e8, idProduct=6860, bcdDevice= c.00
[ 1799.593575] usb 3-1: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[ 1799.593576] usb 3-1: Product: SAMSUNG_Android
[ 1799.593577] usb 3-1: Manufacturer: SAMSUNG
[ 1799.593578] usb 3-1: SerialNumber: 27a0c9216c1c7ece
[ 1799.603905] cdc_acm 3-1:1.1: ttyACM0: USB ACM device

lsusb:

$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 1c7a:0575 LighTuning Technology Inc. EgisTec EH575
Bus 003 Device 002: ID 0408:a094 Quanta Computer, Inc. HD User Facing
Bus 003 Device 004: ID 8087:0026 Intel Corp. 
Bus 003 Device 016: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy series, misc. (MTP mode)
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

But something is really strange. It works if I do the following:

  1. Plug the phone into laptop.
  2. Boot the laptop.
  3. Once Kubuntu loaded, run $ mtp-detect. This time mtp-detect no longer reports any error.
  4. Access the phone device via Dolphin works now.

Then MTP file transfer will work, until the phone is unplugged. Replugging the phone in will not work anymore.

I really have no idea what is going on. Any help is much appreciated.

3
  • Check your Android USB settings, or maybe when the USB notice of a new device shows up on the phone, click on it. Select MTP from the list of how to connect to the device.
    – ubfan1
    Sep 8, 2021 at 15:22
  • It is already in MTP mode, so I don't think it is the phone's settings issue.
    – meter
    Sep 9, 2021 at 6:56
  • The method described of re-booting computer while attached to Android device worked for me and is suitable workaround for me. Thank you for sharing!
    – hoatzin
    Aug 29 at 12:46

5 Answers 5

3

I'm also confronted by this bug and have discovered this issue reported elsewhere:

https://bugs.mageia.org/show_bug.cgi?id=28216

And here:

https://bugs.kde.org/show_bug.cgi?id=442170

If I understand correctly, a fix is available here:

https://github.com/libusb/libusb/commit/f6d2cb561402c3b6d3627c0eb89e009b503d9067

Unfortunately, my Linux Voodoo only goes so far. I don't know how to implement this fix, but maybe you do. It might also be possible to install later versions of Libusb (the package that seems to be at issue):

https://packages.ubuntu.com/search?keywords=libusb

But I leave that to others better suited to advise. I only post this with the hope that others with more experience can explain to us how to implement the fix.

2
  • I just found this page relating to libmtp: sourceforge.net/p/libmtp/bugs/1868 However, I tried closing everything down but still not able to connect via MTP. I don't know what else is owning the MTP connection if it is really the case as described in the above link.
    – meter
    Sep 9, 2021 at 7:03
  • Thank you for finding the commit on libusb. For anyone on Debian, you can add Debian sid in apt sources.list file, then apt-get update and then upgrade libusb-1.0, reconnect your phone or whatever and everything works.
    – nkoniishvt
    Nov 14, 2021 at 21:44
1

I turned off USB debugging on my android and this problem was solved.

1

For me, the fix was to exit Dolphin file explorer previous to connecting the phone via USB. After connecting it, I clicked on 'Mount and open' which opened Dolphin but not on my phone's storage.

After browsing to my phone's storage on the left in Dolphin, I could see the contents.

1
  • Hello. You are just repeating what the OP says at the bottom of the question is working.
    – David
    Mar 31 at 11:39
1

My Kubuntu 20.04.4 (focal) LTS contained the libusb-0.1-4 and libusb-1.0.0 packages. After uninstalling libusb-0.1-4, MTP access worked quickly and satisfactorily.

0

I haven't solved the bug but did find a workaround that works for me.

  1. Connect the phone. Choose "This Device", then choose Data Transfer.
  2. Three options (under Plasma) will be provided. Choose Data Transfer and Dolphin will open with the error above.
  3. Choose "Connected Device" on the phone as the controlling device. Give it a minute to reset.
  4. Once it has reset, re-choose "This Device" when the option becomes available.
  5. Choose "Data Transfer" on the phone, then choose the same option from the Plasma popup.

This seems to be a reproducible workaround on my system.

3
  • Yes, I found that even Dolphin shows the error. If I plug in the phone and wait for a minute or so, I can access the phone via MTP!
    – meter
    Sep 28, 2021 at 9:30
  • Where do you have "This device" ?
    – Hugolpz
    Mar 11 at 16:41
  • When I try this I get "Couldn't switch". Ugh.
    – hoatzin
    Aug 29 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.