You are not logged in.

#1 2018-08-15 14:43:02

Condor
Member
Registered: 2017-12-01
Posts: 54

[SOLVED] Image viewer unable to load image from smartphone via MTP

Plugging in my smartphone via USB makes it accessible via the MTP protocol. Using Thunar file manager, I can browse the contents of the phone’s internal memory and SD Card. File operations like copying, renaming, deleting are possible from within Thunar. It is of course sometimes slow, clashes horribly when trying to access two folders from separate windows, but I attribute that to MTP.

Double-clicking a file, e.g. a JPEG photo, with the intent of viewing it will launch Ristretto image viewer. The photo however is not displayed. Same behaviour if I perform right-click, Open With and select XnView image viewer. Both applications then lock up for a while and do not respond to mouse clicks on their interface.

When I open XnView on its own and then browse for the photo on the smartphone through File -> Open and the file dialogue, it will load the image just fine. Ristretto fails as before. Both applications then lock up for a while, as before.

While recreating the steps of the paragraph above, my entire XFCE desktop froze, I could not operate any window or get a reaction from the panel. After killing the Ristretto and XnView processes from the console, it resumed working.

Is that known behaviour, linked to MTP? Are my expectations wrong that Ristretto should be able to open a file via MTP? Is there a known remedy?

Last edited by Condor (2018-08-19 19:33:30)

Offline

#2 2018-08-16 20:05:59

Anarconda
Member
Registered: 2002-12-23
Posts: 89

Re: [SOLVED] Image viewer unable to load image from smartphone via MTP

Same behavior here but in my case with dolphin and gwenview. I hope somebody can point us to a solution.


Scientia et sapientia patrimonium humanitatis sunt.

Offline

#3 2018-08-16 20:40:42

ooo
Member
Registered: 2013-04-10
Posts: 1,637

Re: [SOLVED] Image viewer unable to load image from smartphone via MTP

I tested with thunar and ristretto, and have no issues. The phone is Xiaoni Mi4c with latest Lineage OS.

Anything in journal when you try to access the MTP device?

Offline

#4 2018-08-16 21:09:42

Anarconda
Member
Registered: 2002-12-23
Posts: 89

Re: [SOLVED] Image viewer unable to load image from smartphone via MTP

Nothing interesting:

ago 16 23:06:26 Gaia kdeinit5[9434]: kde.kio-mtp: fileSystemFreeSpace: QUrl("mtp:/ONEPLUS A5000/Almacenamiento interno compartido/DCIM/Camera")
ago 16 23:06:26 Gaia kdeinit5[9434]: kde.kio-mtp: QUrl("mtp:/ONEPLUS A5000/Almacenamiento interno compartido/DCIM/Camera")
ago 16 23:06:26 Gaia kdeinit5[9434]: kde.kio-mtp: "/ONEPLUS A5000/Almacenamiento interno compartido" 2
ago 16 23:06:26 Gaia kdeinit5[9434]: kde.kio-mtp: [ENTER] false
ago 16 23:06:26 Gaia kdeinit5[9434]: kde.kio-mtp: found storage "Almacenamiento interno compartido"
ago 16 23:06:26 Gaia kdeinit5[9434]: kde.kio-mtp: [EXIT] 1
ago 16 23:06:26 Gaia kdeinit5[9434]: kde.kio-mtp: returning LIBMTP_devicestorage_t

Scientia et sapientia patrimonium humanitatis sunt.

Offline

#5 2018-08-17 06:17:10

seth
Member
Registered: 2012-09-03
Posts: 49,979

Re: [SOLVED] Image viewer unable to load image from smartphone via MTP

I can't tell you *why* it fails and have not tried since 2 years or so, but back then *every* MTP implementation (including gvfs and kio) sucked (because the protocol does) but at least https://aur.archlinux.org/packages/simple-mtpfs/ didn't make me bite my keyboard (because I assume it ignores most of the protocol…)

Offline

#6 2018-08-19 19:32:42

Condor
Member
Registered: 2017-12-01
Posts: 54

Re: [SOLVED] Image viewer unable to load image from smartphone via MTP

Hmpf… I guess I found the reason for the behaviour I was seeing – by accident :-)

After double-clicking a photo on the phone’s SD card, I was called away from the computer. Returning after a good twenty minutes, the picture was displayed. Along with the picture there were thumbnails of the other pictures in the DCIM folder of the phone’s camera. Imagine the time it takes to retrieve and downsize thumbnails for about 1,000 pictures from a phone’s SD card over MTP.

Throwing a hand of photos into a different folder confirms: Double-clicking one photo loads it in Ristretto – after having watched it loading thumbnails for all files.


I guess my specific problem is solved (or rather: explained). Thank you all for helping out!

Offline

#7 2018-08-19 19:37:41

kevku
Member
From: Estonia
Registered: 2009-11-21
Posts: 73

Re: [SOLVED] Image viewer unable to load image from smartphone via MTP

MTP has never worked in linux just forget it and use SSH

Offline

#8 2018-08-19 19:44:49

Condor
Member
Registered: 2017-12-01
Posts: 54

Re: [SOLVED] Image viewer unable to load image from smartphone via MTP

kevku wrote:

MTP has never worked in linux just forget it and use SSH

While that may be true, it is not the root of the problem here. MTP works, it is Ristretto stalling wile grabbing data for a huge number of thumbnails over a connection that isn't that efficient. I guess I would see the very same behaviour using SSH over a slowish connection.

Offline

Board footer

Powered by FluxBB