Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mounting android phone XFCE not fully working
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
sixtysixtysix
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jun 2021
Posts: 86

PostPosted: Sat Jul 10, 2021 10:16 am    Post subject: Mounting android phone XFCE not fully working Reply with quote

The reason I'm posting here and not on an XFCE forum because:

I have a dual boot system. Thus the same hardware works fine under Arch linux and XFCE4. Under Gentoo (which I prefer, thus wanting to make the efforts to fix this) I can't quite get Thunar to see my mobile phone.

I HAVE INDEED read the wiki entry and followed all of those steps. I have read the post here in Kernels regarding this issue.

I have configured FUSE support in the kernel. I have installed all the drivers I can find, followed all relevant instructions (as far as I'm aware).

What works:

the phone does connect to the hardware thus 'lsusb' shows my phone correctly.

If I open gMTP it will indeed open a GUI and allow me to browse to the photos (only) on my android phone. The "file transfer" option on my phone makes no difference, I can only open the camera folders not the filesystem browser (as I can on my other install).

Thus I can conclude that imy phone is connected to a degree. I need to fix this is because firstly I have no means of updating or editing the mp3 library on the phone (in Gentoo, it all works fine if I reboot into Arch) but also because I use Shotwell for my photos. For a while now there has been a problem with one of the Gnome libraries under Shotwell and something to do with it not seeing the contents of my phone. It sees the phone, but shows it as empty. My previous workaround for this was to simply open Shotwell, open the camera folder inside Thunar, and manually drag the photos into Shotwell. The reason I did this is because Shotwell is pointed at my backup photo store, and adds photos to that library using specific name formatting.

So, I don't particularly mind HOW I fix this finally, but clearly there's something not yet fully joined up and I've no idea how to find it or what I should be looking for. I've done obvious things like check use flags etc. can't find anything obvious.

Does anyone have any suggestions for commands I can run, things I can check, to find out why this isn't fully working? It is going to be quite a problem if I cannot use my phone with my computer.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Sat Jul 10, 2021 5:55 pm    Post subject: Reply with quote

Hi
Is
Code:

gnome-base/gvfs

built with USE="mtp elogind policykit"
?
You can check with
Code:

equery u gvfs

_________________
:)
Back to top
View user's profile Send private message
sixtysixtysix
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jun 2021
Posts: 86

PostPosted: Sat Jul 10, 2021 6:47 pm    Post subject: Reply with quote

Thank you so much for helping with this!

To answer your question:

no, it wasn't but it is now. I'm pretty careful with use flags, despite being new to Gentoo. Having understood the principle, I like to make sure everything has what it needs (beyond perhaps the choices asked by autounmask).

If it's of interest, I added the missing MTP flag use, threw in NLS and FUSE for good measure, but I note that unlike many packages I emerge, gnome-base/gvfs doesn't list any flags at emerge time, and therefore didn't ask, therefore I didn't set any.

I re-emerged it after setting the flags, heck I even rebooted. Sadly the problem persists. I still cannot see the device inside the file manager.

I'm happy to accept that this is likely to be a flag issue, based on this one package. Is there a way I can find out what all the necessary (as opposed to bare minimum) flags should be for the relevant packages installed for this case?
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Sat Jul 10, 2021 6:59 pm    Post subject: Reply with quote

Do any of these
Code:

* sys-fs/go-mtpfs
     Available versions:  (~)1.0.0^st
     Homepage:            https://github.com/hanwen/go-mtpfs
     Description:         a simple FUSE filesystem for mounting Android devices as a MTP device

* sys-fs/jmtpfs
     Available versions:  (~)0.5-r1
     Homepage:            https://github.com/JasonFerrara/jmtpfs
     Description:         A FUSE and libmtp based filesystem for accessing MTP devices

* sys-fs/mtpfs
     Available versions:  1.1-r5 {debug mad}
     Homepage:            https://www.adebenham.com/mtpfs/
     Description:         A FUSE filesystem providing access to MTP devices

* sys-fs/simple-mtpfs
     Available versions:  0.4.0
     Homepage:            https://github.com/phatina/simple-mtpfs
     Description:         Simple MTP fuse filesystem driver



work for manually mounting your phone?
Also if you use
Code:

emerge -1av <package>

you will be able to see the USE flags before emerging
-v --verbose does that
_________________
:)


Last edited by alamahant on Sat Jul 10, 2021 7:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
sixtysixtysix
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jun 2021
Posts: 86

PostPosted: Sat Jul 10, 2021 7:05 pm    Post subject: Reply with quote

this one worked:
Code:
$ mtpfs
Listing raw device(s)
Device 0 (VID=2717 and PID=ff40) is a Xiaomi Mi-2s (id2) (MTP).
   Found 1 device(s):
   Xiaomi: Mi-2s (id2) (MTP) (2717:ff40) @ bus 1, dev 7
Attempting to connect device
Android device detected, assigning default bug flags


it hangs, by which I mean it gets to that last line, and then nothing happens insofar as I'm not returned to the prompt.

If I open up Thunar while running the above, I still cannot see my phone.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Sat Jul 10, 2021 7:08 pm    Post subject: Reply with quote

Plz try
Code:

 mtpfs -o allow_other /mnt

Also according to
https://wiki.archlinux.org/title/Media_Transfer_Protocol
you need to have
Code:

user_allow_other

in
/etc/fuse.conf
_________________
:)
Back to top
View user's profile Send private message
sixtysixtysix
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jun 2021
Posts: 86

PostPosted: Sat Jul 10, 2021 7:13 pm    Post subject: Reply with quote

