openDsh / dash

Join us on Slack! https://join.slack.com/t/opendsh/shared_invite/zt-la398uly-a6eMH5ttEQhbtE6asVKx4Q
GNU General Public License v3.0
238 stars 69 forks source link

Samsung Galaxy S9 - Unable to open MTP device "001,006" error #104

Closed vedranius closed 2 years ago

vedranius commented 2 years ago

RPi 4 4GB, latest installations, latest Android auto.

Hi, I'm trying to connect my Galaxy S9 via USB and I get the error Unable to open MTP device "001,006" And when that error doesn't show up, I only get white screen...

Any solution to this? EDIT: I've also tried another S9 and it's the same. Galaxy A8 works OK. But, as far as I know, latest Android available for S9 has AndroidAuto built-in. So that might be causing the problem? In the Crankshaft S9 works without the problem. Tnx!

robert5974 commented 2 years ago

I've always gotten that "MTP" error (non-error) even when I used the Galaxy Note 9 to now with a OnePlus 8T. If you aren't having consistent success when connecting, maybe try a different cable.

Are you using a Pi4?

Robert Crowley

On Thu, Oct 7, 2021, 3:22 AM vedranius @.***> wrote:

RPi 4 4GB, latest installations, latest Android auto.

Hi, I'm trying to connect my Galaxy S9 via USB and I get the error Unable to open MTP device "001,006" And when that error doesn't show up, I only get white screen...

Any solution to this?

Tnx!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openDsh/dash/issues/104, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLUDVBUKIBII27PO4TUZILUFVDCPANCNFSM5FQSI7WA .

vedranius commented 2 years ago

I've always gotten that "MTP" error (non-error) even when I used the Galaxy Note 9 to now with a OnePlus 8T. If you aren't having consistent success when connecting, maybe try a different cable. Are you using a Pi4? Robert Crowley On Thu, Oct 7, 2021, 3:22 AM vedranius @.***> wrote: RPi 4 4GB, latest installations, latest Android auto. Hi, I'm trying to connect my Galaxy S9 via USB and I get the error Unable to open MTP device "001,006" And when that error doesn't show up, I only get white screen... Any solution to this? Tnx! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#104>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLUDVBUKIBII27PO4TUZILUFVDCPANCNFSM5FQSI7WA .

Yes, I'm using RPi 4 4GB. I'll try different cable. But with same cable it works under Crankshaft and in Dash with other Galaxy A8... So that shouldn't be a cable problem... or?

r1de commented 2 years ago

I'm also using an RPi 4 and I get this error too with a Galaxy A12, everything seems to work regardless of the error. Also tried Crankshaft before I switched to OpenDash, the error did not show with Crankshaft. Same Phone and Cable. I have tried to create the proper (AFAIK) udev rules, but it did nothing.

It used to worry me, but now I click on "OK" and forget about it.

I'll have to try my old phone a see if it is different.

edit 1 day later I upgraded my raspbian and noticed there were updates to bluez and other BT stuff. Now I no longer get the MTP device error, and all I get in dash is a white screen where AA used to be. The AA icon turns blue even.

r1de commented 2 years ago

Not sure if this will help, but here are some console logs. I'm still getting a blank white screen where AA used to be. It seems like AA is running, but it is just not updating the graphics on the screen. Tried a different phone and different cables, nothing works. Both phones showed all the icons as if AA was running normally, the Dash AA Icon turns blue, but it's just a white screen. I sometimes get the "MTP device" error and sometimes I get a popup to mount the phones filesystem, which quickly disappears on it's own. In either case, I still end up with a blank white screen instead of AA.

For me, This just started when I upgraded the Pi via apt. Perhaps some upgraded library is not playing nicely with dash anymore? I also re-compiled from scratch after the system upgrade and the issue persists.

In some of these log files I was messing around with the phones settings while it was connected, so there may be some additional weirdness in them. I can provide new ones if needed.

DashLog-rebuild-new-2.txt DashLog-rebuild-new.txt DashLog.txt

robert5974 commented 2 years ago

Are you using Raspberry Pi OS w/ full desktop or lite or some other OS?

Do you have an openauto.ini file in the bin directory of dash?

Robert Crowley

On Sun, Oct 10, 2021, 10:28 PM Eric @.***> wrote:

Not sure if this will help, but here are some console logs. I'm still getting a blank white screen where AA used to be. I seems like AA is running, but it is just not updating the graphics on the screen. Tried a different phone and different cables, nothing works. Both phones showed all the icons at AA was running, the Dash AA Icon turns blue, but it's just a white screen. I sometimes get the "MTP device" error and sometimes I get a popup to mount the phones filesystem, which quickly disappears on it's own. In either case, I still end up with a blank white screen instead of AA.

