MTP Sync Rhythmbox Android


So I recently bought a Samsung Galaxy A53 and I’m trying to sync an automatic playlist from Rhythmbox. I’m having the error “Error mounting Android device. Unable to open MTP device”.

I’ve tried googling it for a couple of days and tbh I’m struggling. There’s at least a decade’s worth of different solutions that don’t seem to apply to modern versions of Android. It’s not a pressing issue, I have a 120GB iPod Classic that serves this purpose, but I was wondering if anyone has had a similar MTP issue with Android and if you managed to fix it.

I have tried:

  • making sure the phone is unlocked when attempting
  • making sure that the phone is not already mounted in Dolphin
  • attempting before Dolphin was open
  • Going into developer options > Default USB Configuration > Transferring files (none of them explicitly say MTP, but this seems the most likely?)
  • Finding USB drivers on the Play Store. Didn’t think it would work. Didn’t work. One google result said it was worth a shot.
  • installing mtp libraries. These seem to have become unnecessary in the years since that particular search result was written.

I can add tracks manually via KDE Connect (which is excellent, btw), but I would like to add an automatic playlist that dynamically changes. Anyway, it’s not that big a deal if I end up not putting music on my phone this way, but if you happen to have encountered and fixed this before I’m all ears.

Syncthing is your friend

Is it? if I just want to manually put tracks on my phone I can do that already. I specifically want playlists as they are dynamically created on rhythmbox to be put on my phone. How does syncthing achieve that?

I saw someone online suggest getting rhythmbox to synchonise with a local folder, and then synchronise that local folder with my phone. This is what I imagine you’re suggesting to do with syncthing. I could do that already, but I can’t find the functionality in Rhythmbox to treat a local folder as if it were a device.

Apart from Rhythmbox, are you able to access the phone via MTP in other applications like Dolphin?

It seems like MTP has separate implementations in GVFS (GNOME), KIO (KDE), and a variety for FUSE. While GVFS and FUSE create mountpoints that would be visible in mount, I do not think that KIO slaves necessarily do that, so KIO-based MTP connexions might not be visible in mount.

From what I can gather at a glance, only one MTP connexion is probably allowed at a time; so perhaps the issue is that Dolphin or another KIO application is keeping the device’s MTP connexion open, which is blocking Rhythmbox from using GVFS? Rhythmbox is a GNOME application.

This is probably over WiFi/WLAN though, right? Not via the USB connexion?

If the alternative is “Transferring photos” or something similar, then it is probably a choice between PTP and MTP, and “Transferring files” is likely MTP.

There is a 2019 AskUbuntu post about needing to tell Android to become accessible over USB rather than merely charging:

I also found a mention about something In the backend needing additional permissions… can you see any errors in GVFS or Rhythmbox’s log files? Unfortunately I do not know where those might be.

Isnt the P in PTP “photos” and M in MTP is music? This was the old paradigm when ipod got out with just MTP and PTP came with the iphone/itouch devices?

@cakeisamadeupdrug I’ve skipped the problem entirely with something like a navidrome+koel player(or any subsonic protocol player)

PTP is for picture transfer protocol, but MTP is more generically “media transfer protocol”.

MTP was made by Microsoft, is based on PTP, and can incorporate Windows Media Player DRM, so it seems like this may have been created as an alternative to the AFC (Apple File Conduit) that iTunes and iOS devices use (whether non-iOS iPods used this, I do not know). The Android implementation of MTP apparently adds some extensions to Microsoft’s MTP specification.

I do not think original (non-iOS) iPods supported either protocol, but I am fairly confident that iOS does implement PTP, since connecting it to a computer without any official or unofficial (libimobiledevice) drivers still shows you a digital camera file structure (DCIM, etc.) with the pictures on the device.

Dolphin can see it, but it gives the error message that the path to whatever USB it’s plugged into doesn’t exist.

Correct. It’s gigabit, so would be adequate for putting music on there, but wouldn’t allow the automatic playlists which would be annoying.

I’m getting the same error as this person so I’m sure this is it, but all of the described options seem to have shuffled around since that post was written. I can’t find anything relating to USB charging in that menu. In fact I had to unlock the developer options to get any USB charging and file transfer options. In there I get options for Transferring Files, USB tethering, MIDI, Transferring images and Charging phone only. If anything but “transferring files” is selected the phone stops being discoverable in Dolphin and Rhythmbox, but regardless of what’s selected I can’t actually browse it in Dolphin or Rhythmbox.

This seems accurate. I have no issue at all using my 2007 iPod Classic in Linux, but my iPhone 8 on iOS 15.4.1 is another story. I suspect if the old iPod used MTP it’d have the same issue as the two phones (well certainly the Samsung phone, anyway).

ok update: I changed absolutely nothing, and I was just able to navigate my phone via Dolphin… am going to attempt putting Lord of the Rings on there as a test. Am using a twitch stream as a means of keeping the phone from locking due to inactivity

Another update: It stayed connected long enough to transfer the uncompressed blu ray of The Fellowshup of The Ring extended edition, at least. I guess I can’t really test rhythmbox while I still have dolphin open for things… I don’t seen an option in Dolphin to unmount it

ok third update. I can reasonably reliably get Dolphin to access it now: it involves unplugging and re-plugging in the phone so that I get the “allow access” prompt. Still no luck with Rhythmbox though.

