linuxmint / mint20-beta

BETA Bug Squah Rush
20 stars 8 forks source link

[Nemo] Blank window when "Charge Only" selected on android device #111

Closed aureoud-fr85 closed 4 years ago

aureoud-fr85 commented 4 years ago

In Linux Mint 20 Cinnamon BETA, every time I connect an Android phone with MTP protocol, the following dialog-box appears: Android_gvfsd_bug

How to reproduce

and this dialogue-box: Android_gvfsd_bug.

No side effect: Therefore, Nemo is able to browse my device afterwards. This is not an issue on Linux Mint 19.3 Tricia.

Here is sudo journalctl -f output when connecting device:

juin 18 16:18:26 linuxmint kernel: usb 1-2: new high-speed USB device number 24 using xhci_hcd juin 18 16:18:26 linuxmint kernel: usb 1-2: New USB device found, idVendor=2717, idProduct=ff40, bcdDevice= 4.14 juin 18 16:18:26 linuxmint kernel: usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 juin 18 16:18:26 linuxmint kernel: usb 1-2: Product: Mi 9T Pro juin 18 16:18:26 linuxmint kernel: usb 1-2: Manufacturer: Xiaomi juin 18 16:18:26 linuxmint kernel: usb 1-2: SerialNumber: df9cc43e juin 18 16:18:26 linuxmint gvfsd[10142]: Error 1: Get Storage information failed. juin 18 16:18:29 linuxmint kernel: usb 1-2: USB disconnect, device number 24 juin 18 16:18:29 linuxmint gvfsd[10142]: PTP: reading event an error 0x05 occurred juin 18 16:18:30 linuxmint kernel: usb 1-2: new high-speed USB device number 25 using xhci_hcd juin 18 16:18:30 linuxmint kernel: usb 1-2: New USB device found, idVendor=2717, idProduct=ff40, bcdDevice= 4.14 juin 18 16:18:30 linuxmint kernel: usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 juin 18 16:18:30 linuxmint kernel: usb 1-2: Product: Mi 9T Pro juin 18 16:18:30 linuxmint kernel: usb 1-2: Manufacturer: Xiaomi juin 18 16:18:30 linuxmint kernel: usb 1-2: SerialNumber: df9cc43e juin 18 16:18:31 linuxmint gvfsd[10142]: Device 0 (VID=2717 and PID=ff40) is a Xiaomi Mi-2s (id2) (MTP). juin 18 16:18:31 linuxmint gvfsd[10142]: Android device detected, assigning default bug flags

Regards,

aureoud-fr85 commented 4 years ago

Hi, Trying to workaround this bug, I cannot select default USB connection on my Android phone. Default on phone side is "No transmission" as if computer is a USB Power adapter. So when I connect my phone, on phone UI, I get an menu in which I can select between "No transmission", "File transfert (MTP)" and "Photo transfert (PTP"). Bug computer's side appears when I select "File transfert MTP". It is little annoying as there is an additional step on computer to browse files on phone. But it is cosmetic, I can access all them.

Therefore, bug is not present in Linux Mint Tricia 19.3.

aureoud-fr85 commented 4 years ago

Hi, I managed to install upstream and updated Ubuntu 20.04 focal fossa. Trying to reproduce steps, behaviour is more user-friendly:

I think in Linux Mint 20 Cinnamon, Nemo shouldn't open itself at first connection but when there is a valid MTP or PTP connection.

Reading logs, gvfsd seems to look for a ptp connection at first attempt. But phone does not identify itself as a ptp device first. When user selects desired connection on phone side, it identifies as a PTP or MTP device.

To sum up, I think Nemo shouldn't open such blank window when a phone device is connected. User should choose itself to open it when a good connection is activated on phone. It must be a voluntary action from user to open a Nemo window to browse his phone. Ubuntu side, there is no UI error displayed.

In Plasma 5.18 LTS (Kubuntu), behabior is also more user-friendly: No error dialog, Dolphin doesn't open a window. There are only notifications of device connnected. User must click on UI to mount device, giving him time to select proper connection type in Android's UI.

clefebvre commented 4 years ago

We could disable automount and get the same behaviour, I'm not sure that's a good idea though.

Anyhow, the issue is partially solved by cinnamon-settings-daemon 4.6.4. It doesn't always solve it, but it makes it happen less frequently.

aureoud-fr85 commented 4 years ago

Hi,

Thanks for making Linux Mint Cinnamon version better.

Testing today with latest updates installed, notably cinnamon-settings-daemon 4.6.4, bug is still present. latest-updates

Incorrect behaviour:

Android_gvfsd_bug

Trying mitigated steps to workaround

1) Doing actions slowly (ie) making pause (2 or 3 seconds) between actions:

2) Doing actions rapidly:

csd-automount-segfault.txt

Always reproduced crash. Connection to phone is impossible. Nemo browsing is impossible. You must unplug phone from computer and do "slow" actions.

3) Other tentative, slow method but closing Nemo's blank window:

Last but not least, despite this strangely behaviour, I am still able to browse my phone's files after closing this dialog:

Correct expected behaviour

I repeat that I said previously, Gnome, KDE Plasma 5 and Xfce have other behaviour: There is not any file manager window that opens before selecting MTP connection on phone UI. Only that you get is notifications in Gnome and Plasma (no in xfce) that inform you there is a connection established. No UI error in these desktops.

Final Workaround

Deactivate globally automount in System Preferences like this: automount-settings-workaround