From Gentoo Wiki
Jump to: navigation, search

MTP (Media Transfer Protocol) is a protocol to allow the transfer of files to external devices. It is provided by several programs, most of them depending on FUSE.



Prepare for MTP implementations by activating CONFIG_FUSE_FS in the Linux kernel.

KERNEL Enable FUSE for MTP implementations:
File systems  ---> 
   <*> FUSE (Filesystem in Userspace) support

Available software

Here are some MTP packages available in Gentoo:

Name Package Homepage Description
MTPfs sys-fs/mtpfs A FUSE-based filesystem providing access to MTP devices. More mature than some of the alternatives.
Go-mtpfs sys-fs/go-mtpfs A simple FUSE-based filesystem written in Go language.
gphotofs media-gfx/gphotofs gphotofs is a FUSE-based file system for interfacing with digital cameras using the gphoto2 application.
simple-mtpfs sys-fs/simple-mtpfs Like the others: a simple MTP FUSE filesystem driver written in C++.
Gnome gnome-base/gvfs Install gnome-base/gvfs with the mtp USE flag enabled. This can be either globally in make.conf's USE flag or for gnome-base/gvfs in package.use.
Thunar xfce-extra/thunar-volman To have Thunar automount MTP devices (and other volumes), install the xfce-extra/thunar-volman package.



kio-mtp is a slave for KDE's KIO framework. It is still unstable, but it is in the main repository.

First, install:

root #emerge --ask kde-misc/kio-mtp

Quit KDE, and (re)launch it again. Now the MTP devices should appear in Dolphin.


kio-extras contains MTP support, but it requires the mtp USE flag.

Enable the global mtp use flag:

FILE /etc/portage/make.conf
USE="$USE mtp"

Alternatively, enable it in kio-extras:

FILE /etc/portage/package.use
kde-apps/kio-extras mtp

Then emerge:

root #emerge --ask kde-apps/kio-extras

After this, quitting KDE and restarting is probably sufficient to get it working.

If that does not work, please try restarting the system.


gMTP is a simple MTP client for Solaris and Linux.

It is sufficient to just install and run media-sound/gmtp:

root #emerge --ask media-sound/gmtp
user $gmtp

Click on connect. A few second later, the file hierarchy on the device should appear. It is now possible to manipulate the files on the device. It support features like Album Artwork and playlists.


  • If the device is not recognized by libmtp, try upgrading to latest (or even live) version - (presently v1.1.12).
  • Some ROMs (e.g. PAC ROM) require the unlocking of the screen of the device before files will appear. If the screen is not unlocked the device will appear empty.
  • Sometimes (specifically on HTC One X) USB debugging automatically activates when device is connected to a PC. USB debugging must be disabled, otherwise libmtp can't recognize device.
  • Make sure the Android device is not going to sleep and the screen is not getting locked. Set screen timeout to very long values, or enable in Development section flag "Do not turn off the screen".
  • Lumia devices might require media-libs/libmtp version 1.1.9 and sys-fs/simple-mtpfs to be mounted properly.
    • Lumia devices must be unlocked to be able to connect (enter the user's PIN).

See also

  • MTPfs — a FUSE-based filesystem providing access to MTP devices.