Unable to switch "USB controlled by" back to "Connected device"

Some time ago (I don’t remember when or under what conditions), my Fairphone 4 switched USB controlled by to This device and I cannot turn it back. Do you have any idea how to turn it back to Connected device?

What I do:

  1. Plug in USB cable to Fairphone
  2. Plug in USB cable to PC
  3. unlock Fairphone
  4. find this notification:
    screenshot_notification
  5. after clicking it, have this settings pane open:

What happens:

I cannot switch to Connected device. After clicking it, it first says Switching…, then Couldn’t switch.

What I expect to happen:

I should be able to switch to Connected device by clicking on it.

What I’ve tried so far with no effect:

  • tried on different computer (Linux)
  • tried on different USB ports (USB 3.0, USB 2.0)
  • tried with different USB cables (Original Fairphone cable; simple USB 2.0 A to USB-C connector)
  • tried with different options of Use USB for (default: No data transfer, also tried File Transfer, USB tethering, MIDI, PTP)
  • tried with WiFi and/or Bluetooth disabled
  • tried across several reboots of FP4
  • tried across several versions of FP4 (problem persists after system upgrade)

Version info

This problem happens with the current software release FP4.SP2G.B.079.20230624 (Patchlevel 2023-06-05) as well as at least the previous version.
The problem started happening on my phone some time between 2023-05-10 and 2023-06-09.

Additional info

Related (but already closed) topic with no solution: FP4 is no longer recognized on Windows 10 / 11 via USB

Debugging

Thanks to wireless debugging, I still can access the device via adb. An adb logcat -d didn’t resolve much info though:

shortened extract from FP4's syslog

shortened output of adb logcat -d:

07-28 15:17:09.048  1802  4075 I UsbPortManager: Setting USB port mode and role: portId=port0, currentMode=ufp, currentPowerRole=sink, currentDataRole=device, newMode=dfp, newPowerRole=source, newDataRole=host
07-28 15:17:09.048  1802  4075 E UsbPortManager: Trying to set the USB port mode: portId=port0, newMode=dfp
07-28 15:17:09.051   985   985 I android.hardware.usb@1.2-service-qti: filename write: /sys/class/typec/port0/port_type role:source
07-28 15:17:13.272  2831  2831 V DeviceStatisticsService: chargerType=2 batteryLevel=53 totalBatteryCapacity=3615900
07-28 15:17:13.273  2499  2499 D KeyguardUpdateMonitor: received broadcast android.intent.action.BATTERY_CHANGED
07-28 15:17:13.292  2499  2499 D KeyguardUpdateMonitor: handleBatteryUpdate
07-28 15:17:16.386  2831  2831 V DeviceStatisticsService: chargerType=2 batteryLevel=53 totalBatteryCapacity=3615900
07-28 15:17:16.387  2499  2499 D KeyguardUpdateMonitor: received broadcast android.intent.action.BATTERY_CHANGED
07-28 15:17:16.415  2499  2499 D KeyguardUpdateMonitor: handleBatteryUpdate
07-28 15:17:17.052   985   985 I android.hardware.usb@1.2-service-qti: uevents wait timedout
07-28 15:17:17.053  1802  2461 E UsbPortManager: port0 role switch failed
How to do wireless debugging without USB
  1. have a computer with adb (must be on the same wifi, preferably with no other devices on the same wifi; it seems to work stable only if your computer makes a Wifi hotspot with only the FP4 connected), open a command shell where you can execute adb from
  2. on FP4 settings, in Developer mode and search for “wireless debugging”
  3. on FP4, press Pair device with pairing code, which will open a dialog.
  4. on the computer, execute adb pair [ip address]:[port] with [ip address]:[port] as displayed in the pairing dialog on FP4.
  5. on the computer, you will be asked for a pairing code. Type the pairing code you see on FP4.
  6. on FP4, the pairing dialog will close
  7. on the computer, execute adb connect [ip address]:[port] with [ip address]:[port] as displayed in section IP adress & Port. Please note that this is a different port than in the pairing dialog!
  8. do something to keep the adb connection busy, otherwise wireless debugging will terminate within tens of seconds. I opened scrcpy and set the screensaver timeout on my FP4 to 30 minutes. I’m open for suggestions to do something else/better.
1 Like

Hope you sent this to support as well?

Not yet, I was hoping that there would be easier help than talking to the not very responsive support.

Is it your/the general recommendation to always contact support?

If you want official help, there is no other way.

1 Like

Can you explain what you exactly want to gain by “USB controller by connected device”?

1 Like

Thanks to your question, I understood that I mixed things up. The phone works fine as expected.

How I mixed up stuff

Somehow I couldn’t access my phone (and I don’t know why). I tried to find out why but I assumed that USB controlled by set to This device means that the FP4 would be in USB’s On-The-Go mode, therefore making it impossible to connect the PC to the FP4. This assumption was wrong, which I got to understand after reading your question and wondering how to explain my understanding to you.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.