USB connections does not work

I have a Fairphone 5 running e/os 4.2 and I am not able to make a USB connection to my phone from my laptop (Ubuntu). Developer tools and USB debugging are enabled. I tried booting into safe mode, made sure the cable and USB connection are OK. When I boot up, I see the USB device being recognised on my laptop (via dmesg), but as soon as e/os starts up, it is gone. So I guess that the only possible cause left is a USB regression in the e/os build. How do I fix this?

1 Like

Hi @pietervb welcome to the /e/ user forum.

This question does crop up quite often.

In the first instance, when one correctly connects one’s PC to the phone the phone should show a notification, to ask permission to connect with options.

If this is not seen then check the regular USB page found from

Settings > :magnifying_glass_tilted_left: Search: USB

and make sure this page lights up on connecting a “live to PC” data cable.

If this shows as “fail for file transfer” but would allow charging this would tend to indicate that this is not a Data cable but a “Charge only” cable.

Second approach, maybe in Developer options, Revoke USB debugging authorisations. Then watch carefully for the notification and check in Notification history.

Yeah, these are the things I tried (plus a few more AI suggestions :slight_smile:), and it all leads to the conclusion; cable and hardware are fine, laptop is fine, phone os seems broken.

The cable is ok, I used it to flash e/os and it still works on other devices. I also tried three other (data) cables with the same result. And, the phone is recognised during fastboot.

Still, when e/os is booted the phone behaves like the cable is not there. No connection notification or popup, nothing

Have you tried it with another laptop?

Maybe ordering a new USB C port helps. Fairphone 5 USB-C Port - Spare Part | Fairphone

That’s the one thing I do not have, a stack of laptops :slight_smile: . But again, there is a USB connection during fastboot, which is lost when e/os takes over, so I am still suspecting my phone’s OS.

In the mean time, I realized I can also run a adb debug session over wifi, so I started grepping logcat.

When I connect the cable I get

