Bug 478285

Summary: Android phone not detected since updating to Plasma 6
Product: [Frameworks and Libraries] kio-extras Reporter: Steven Eastland <seastland>
Component: MTPAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: major CC: elvis.angelaccio, nate, robby.engelmann, shubhamarora, sitter, thomas_anquetin
Priority: NOR Keywords: qt6, regression
Version: 24.01.80   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Steven Eastland 2023-12-08 22:56:06 UTC
SUMMARY
I can't access my phone in Plasma 6. When I plug it in in and select "File transfer / Android Auto" in the USB settings, the device notifier doesn't see it, nor is it visible in Dolphin's Places panel. It is detected by the kernel:

$ lsusb
Bus 001 Device 025: ID 18d1:4ee2 Google Inc. Nexus/Pixel Device (MTP + debug)

mtp-detect seems to think KDE has access to the device already:

$ mtp-detect libmtp
version: 1.1.21

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 27
Attempting to connect device(s)
libusb_claim_interface() reports device is busy, likely in use by GVFS or KDE MTP device handling alreadyLIBMTP PANIC: Unable to initialize device
Unable to open raw device 0
OK.

I am running Arch with the latest packages installed. I'm comfortable editing config files, etc. but I don't know how or where to look for any debug output for the kio-mtp process.

STEPS TO REPRODUCE
1. Plug in Android device and make it available for file transfer via MTP

OBSERVED RESULT
The device does not show in the device notifier or Dolphin's places panel.

EXPECTED RESULT
The device should be accessible in the device notifier and Dolphin's places panel.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Kernel: 6.6.4-arch1-1 (64-bit)
Comment 1 Shubham Arora 2023-12-09 15:04:08 UTC
Can confirm on both wayland and x11 session on up to date arch with kde-unstable repo enabled (core-testing/extra-testing)

mtp-connect 
libmtp version: 1.1.21

Device 0 (VID=18d1 and PID=4ee1) is a Google Inc Nexus/Pixel (MTP).
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
Android device detected, assigning default bug flags

Operating System: EndeavourOS 
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Kernel Version: 6.6.1-arch1-1-g14 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 6800HS with Radeon Graphics
Memory: 14.9 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: ROG Flow X13 GV301RA
System Version: 1.0
Comment 2 Robby Engelmann 2023-12-09 19:54:21 UTC
*** Bug 478037 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2023-12-11 22:18:16 UTC
Can also reproduce.
Comment 4 Bug Janitor Service 2023-12-12 06:41:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/solid/-/merge_requests/151
Comment 5 Harald Sitter 2023-12-13 05:24:53 UTC
Git commit 25e2b228653cceef77be9171916c3f0c4b93a54f by Harald Sitter.
Committed on 12/12/2023 at 07:40.
Pushed by sitter into branch 'master'.

predicate: match iterable elements when possible

this most notably ensures backwards compatibility where `foo=='bar'`
with foo being a QStringList and bar being a QString matching
implicitly.

make this behavior explicit.

fixes kio predicates no longer matching mtp devices in kf6

M  +5    -0    autotests/solidhwtest.cpp
M  +15   -2    src/solid/devices/frontend/predicate.cpp

https://invent.kde.org/frameworks/solid/-/commit/25e2b228653cceef77be9171916c3f0c4b93a54f