For me, This just started when I upgraded the Pi via apt. Perhaps some upgraded library is not playing nicely with dash anymore? I also re-compiled from scratch after the system upgrade and the issue persists.

In some of these log files I was messing around with the phones settings while it was connected, so there may be some additional weirdness in them. I can provide new ones if needed.

DashLog-rebuild-new-2.txt https://github.com/openDsh/dash/files/7319106/DashLog-rebuild-new-2.txt DashLog-rebuild-new.txt https://github.com/openDsh/dash/files/7319107/DashLog-rebuild-new.txt DashLog.txt https://github.com/openDsh/dash/files/7319108/DashLog.txt

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openDsh/dash/issues/104#issuecomment-939627691, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLUDVE6YQXZ2PXNKXAH46DUGJDVLANCNFSM5FQSI7WA .

r1de commented 2 years ago

@robert5974 It is the "Raspberry Pi OS with Desktop" Image, on a Pi 4.

When I recompiled from scratch, I ran it without the openauto.ini file a few times and still had the issue. I have since copied my old openauto.ini file back into the bin directory and it made no change.

robert5974 commented 2 years ago

Ok. I'll look into it more. The white screen has popped up more than once.

Robert Crowley

On Mon, Oct 11, 2021, 12:13 AM Eric @.***> wrote:

@robert5974 https://github.com/robert5974 It is the "Raspberry Pi OS with Desktop" Image, on a Pi 4.

When I recompiled from scratch, I ran it without the openauto.ini file a few times and still had the issue. I have since copied my old openauto.ini file back into the bin directory and it made no change.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openDsh/dash/issues/104#issuecomment-939664779, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLUDVEJZ5REBL64MYS43S3UGJP5BANCNFSM5FQSI7WA .

robert5974 commented 2 years ago

Try disabling RT Audio under the Openauto settings. It's in the top right of the window before you connect a device. Is been known to resolve the white screen issue in the past.

icecube45 commented 2 years ago

If you could also grab a log file with GST_DEBUG=3, this might help us get to the bottom of things. Going to have to try and replicate this when I get a free moment.

r1de commented 2 years ago

Turned off RT Audio, no change. Here is the GST_DEBUG=3 console log, with RT Audio still disabled. dash-gst_debug3-rtaudio-off-console-log.txt

and here is a second log with RT Audio re-enabled: dash-gst_debug3-rtaudio-on-console-log.txt

icecube45 commented 2 years ago

Hm, unfortunately not much being shown there, if you want to try with GST_DEBUG=6 that might show something, but likely not.

r1de commented 2 years ago

Wow, now that's what you call "verbose". I do not even connect my phone until line 33262 :crossed_fingers: dash-gst_debug6-rtaudio-on-console-log.txt

r1de commented 2 years ago

And because you cannot have too much info, here is the list of the packages that got upgraded and then broke Dash:

bluez:armhf (5.50-1.2~deb10u2, 5.50-1.2~deb10u2+rpt1)
chromium-browser:armhf (88.0.4324.187-rpt1, 92.0.4515.98~buster-rpt2)
chromium-browser-l10n:armhf (88.0.4324.187-rpt1, 92.0.4515.98~buster-rpt2)
chromium-codecs-ffmpeg-extra:armhf (88.0.4324.187-rpt1, 92.0.4515.98~buster-rpt2)
firmware-atheros:armhf (1:20190114-2+rpt1, 1:20190114-2+rpt3)
firmware-brcm80211:armhf (1:20190114-2+rpt1, 1:20190114-2+rpt3)
firmware-libertas:armhf (1:20190114-2+rpt1, 1:20190114-2+rpt3)
firmware-misc-nonfree:armhf (1:20190114-2+rpt1, 1:20190114-2+rpt3)
firmware-realtek:armhf (1:20190114-2+rpt1, 1:20190114-2+rpt3)
libbluetooth3:armhf (5.50-1.2~deb10u2, 5.50-1.2~deb10u2+rpt1)
libc6:armhf (2.28-10+rpi1, 2.28-10+rpt2+rpi1)
libc6-dbg:armhf (2.28-10+rpi1, 2.28-10+rpt2+rpi1)
libc6-dev:armhf (2.28-10+rpi1, 2.28-10+rpt2+rpi1)
libc-bin:armhf (2.28-10+rpi1, 2.28-10+rpt2+rpi1)
libc-dev-bin:armhf (2.28-10+rpi1, 2.28-10+rpt2+rpi1)
libc-l10n:armhf (2.28-10+rpi1, 2.28-10+rpt2+rpi1)
libexiv2-14:armhf (0.25-4+deb10u1, 0.25-4+deb10u2)
libjavascriptcoregtk-4.0-18:armhf (2.32.3-1~deb10u1+rpi1, 2.32.4-1~deb10u1+rpi1)
libnftnl11:armhf (1.1.2-2, 1.1.7-1~bpo10+1~0)
libntfs-3g883:armhf (1:2017.3.23AR.3-3, 1:2017.3.23AR.3-3+deb10u1)
libraspberrypi0:armhf (1:1.20210805-1, 1:1.20210928-1~buster)
libraspberrypi-bin:armhf (1:1.20210805-1, 1:1.20210928-1~buster)
libraspberrypi-dev:armhf (1:1.20210805-1, 1:1.20210928-1~buster)
libraspberrypi-doc:armhf (1:1.20210805-1, 1:1.20210928-1~buster)
libssl1.1:armhf (1.1.1d-0+deb10u6+rpt1, 1.1.1d-0+deb10u7)
libssl-dev:armhf (1.1.1d-0+deb10u6+rpt1, 1.1.1d-0+deb10u7)
libwebkit2gtk-4.0-37:armhf (2.32.3-1~deb10u1+rpi1, 2.32.4-1~deb10u1+rpi1)
linux-libc-dev:armhf (1:1.20210805-1, 1:1.20210928-1~buster)
locales:armhf (2.28-10+rpi1, 2.28-10+rpt2+rpi1)
multiarch-support:armhf (2.28-10+rpi1, 2.28-10+rpt2+rpi1)
ntfs-3g:armhf (1:2017.3.23AR.3-3, 1:2017.3.23AR.3-3+deb10u1)
openssl:armhf (1.1.1d-0+deb10u6+rpt1, 1.1.1d-0+deb10u7)
pi-bluetooth:armhf (0.1.17, 0.1.18)
raspberrypi-bootloader:armhf (1:1.20210805-1, 1:1.20210928-1~buster)
raspberrypi-kernel:armhf (1:1.20210805-1, 1:1.20210928-1~buster)
raspberrypi-sys-mods:armhf (20210706, 20211005)
rpi-eeprom:armhf (12.9-1, 12.14-1)
tzdata:armhf (2021a-0+deb10u1, 2021a-0+deb10u2)

