How to reset MTP state?

If none of the more specific forums is the right place to ask

How to reset MTP state?

Postby kerryhall » 2020-09-11 18:05

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)
kerryhall
 
Posts: 201
Joined: 2008-08-19 11:06

Re: How to reset MTP state?

Postby CwF » 2020-09-12 00:25

How do you know it's not the phone?

If Thunar stops, disconnect the phone. My KaiOS (?) does this on occasion.
CwF
 
Posts: 790
Joined: 2018-06-20 15:16

Re: How to reset MTP state?

Postby kerryhall » 2020-09-12 19:20

Disconnecting the phone and reconnecting it has no effect, but restarting thunar causes things to work again, 100% of the time.
kerryhall
 
Posts: 201
Joined: 2008-08-19 11:06

Re: How to reset MTP state?

Postby Deb-fan » 2020-09-13 00:42

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.
Deb-fan
 
Posts: 954
Joined: 2012-08-14 12:27

Re: How to reset MTP state?

Postby sgosnell » 2020-09-13 13:59

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.
sgosnell
 
Posts: 862
Joined: 2011-03-14 01:49

Re: How to reset MTP state?

Postby kerryhall » 2020-09-15 21:47

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.
kerryhall
 
Posts: 201
Joined: 2008-08-19 11:06

Re: How to reset MTP state?

Postby CwF » 2020-09-15 22:03

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.
CwF
 
Posts: 790
Joined: 2018-06-20 15:16

Re: How to reset MTP state?

Postby kerryhall » 2020-09-15 23:58

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.
kerryhall
 
Posts: 201
Joined: 2008-08-19 11:06

Re: How to reset MTP state?

Postby Deb-fan » 2020-09-17 00:12

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. *
Deb-fan
 
Posts: 954
Joined: 2012-08-14 12:27

Re: How to reset MTP state?

Postby sickpig » 2020-09-17 00:27

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.
User avatar
sickpig
 
Posts: 575
Joined: 2019-01-23 10:34

Re: How to reset MTP state?

Postby Deb-fan » 2020-09-17 00:50

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. *
Deb-fan
 
Posts: 954
Joined: 2012-08-14 12:27

Re: How to reset MTP state?

Postby CwF » 2020-09-17 03:47

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.
CwF
 
Posts: 790
Joined: 2018-06-20 15:16

Re: How to reset MTP state?

Postby sgosnell » 2020-09-17 15:26

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.
sgosnell
 
Posts: 862
Joined: 2011-03-14 01:49

Re: How to reset MTP state?

Postby Deb-fan » 2020-09-18 05:52

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. *
Deb-fan
 
Posts: 954
Joined: 2012-08-14 12:27


Return to General Questions

Who is online

Users browsing this forum: rummy and 17 guests

fashionable