#921559 MTP broken for number of phones with "LIBMTP PANIC: Unable to initialize device"

Package:
libmtp9
Source:
libmtp
Description:
Media Transfer Protocol (MTP) library
Submitter:
Vincas Dargis
Date:
2026-01-06 23:29:02 UTC
Severity:
important
#921559#5
Date:
2019-02-06 19:26:33 UTC
From:
To:
Dear Maintainer,

A was using Dolphin for browsing files in Android-based phone for quite
some time, and while I did have some occasional flanky problems (similar to
#920153), it seems I can no longer browse *at all* with different error:

```
The file or folder
udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2
does not exist.
```

This is what syslog prints when I connect phone:
```
Feb  6 21:20:56 vinco kernel: [ 4241.131018] usb 2-2: new high-speed USB
device number 23 using xhci_hcd
Feb  6 21:20:56 vinco kernel: [ 4241.279954] usb 2-2: New USB device
found, idVendor=2a47, idProduct=2008, bcdDevice= 2.16
Feb  6 21:20:56 vinco kernel: [ 4241.279961] usb 2-2: New USB device
strings: Mfr=2, Product=3, SerialNumber=4
Feb  6 21:20:56 vinco kernel: [ 4241.279964] usb 2-2: Product:
Aquaris_E5_HD
Feb  6 21:20:56 vinco kernel: [ 4241.279968] usb 2-2: Manufacturer: BQ
Feb  6 21:20:56 vinco kernel: [ 4241.279971] usb 2-2: SerialNumber:
UA001404

```
Snippet from `.xsession-errors` (sorry, some messages are in my native
lanugage):

```
QObject::connect: invalid null parameter
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to
initialize device
Object::disconnect: No such slot
Meta::MtpHandler::slotDeviceMatchSucceeded()
UdevQt: unhandled device action "bind"
UdevQt: unhandled device action "bind"
UdevQt: unhandled device action "bind"
UdevQt: unhandled device action "bind"
UdevQt: unhandled device action "bind"
UdevQt: unhandled device action "bind"
UdevQt: unhandled device action "bind"
UdevQt: unhandled device action "bind"
UdevQt: unhandled device action "bind"
UdevQt: unhandled device action "bind"
UdevQt: unhandled device action "bind"
UdevQt: unhandled device action "bind"
UdevQt: unhandled device action "bind"
UdevQt: unhandled device action "bind"
org.kde.plasmaquick: Applet "Pranešimai apie įrenginius" loaded after 0
msec
org.kde.plasmaquick: Increasing score for "Pranešimai apie įrenginius"
to 100
org.kde.plasmaquick: Applet "Sistemos dėklas" loaded after 0 msec
org.kde.plasmaquick: Applet "Sistemos dėklas" loaded after 1 msec
org.kde.plasmaquick: Increasing score for "Sistemos dėklas" to 100
file:///usr/share/plasma/plasmoids/org.kde.plasma.devicenotifier/contents/ui/FullRepresentation.qml:163:25:
Unable to assign [undefined] to QString
kde.kio-mtp: fileSystemFreeSpace:
QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2")
kde.kio-mtp:
QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2")
kde.kio-mtp: udi =
"/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2"
kde.kio-mtp: fileSystemFreeSpace:
QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2")
kde.kio-mtp:
QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2")
kde.kio-mtp: udi =
"/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2"
kde.kio-mtp: New device attached with udi=
"/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2" .
Checking if PortableMediaPlayer...
kde.kio-mtp: SOLID: New Device with udi=
"/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2"
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
kde.kio-mtp: new device, getting raw devices
kde.kio-mtp: No Error, continuing
kde.kio-mtp: Found device matching the Solid description
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to
initialize device
kde.kio-mtp: fileSystemFreeSpace:
QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2")
kde.kio-mtp:
QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2")
kde.kio-mtp: udi =
"/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2"
kde.kio-mtp: fileSystemFreeSpace:
QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2")
kde.kio-mtp:
QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2")
kde.kio-mtp: udi =
"/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2"
UdevQt: unhandled device action "bind"
org.kde.plasmaquick: Applet "Pranešimai apie įrenginius" loaded after 0
msec
org.kde.plasmaquick: Increasing score for "Pranešimai apie įrenginius"
to 100
org.kde.plasmaquick: Applet "Sistemos dėklas" loaded after 0 msec
org.kde.plasmaquick: Applet "Sistemos dėklas" loaded after 0 msec
org.kde.plasmaquick: Increasing score for "Sistemos dėklas" to 100
file:///usr/share/plasma/plasmoids/org.kde.plasma.devicenotifier/contents/ui/FullRepresentation.qml:163:25:
Unable to assign [undefined] to QString
file:///usr/share/plasma/plasmoids/org.kde.plasma.devicenotifier/contents/ui/FullRepresentation.qml:163:25:
Unable to assign [undefined] to QString
file:///usr/share/plasma/plasmoids/org.kde.plasma.devicenotifier/contents/ui/FullRepresentation.qml:163:25:
Unable to assign [undefined] to QString
file:///usr/share/plasma/plasmoids/org.kde.plasma.devicenotifier/contents/ui/FullRepresentation.qml:163:25:
Unable to assign [undefined] to QString
kdeinit5: Got EXEC_NEW
'/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/mtp.so' from launcher.
kdeinit5: preparing to launch
'/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/mtp.so'
kde.kio-mtp: Slave started
kde.kio-mtp: new device, getting raw devices
kde.kio-mtp: No Error, continuing
kde.kio-mtp: Found device matching the Solid description
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to
initialize device
kde.kio-mtp: Caches created
kde.kio-mtp:
"udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/"
kde.kio-mtp:
QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/")
kde.kio-mtp: udi =
"/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2"
kf5.kio.widgets: KRun(0x559d8688b1d0) ERROR 111 "Failas ar aplankas
udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/
neegzistuoja."
kde.kio-mtp: fileSystemFreeSpace:
QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2")
kde.kio-mtp:
QUrl("mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2")
kde.kio-mtp: udi =
"/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2"
UdevQt: unhandled device action "bind"
```

I've tried another brand phone, it's the same issue.

The only change I remeber is some recent udev upgrade:
```
$ fgrep -R -e"udev" /var/log/dpkg.log*
...
/var/log/dpkg.log.1:2019-01-29 18:39:52 status installed udev:amd64
240-5
...
/var/log/dpkg.log.1:2019-01-30 19:09:16 status installed
libtss2-udev:all 2.1.0-4
```

Not sure if this is catually `kio` issue, maybe it's something with
udev..?

#921559#10
Date:
2019-03-17 08:53:57 UTC
From:
To:
I just tested on GNOME Sid, also cannot access smartphone via MTP:

Mar 17 10:52:41 debian-sid-gnome gvfsd[1241]: error returned by libusb_claim_interface() = -6LIBMTP
PANIC: Unable to initialize device
Mar 17 10:52:42 debian-sid-gnome gvfsd[1241]: Device 0 (VID=2a47 and PID=2008) is a bq Krillin (MTP).

#921559#19
Date:
2019-03-17 10:31:21 UTC
From:
To:
Looks more like a problem in libmtp9 (or maybe the kernel).

Reassigning to libmtp9.

If you are convinced this actually a bug in udev, please re-assign back
providing some context why you think this is a udev bug.

Regards,
Michael

#921559#24
Date:
2019-03-18 17:58:12 UTC
From:
To:
Control: reassign -1 libmtp9

I don't see it being reassigned, trying again.

#921559#31
Date:
2019-03-20 17:58:09 UTC
From:
To:
I've downgraded to 1.1.13-1.1 and my phone is accessible again. Upgrading version introduces problem
again.

Naively bumping severity in hope to be fixed for Buster.

#921559#40
Date:
2019-03-20 18:18:14 UTC
From:
To:
Looks like there are problems with more phones (forwarded to bug about Moto G regression).
#921559#49
Date:
2019-04-03 08:04:41 UTC
From:
To:
Hi,

I tried to reproduce this problem with an up-to-date (2019-04-01) live Buster.
And I was not able to reproduce this problem with all my Android
devices (Nexus 5, Nexus 7, Galaxy S3, Galaxy J5 2018 and Galaxy Tab A
2018). So, I reduce the severity of this bug for the moment.

Best,
Dylan

#921559#56
Date:
2019-04-11 07:20:01 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

Same problem with a Huawei P9 Lite (2017)

I see the problem with jmtpfs or mtp-tools so definitely the bug is in libmtp9

#921559#61
Date:
2019-08-04 15:59:34 UTC
From:
To:
My problems are fixed now with libmtp 1.1.16 on Sid. Does it work now for you too?
#921559#66
Date:
2019-09-05 19:49:41 UTC
From:
To:
<edavid@oceanet-technology.com> wrote:
for you too?

I'm experiencing the same problem with libmtp 1.1.16 on Buster:

$ mtp-detect
libmtp version: 1.1.16

Listing raw device(s)
Device 0 (VID=18d1 and PID=4ee2) is a Google Inc Nexus/Pixel (MTP+ADB).
   Found 1 device(s):
   Google Inc: Nexus/Pixel (MTP+ADB) (18d1:4ee2) @ bus 1, dev 38
Attempting to connect device(s)
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to
initialize device
Unable to open raw device 0
OK.

#921559#71
Date:
2019-09-21 20:20:51 UTC
From:
To:
On Thu, 5 Sep 2019 21:49:41 +0200 Eric Van Buggenhaut <ericvb69@gmail.com> wrote:

Getting identical problems using libmtp 1.1.16 on Fedora with  Huawei
Honor 5 ( which is called Ascend P8 according to ProdID )

mtp-detect
libmtp version: 1.1.16

Listing raw device(s)
Device 0 (VID=12d1 and PID=1082) is a Huawei Ascend P8.
    Found 1 device(s):
    Huawei: Ascend P8 (12d1:1082) @ bus 2, dev 9
Attempting to connect device(s)
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to
initialize device
Unable to open raw device 0
OK.

#921559#76
Date:
2020-06-19 09:47:41 UTC
From:
To:
I can confirm the bug also with libmtp9 1.1.17 and a Samsung Galaxy A3
(2015, A300FU). Is there at least meanwhile a solution independant of
libmtp and a bit faster than installing a FTP server on my phone?

$ sudo apt-cache policy libmtp9
libmtp9:
  Installé : 1.1.17-3
  Candidat : 1.1.17-3
 Table de version :
 *** 1.1.17-3 500
        500 http://ftp.fr.debian.org/debian sid/main amd64 Packages
        100 /var/lib/dpkg/status

$ sudo 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 2, dev 8
Attempting to connect device(s)
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to
initialize device
Unable to open raw device 0
OK.

#921559#81
Date:
2020-06-19 12:24:37 UTC
From:
To:
Hi,

I am really annoyed by this issue! It seems to be present in other
distrib at least in Fedora but I am not able to reproduce... I have no
problem with my android phones.

Le ven. 19 juin 2020 à 11:51, Tobias Bora <tobias.bora@gmail.com> a écrit :

You can try to use "android-file-transfer" (available in Debian repo),
it should work because it doesn't use libmtp.

Best,
Dylan

#921559#86
Date:
2020-07-12 20:20:30 UTC
From:
To:
Thanks. I also got this error on a new computer, running NixOs 20.03,
and on a completely different phone, a Samsung A 40:

[nix-shell:~]$ mtp-detect libmtp version: 1.1.16 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 1,
dev 124 Attempting to connect device(s) error returned by
libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device
Unable to open raw device 0 OK.

I also tried "android-file-transfer", and when I kill the process that
is using the device, it does work. Can I help somehow?

Cheers,

Léo

#921559#91
Date:
2020-09-21 15:29:09 UTC
From:
To:
Hi

I had a similar issue.

Turns out that Gnome's gvfs was locking the mtp device.

Since I run KDE, I've removed gvfs-backends package and rebooted.

I now can run mtp-detect without issue.

HTH

#921559#96
Date:
2026-01-06 23:26:34 UTC
From:
To:
I can only copy files between the computer and the device via usb when using android-file-transfer (which was mentioned above) but not when using the Dolphin file explorer. Using Dolphin to mount and browse the device used to work in Debian 12 but not anymore in D13.
How to find out and fix whatever causes it to not work in Dolphin when it does work in that Android File Transfer tool?

I already uninstalled gvfs-backends and mtp-detect does detect the device. Maybe I need to install some KIO-related package?

More details in my question here where you also comment or reply if you have an idea what I could try: https://unix.stackexchange.com/questions/803250/how-to-browse-android-device-on-debian-13-kde-in-dolphin-error-kio-client-the-f