09-26 13:34:33.624  1062  2290 I android.hardware.usb-service.qti: uevent received add@/devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:qcom,ucsi/typec/port0/port0-partner
09-26 13:34:33.624  1062  2290 I android.hardware.usb-service.qti: partner added
09-26 13:34:33.625  1062  2290 I android.hardware.usb-service.qti: uevent recieved for same device default
09-26 13:34:33.625  1062  2290 I android.hardware.usb-service.qti: port0
09-26 13:34:33.625  1062  2290 I android.hardware.usb-service.qti: 1:port0 connected:1 canChangeMode:1 canChangeData:0 canChangePower:0 usbDataDisabled:1, powerTransferLimited:0
09-26 13:34:33.628  1358  9709 I UsbPortManager: AIDL UsbDataStatus:16
09-26 13:34:33.628  1358  9709 I UsbPortManager: ClientCallback AIDL V1: port0
09-26 13:34:33.629  1358  1379 I UsbPortManager: USB port changed: port=UsbPort{id=port0, supportedModes=dual, audio_acc, supportedContaminantProtectionModes=5, supportsEnableContaminantPresenceProtection=false, supportsEnableContaminantPresenceDetection=false, supportsComplianceWarnings=false, status=UsbPortStatus{connected=true, currentMode=ufp, currentPowerRole=sink, currentDataRole=device, supportedRoleCombinations=[source:host, sink:device], contaminantDetectionStatus=2, contaminantProtectionStatus=1, usbDataStatus=disabled-force, isPowerTransferLimited=false, powerBrickConnectionStatus=unknown, complianceWarnings=[], plugState=0, displayPortAltModeInfo=null}, canChangeMode=true, canChangePowerRole=false, canChangeDataRole=false, connectedAtMillis=9342362, lastConnectDurationMillis=0
09-26 13:34:33.679  1650 23576 I adbd    : UsbFfs: connection terminated: monitor thread finished
09-26 13:34:33.680  1650  1650 I adbd    : UsbFfs: already offline
09-26 13:34:33.680  1650  1650 I adbd    : UsbFfsConnection being destroyed
09-26 13:34:33.867  1650  1679 I adbd    : opening control endpoint /dev/usb-ffs/adb/ep0
09-26 13:34:33.875  1650  1679 I adbd    : UsbFfsConnection constructed
09-26 13:34:33.877  1650 23588 I adbd    : UsbFfs-monitor thread spawned

Then, when I disconnect:


09-26 13:34:35.646  1062  2290 I android.hardware.usb-service.qti: uevent received remove@/devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:qcom,ucsi/typec/port0/port0-partner
09-26 13:34:35.646  1062  2290 I android.hardware.usb-service.qti: uevent recieved for same device default
09-26 13:34:35.646  1062  2290 I android.hardware.usb-service.qti: port0
09-26 13:34:35.646  1062  2290 I android.hardware.usb-service.qti: 1:port0 connected:0 canChangeMode:1 canChangeData:0 canChangePower:0 usbDataDisabled:1, powerTransferLimited:0
09-26 13:34:35.647  1062  2290 E android.hardware.usb-service.qti: Fatal: Error while switching back to drp
09-26 13:34:35.647  1358 20682 I UsbPortManager: AIDL UsbDataStatus:16
09-26 13:34:35.647  1358 20682 I UsbPortManager: ClientCallback AIDL V1: port0
09-26 13:34:35.648  1358  1379 I UsbPortManager: USB port changed: port=UsbPort{id=port0, supportedModes=dual, audio_acc, supportedContaminantProtectionModes=5, supportsEnableContaminantPresenceProtection=false, supportsEnableContaminantPresenceDetection=false, supportsComplianceWarnings=false, status=UsbPortStatus{connected=false, currentMode=none, currentPowerRole=no-power, currentDataRole=no-data, supportedRoleCombinations=[no-power:no-data], contaminantDetectionStatus=2, contaminantProtectionStatus=1, usbDataStatus=disabled-force, isPowerTransferLimited=false, powerBrickConnectionStatus=unknown, complianceWarnings=[], plugState=0, displayPortAltModeInfo=null}, canChangeMode=true, canChangePowerRole=false, canChangeDataRole=false, connectedAtMillis=0, lastConnectDurationMillis=2019
09-26 13:34:36.284  1650 23588 I adbd    : UsbFfs: connection terminated: monitor thread finished
09-26 13:34:36.284  1650  1650 I adbd    : UsbFfs: already offline
09-26 13:34:36.285  1650  1650 I adbd    : UsbFfsConnection being destroyed
09-26 13:34:36.294  1650  1679 I adbd    : opening control endpoint /dev/usb-ffs/adb/ep0
09-26 13:34:36.295  1650  1679 I adbd    : UsbFfsConnection constructed
09-26 13:34:36.296  1650 23599 I adbd    : UsbFfs-monitor thread spawned
09-26 13:34:36.652  1358  1379 I UsbPortManager: USB HAL AIDL version: USB_HAL_V2_0

And while there is no cable connected, every few seconds it logs:

09-26 13:34:31.111  1650 23566 I adbd    : UsbFfs: connection terminated: monitor thread finished
09-26 13:34:31.112  1650  1650 I adbd    : UsbFfs: already offline
09-26 13:34:31.112  1650  1650 I adbd    : UsbFfsConnection being destroyed
09-26 13:34:31.120  1650  1679 I adbd    : opening control endpoint /dev/usb-ffs/adb/ep0
09-26 13:34:31.123  1650  1679 I adbd    : UsbFfsConnection constructed
09-26 13:34:31.124  1650 23576 I adbd    : UsbFfs-monitor thread spawned

Ha, found it! I must have checked a box in a paranoid mood. E’s security settings have a ‘Trust’ menu where you can limit USB connections and tell e/os to always refuse them. That caused ’
usbDataDisabled:1’ in the log above

3 Likes