I have the fuse.conf set as per the wiki. Your suggestion returns the following:
Code:
~ $  mtpfs -o allow_other /mnt
Listing raw device(s)
Device 0 (VID=2717 and PID=ff40) is a Xiaomi Mi-2s (id2) (MTP).
   Found 1 device(s):
   Xiaomi: Mi-2s (id2) (MTP) (2717:ff40) @ bus 1, dev 7
Attempting to connect device
Android device detected, assigning default bug flags



Still no device visible.

Racking my brains here trying to think of stuff... in what should be a non-related issue, I recently reset the permissions for my home folder to "default 644" as per some other google search, after having messed something up inside ~/.config. All packages relevant to this issue however have been install since I did that and I don't imagine it's connected but...
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Sat Jul 10, 2021 7:17 pm    Post subject: Reply with quote

Quote:

MTP needs to be enabled on the device

Is it?
Also try it with pcmanfm instead of thunar.
_________________
:)
Back to top
View user's profile Send private message
sixtysixtysix
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jun 2021
Posts: 86

PostPosted: Sat Jul 10, 2021 7:22 pm    Post subject: Reply with quote

from all I've been able to understand:

the device (phone) is both open when connected, and I've tried switching between "file transfer" and "transfer photos" - which under Arch (which works) gives me access to different directories, and under different apps (e.g. Thunar vs Shotwell vs <some other app>).

To test I've been plugging/unplugging the device (the cable works, I'm 100% confident) with the device open, switching between the protocols. Nothing shows up.

Please note that in my original post I drew the distinction that this all works flawlessly on the same hardware under a different kernel. Not being a dick, Gentoo's superb, but it seems that I have a basis for comparison. If it works in Linux, with XFCE, then clearly there must be some tiny difference between XFCE under Gentoo and XFCE under Arch?
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Sat Jul 10, 2021 7:26 pm    Post subject: Reply with quote

Quote:

Please note that in my original post I drew the distinction that this all works flawlessly on the same hardware under a different kernel

You mean it works with Arch prebuilt kernel and NOT with Gentoo custom made kernel?
Then it has nothing to do with xfce thunar etc and its all about the kernel missing config in Gentoo.
No?
Is this an accurate description?
_________________
:)
Back to top
View user's profile Send private message
sixtysixtysix
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jun 2021
Posts: 86

PostPosted: Sat Jul 10, 2021 7:36 pm    Post subject: Reply with quote

Well, that's a perfectly reasonable question except that again - referring to my initial post - I believed I've followed ALL the steps necessary. I've put FUSE support into the kernel, along with NTFS and EX-Fat etc.

For context: this all came to light just yesterday when I began by trying to back up some other files to a Seagate external HDD. It wouldn't mount under Thunar. So off I went and, oh horror, somehow my last kernel build hadn't included FUSE support. So, I've rebuilt to include all necessary. Now I can plug in the Seagate (which uses NTFS partitions) and it mounts and reads and I can sync to it with rsync.

So in one sense yes, it *could* be a kernel setting. Except that... well, I believe I have everything necessary to mount my phone.

The tests here have shown that the device connects at the hardware level, thus how can it be the kernel? (genuine question).

If I plug in the Seagate drive I get expected behaviour i.e. it pops into the sidebar menu in Thunar and I'm able to interact.

So I have no reason at present to believe my kernel is wrongly configured. It may be, but if it is I don't know what else I should be checking for.

To be clear then: yes, it works fine with an Arch pre-built kernel.

My own configs go via genkernel, thus I don't feel I'm starting from some stripped-bare config but simply adding in things I need.

My ENTIRE reason for learning to understand Gentoo is to do with this idea that (as I understand it) packages are built against target rather than pre-packaged with a bunch of defaults. That Gentoo is noticeably better in everyday use (clearer screen, better font rendering, all apps work as they should with no missing or inoperable features as found under Arch) is the reason for trying to discover if this issue here can be fixed, or whether I have to live with the idea that for certain operations I have to boot into a different kernel entirely :)
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Sat Jul 10, 2021 7:44 pm    Post subject: Reply with quote

Two things
We do in Gentoo also have a prebuilt super fantastic kernel like Arch.
It is called
gentoo-kernel-bin.
Its use is generally frowned upon but no one is going to think less of you or whip you if you use it for testing or otherwise.
Second
Plz go to your Arch
and run
Code:

pacman -Q | grep gvfs
pacman -Q | grep mtp
pacman -Q | grep fuse


and try to find out what Arch is using to perform the mounting.
You might even look at the logs.
Then come back to Gentoo and try to reproduce this.
I would definitely try with jmtpfs and creating a noauto mount entry in fstab.
Its the one that looks more promising than the rest..........
:)
_________________
:)
Back to top
View user's profile Send private message
sixtysixtysix
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jun 2021
Posts: 86

PostPosted: Sat Jul 10, 2021 7:45 pm    Post subject: Reply with quote

okay, thank you I shall do this.

I'll report back tomorrow after I've been able to run the tests in Arch :)
Back to top
View user's profile Send private message
sixtysixtysix
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jun 2021
Posts: 86

PostPosted: Mon Jul 12, 2021 8:42 am    Post subject: Reply with quote

right then!

Well, the issue is resolved - finally.

Long story short I decided to do a complete reinstall. Not because of this issue, but it added to a few other niggling issues and since I'm new to Gentoo I felt it couldn't be a bad thing to go through it all again.

I believe it was a USE flag!

Previously I would read the information in the terminal from
Code:
# emerge --ask <package_name>
and either act accordingly or let autounmask advise me. This time around I went through everything with reference to the wiki and the discrete package listings, adding global flags where advised.

Not sure which one it was finally, but I remember suddenly seeing the phone appear in the file manager sidebar...

Thanks for your help! Without it I wouldn't have looked again, nor indeed fixed it :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum