Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How to reset MTP state?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
kerryhall
Posts: 275
Joined: 2008-08-19 11:06
Has thanked: 3 times

How to reset MTP state?

#1 Post by kerryhall »

I connect my phone to my computer often to transfer files.

I use thunar for my file manager, and thunar mounts the phone.

Everything works fine most of the time, but every so often things get into a "bad state" where I am unable to open the phone. (There is no error message as nothing happens when I try to open the phone)

This is fixed by restarting thunar, but unfortunately this is effectively a loss of work, as I usually have 10-20 thunar windows open (one per project) and each with multiple tabs. Restarting thunar is usually a 15-30 minute process as I have to get all my workspaces set up again for each project. The time spent isn't even the worst of it, it's trying to remember what was set up where, and the context switching penalty that comes with that. It feels like paying multiple context switching penalties all at once.

Is there a way to reset the MTP state without having to restart thunar?

Or is there a way to restart thunar, preserving all open windows, tabs, and workspace locations?

(ie, the thunar window I have open for a pcb design project would end up on the pcb design workspace, etc.)

(and yes, I do have that many projects going at once, the workflow works for me as long as the software behaves itself)

CwF
Global Moderator
Global Moderator
Posts: 2636
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: How to reset MTP state?

#2 Post by CwF »

How do you know it's not the phone?

If Thunar stops, disconnect the phone. My KaiOS (?) does this on occasion.

kerryhall
Posts: 275
Joined: 2008-08-19 11:06
Has thanked: 3 times

Re: How to reset MTP state?

#3 Post by kerryhall »

Disconnecting the phone and reconnecting it has no effect, but restarting thunar causes things to work again, 100% of the time.

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: How to reset MTP state?

#4 Post by Deb-fan »

Some thoughts, get rid of the cord, android has apps for everything, sftp-etc, full servers etc. Can transfer files via wifi or use bluetooth. Also agree w CwF, could be some setting or oddity with Android/phone. If you havent already enable developer options on it. Couple settings, one is choosing default action when plugged, one of the options is mtp there, also a setting for telling it to never sleep too. Have mine set to do the default mtp when plugged, worked for awhile, notice lately the phone disregards my preference and sets to charging anyway.

Haven't bothered resolving it, installed a sftp server app a long time ago and didn't bother setting it up yet either but having to dis/connect a dang phone in 2020 w a gazillion apps available free is kinda silly and a real PITA.

sgosnell
Posts: 975
Joined: 2011-03-14 01:49

Re: How to reset MTP state?

#5 Post by sgosnell »

There is a thread on another forum I read which suggests that this is caused by voltage issues, and the problem goes away if the phone is connected through a powered USB3 hub. I assume you're connecting directly to a port in the PC, so perhaps try using a hub and see if that helps.
Take my advice, I'm not using it.

kerryhall
Posts: 275
Joined: 2008-08-19 11:06
Has thanked: 3 times

Re: How to reset MTP state?

#6 Post by kerryhall »

Deb-fan wrote:Some thoughts, get rid of the cord, android has apps for everything, sftp-etc, full servers etc. Can transfer files via wifi or use bluetooth. Also agree w CwF, could be some setting or oddity with Android/phone. If you havent already enable developer options on it. Couple settings, one is choosing default action when plugged, one of the options is mtp there, also a setting for telling it to never sleep too. Have mine set to do the default mtp when plugged, worked for awhile, notice lately the phone disregards my preference and sets to charging anyway.

Haven't bothered resolving it, installed a sftp server app a long time ago and didn't bother setting it up yet either but having to dis/connect a dang phone in 2020 w a gazillion apps available free is kinda silly and a real PITA.
Thank you, I think this is probably the best option. I was originally shying away from this as my phone seems to have issues with sending texts while on wifi, but I will have to address that with my phone.

CwF
Global Moderator
Global Moderator
Posts: 2636
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: How to reset MTP state?

#7 Post by CwF »

I mentioned my cheap phone. Flip!! with 32GB, bt's to my system fine, 3.5mm headphone! wifi's off but there, data is off. Not bulky, no touch screen, no movies, no games, no apps, no playstore, but works well otherwise - a PHONE and audio player. I'm glad to have ditched the smartphone. I'd rather have an ancient pda, and my reliable flipper.

It always is mtp, and charges at the same time. No other mode. The OS is stupid simple and can hang when plugged into the computer if you mess with the menus, or start it off not on the home screen, or gets a call while hooked up. I hook it up, transfer files, disconnect it. Leave it on not mounted and it's fine. I intend to use it until there is no tower to talk to, fortunately it's the new 600MHz and should work for a decade.

kerryhall
Posts: 275
Joined: 2008-08-19 11:06
Has thanked: 3 times

Re: How to reset MTP state?

#8 Post by kerryhall »

Deb-fan wrote:Some thoughts, get rid of the cord, android has apps for everything, sftp-etc, full servers etc. Can transfer files via wifi or use bluetooth. Also agree w CwF, could be some setting or oddity with Android/phone. If you havent already enable developer options on it. Couple settings, one is choosing default action when plugged, one of the options is mtp there, also a setting for telling it to never sleep too. Have mine set to do the default mtp when plugged, worked for awhile, notice lately the phone disregards my preference and sets to charging anyway.

Haven't bothered resolving it, installed a sftp server app a long time ago and didn't bother setting it up yet either but having to dis/connect a dang phone in 2020 w a gazillion apps available free is kinda silly and a real PITA.
What app did you use? I tried SSHelper but I am unable to write to my sd card.

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: How to reset MTP state?

#9 Post by Deb-fan »

Haven't set it up yet, so cant make a specific recommendation of an app. Being Android am 100% certain there's no shortage of good one's for this type of thing though. If-when i do get it working will try to post something on it and hopefully you'll do the same, at least which apps we used. Really need to, because im in the same boat and having to frequently un/plug a phone gets old fast. :)
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
sickpig
Posts: 589
Joined: 2019-01-23 10:34

Re: How to reset MTP state?

#10 Post by sickpig »

kerryhall wrote:What app did you use?
No need for any external app.
You can use Android's built-in debug bridge - ADB to securely transfer files between your computer and Android via wifi. The transfer is encrypted and you can use adb push - pull commands to send data back and forth.

Or better use syncthing. It syncs data using peer to peer direct connections. Works on wireless as well as cellular. ADB I suppose only works over wired or wireless but not over cellular.

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: How to reset MTP state?

#11 Post by Deb-fan »

Seems a good suggestion too. Only ever played with ADB so hazy on what's involved in setting it up and using it too. Still would have to be worth investigating, im likely to go with one of the dedicated apps for doing this type of thing. Easy way to toggle the thing on/off, a shiny easy to use user interface, set ports or port forwarding etc. Either way whatever works, works. Tech is supposed to make our lives easier, if something a geek is doing is hard, aggravating and tedious they aren't doing it right and should explore using better options. :)
Most powerful FREE tech-support tool on the planet * HERE. *

CwF
Global Moderator
Global Moderator
Posts: 2636
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: How to reset MTP state?

#12 Post by CwF »

Solution depends on whether you're ok using the phone's interface or if you'd prefer mousing around on a desktop. I prefer acting from the desktop, and use Thunar for the job. Do it right and it works fine, and faster.

sgosnell
Posts: 975
Joined: 2011-03-14 01:49

Re: How to reset MTP state?

#13 Post by sgosnell »

Has the OP tried using a powered USB hub between the PC and the phone? On the rather quick searching I did, that seems to be the common solution. But I have no actual experience with it.
Take my advice, I'm not using it.

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: How to reset MTP state?

#14 Post by Deb-fan »

Thunar can handle sftp and remote shares too etc. Per usual it's not that there's a shortage of solutions, so many cool options it'd be hard to pick, lol. Would of course want something seamless and that works well both ways, pc to device, vice versa. Haven't bothered settling on a good approach yet. Still ... also as usual all the pieces-tools and info anyone could need are avail.

Wanted to note another potential point of failure, one of the usb cords i use has a loose plug, if i have a device plugged and move the thing around, yep will lose connection. Seems another good reason to cut the cord and connect via a better method. :)
Most powerful FREE tech-support tool on the planet * HERE. *

Post Reply