@vedranius I am sorry to have sort of hijacked your issue, but I think what we are both seeing might be related and hopefully can benefit all. :+1:

robert5974 commented 2 years ago

So the issue is a Raspberry Pi Firmware update for the Pi4. Tested and confirmed. Thanks to kg6wxc Eric for the testing and discovery of the workaround!

The current workaround is to downgrade the fw by giving the following command:

sudo rpi-update 15471b6e99b6db2f3206f0aed67d0aebbfc9f9cf Press 'Y' to accept the change. Reboot when it is complete.

Do not further update the firmware past this point of September 8th or the white screen will return. The issue will be investigated further for a true fix.

robert5974 commented 2 years ago

Here is how you can disable the "MTP cannot mount" in LXDE desktop environment running on Lightdm desktop manager. This has been tested by me. I suffered the same problem when using a Galaxy Note 9 and OnePlus 8T.

Open up the File Manager (PCMan FM). Go to "Edit" -> "Preferences" in menu bar at the top. Go to "Volume Management". Uncheck,"Mount removable media automatically when they are inserted" and "Show available options for removable media when they are inserted". You should not see that annoying useless dialog box again.

r1de commented 2 years ago

Thanks. I'll use that. Going to try and get that to just apply to my phone too. Other USB storage devices should be mounted automagically.

icecube45 commented 2 years ago

@r1de let us know if you get it applied to just your phone, could be something we bake into the dash image being worked on.

r1de commented 2 years ago

I got it to go away for my phone for now by doing these steps. The clue is at the top of the 69-libmtp.rules file

1: find the phones USB vendor and product ID's with lsusb (you'll find something like this: Bus 001 Device 006: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy (MTP))

2: copy /lib/udev/rules.d/69-libmtp.rules to /etc/udev/rules.d/69-libmtp.rules

3: edit /etc/udev/rules.d/69-libmtp.rules and near the top of the file add something like this for your phone: ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", GOTO="libmtp_rules_end"

4: reboot

I just did this and I no longer have the annoying popup dialog box when I plug in my phone to use dash... I have yet to use it much though and see if has effected anything else.

robert5974 commented 2 years ago

Agreed. Other devices should be auto mounted. Glad you found something that is working more specifically for you. Let us know if you find something related that doesn't work due to this.

r1de commented 2 years ago

I will let the group know if I find anything, no issues yet.

Making that solution an "automatic" part of the installation or an image would be hard, there are just too many devices out there.

Maybe it could be an option in the ini file though:

#To disable automatic MTD mounting, input your Android device USB ID below.
#Find your device ID via lsusb on the command line when the device is plugged in.
android_usb_id = "1234:5678"

a tiny script could take care of the rest... (just thinking out loud FWIW :smile: )

icecube45 commented 2 years ago

The white screen mentioned in this issue should be worked around by #112 - reopen if issue still persists