Fourth update. Rhythmbox is working now… again, I changed nothing lmfao

Fifth edit: it’s definitely some order of operations thing. I had to open Dolphin to get at a spreadsheet, and that seemed to auto-mount my phone because it introduced the old errors in both itself and rhythmbox. Rhythmbox couldn’t re-mount my phone until I restarted my PC. Wonder if there’s a way of having Dolphin not automatically detect my phone, because using it is going to be a PITA if I can’t navigate my own desktop without breaking MTP.

1 Like

Seems like you have to perform a secret Ritual of Unbreaking.

1 Like

This really does sound like a resource contention issue; I looked at the Arch Wiki and while the issues listed there do not match the errors you are seeing, the section “kio-mtp being called simultaneously by different services” describes issues with Dolphin and Amarok fighting over MTP access, since only one can have access at a time. While the section is labelled KIO, the I am not positive that Amarok is actually using KIO, so this could be even more similar to your situation.

That section links a forum post which suggests that some errors might appear in dmesg when this contention occurs.

Sounds like the immediate solution is to somehow disable Dolphin’s automatic MTP connexion. Far too many articles/posts I have found talk about disabling everything except Dolphin, so I have not yet found how to do that. Maybe take a look through the settings? A more blunt workaround could be disable Dolphin’s MTP support entirely, assuming that is an option or extension somewhere.

Yeah I’m inclined to agree with you. Personally I think the solution would be to just not use Rhythmbox. The ability to navigate the device is more useful and more painfree than the ability to sync automatic playlists. (Even when it worked Rhythmbox wasn’t without other issues) so if I had to pick one of the two functionalities to keep for the sake of convenience, I’d rather not disable Dolphin’s MTP support.

That really is a shame; I wish there was some kind of mutex for MTP access so you could use both.

If you are up for it, it might be worth sending an email or commenting on a bug report to the Dolphin developers, Rhythmbox’s developers, or both, that this is still an issue.

Yeah I’ll do that when I have a minute. To be honest I’m kind of surprised that this isn’t more commonly talked about. I would imagine that most Linux users have Android phones so presumably are reasonably likely to run into this. Maybe they just tend to do what I’m likely to do and get an unreasonably large microSD card and just dump everything on it xD

Then again I guess the whole “connect your PC and sync with this software application, particularly for music” is more of an Apple thing.

In general I suspect that is being killed off everywhere in favour of simply storing in the cloud or streaming. Apple’s iTunes contact synching has been a bit flaky for years, but no one writes about that because in 2022 of course you store all your contacts with Apple or Google, right?

“Local storage is sooo last century; what do you think this is, a PDA or something?”

I am being facetious, but I perceive this to be the general attitude among those who write about or report on technology, in English at least.

Already many years ago, I remember being surprised by how common the suggestion of online webapps as Linux substitutes for Windows programs was. When explaining what to use in lieu of Word or Outlook, the first suggestion was frequently to use Google Docs or webmail, even if Thunderbird or Libreoffice were later mentioned.

KDE Connect and streaming or cloud storage probably fill enough use cases that keeping application-specific local device syncing is seen as less of a priority. I suspect that many unwilling to trust the cloud might also be unwilling to let applications like Rhythmbox manage their syncing for them, which makes this even more of a niche.

It really is a shame, since these sorts of simple local syncing features would probably help newcomers to Linux the most.

Oh no doubt. Google and Microsoft started the ball rolling with Google Drive and OneDrive/Sky Drive, but as soon as Apple started selling cloud storage that was definitely the final nail in the coffin. It’s not in anyone’s interest to put adequate storage in a device when they can sell virtual storage by the gigabyte. I guess this is the saving grace of Android that the handsets are generally not being sold by Google and in fact that one of the biggest manufacturers of Android phones also happens to be the biggest manufacturer of solid state storage too…

What I will say is that I personally hate the Cloud. I don’t trust companies with data that has any real value, I don’t trust the bandwidth and latency to always be such that I won’t notice that it’s not local, I don’t trust that I’m always going to stay in an area with a good internet connection when I’m (for example) driving across the country, and I can’t stand the extremely noticeable compression artefacts in streamed audio and video media. To be honest even an open source encrypted “cloud” that I hosted myself wouldn’t get around the majority of the issues I have with the cloud itself.

I have about 300GB of audio CD rips on my PC. This is why I use automatic playlists, because I’m not going to listen to it all in a day so there’s no real reason it all needs to be stored locally at once. Back in the day this functionality is why I didn’t even have an issue with having a 16GB iPhone – iTunes’s ability to just put 4GB of music on a phone at once and then swap out what I’d listened to that day when I charged my phone was good enough, and tbh that’s what I was hoping to do with my Samsung now. I don’t have a problem trusting rhthmbox to sync music, it’s only following the predetermined rules I’d set (album → does not contain → christmas. limit to → 70GB when sorted by → Last Played)

I do think the key difference is that microSD slot. Even 128GB internal is not enough for my entire library, but I think it’s going to take a long time to fill up 1TB. Automatic playlists would be nice to have on Android, but they are a functional necessity on iOS as far as I’m concerned.

My final thought is that I’m waiting for the year of the Linux Handset, where the phone OS and its functionality are developed by people who use it, rather than people who use it to sell us services.