Wakelock issues | otg_default, usb, usbpd0, qcom-step-chg

Search This thread

trax7

Senior Member
May 15, 2012
950
343
In crDroid 6.11 idle drain is way better. 0.2%/h on average. Previously I used to get 0.5-0.8%/h. Wakelocks like qcom-step-chg still persist and I continue to block them. Idle drain would have been even better if not for the rapid 2-3% drop that always happens within a few minutes of unplugged the device. This time while clean flashing the update, as always, I didn't restore the Migrate backup. Instead reinstalled the apps from Play Store. Dunno if this played a part or not.
I didn't even have to flash MIUI as I had planned to check whether the wakelocks were there in stock ROM or not.
They will be. Custom ROMs help. Clean installs also make sure old data doesn't create small bugs here and there, it's always better but less convenient.
 

Jolubeat

New member
Dec 2, 2020
3
3
Hello guys.

Noticed this problem with my mi 9 SE recently. My phone was draining 10-20% battery during night, on flight mode.
Thanks to root and BBS, I could troubleshoot the problem, and something about the usb port was creating the problem. (I'm running stock rom)


I believe I found what might be, at least, a temporary fix. Snugged a random usb type c cable in my phone and let it stay for a while, monitoring the "otg-default, usb,..." wakelocks, and for my surprise, it seems to solve the problem.
Next move will be: buying a magnetic type c cable, and have the adapter 24/7 in my device.
If this doesnt work, I might change the usb port...not expensive on aliexpress though.

I hope this works for you guys too.

Will give feedback whenever the magnetic cable arrives and share the link of it too.

Thanks

night.jpg
wakelock.jpg
no wakelock.jpg
WIN_20201202_16_28_29_Pro.jpg
 
  • Like
Reactions: trax7

Adam Wesolowski

New member
Nov 15, 2015
1
1
I had the exact same problem with my Poco F1. Thanks to this thread I decided to contact my local service center and got my USB board replaced. This solved all my problems with USB wakelocks. Idle battery drain also went back to normal.

Before that I tried blocking wakelocks with software and it did improve things a little, however my idle drain was still high, despite no USB wakelocks. Probably the USB problem was causing some other parts of the phone to not enter battery saving mode.

One more advice - be carefull with cheap chinese replacement USB boards. I got one for cheap and it's missing almost all the SMD parts, which are present on the original board. Read somewhere, that using those cheap boards leads to problems with mic and signal. Seeing the diffence between the original and the cheap chineese version, I skipped putting it in my phone.
 
  • Like
Reactions: duttyend

trax7

Senior Member
May 15, 2012
950
343
Hello guys.

Noticed this problem with my mi 9 SE recently. My phone was draining 10-20% battery during night, on flight mode.
Thanks to root and BBS, I could troubleshoot the problem, and something about the usb port was creating the problem. (I'm running stock rom)


I believe I found what might be, at least, a temporary fix. Snugged a random usb type c cable in my phone and let it stay for a while, monitoring the "otg-default, usb,..." wakelocks, and for my surprise, it seems to solve the problem.
Next move will be: buying a magnetic type c cable, and have the adapter 24/7 in my device.
If this doesnt work, I might change the usb port...not expensive on aliexpress though.

I hope this works for you guys too.

Will give feedback whenever the magnetic cable arrives and share the link of it too.

Thanks

View attachment 5145689View attachment 5145693View attachment 5145691View attachment 5145695
Seems like you also have the same issue. We have to look if it's Xiaomi or all USB-C devices that suffer from this. Maybe it's a wider design flaw. Although if it is, I am not sure why after so many years there is no improvement...
 
  • Like
Reactions: Jolubeat

Jolubeat

New member
Dec 2, 2020
3
3
Hello guys.

Noticed this problem with my mi 9 SE recently. My phone was draining 10-20% battery during night, on flight mode.
Thanks to root and BBS, I could troubleshoot the problem, and something about the usb port was creating the problem. (I'm running stock rom)


I believe I found what might be, at least, a temporary fix. Snugged a random usb type c cable in my phone and let it stay for a while, monitoring the "otg-default, usb,..." wakelocks, and for my surprise, it seems to solve the problem.
Next move will be: buying a magnetic type c cable, and have the adapter 24/7 in my device.
If this doesnt work, I might change the usb port...not expensive on aliexpress though.

I hope this works for you guys too.

Will give feedback whenever the magnetic cable arrives and share the link of it too.

Thanks

View attachment 5145689View attachment 5145693View attachment 5145691View attachment 5145695
Hello you all,

Tried to clean the usb port, but didn't work.
In case you guys are insterested in an easy "fix", here is the link to the type c magnet cable I bought:


Merry Christmas
 

Attachments

  • 1.jpg
    1.jpg
    131.9 KB · Views: 30
  • 2.jpg
    2.jpg
    105 KB · Views: 30

hfranca92

New member
  • Feb 24, 2021
    4
    0
    Olá a todos vocês,

    Tentou limpar a porta USB, mas não funcionou.
    Caso vocês estejam inssterested em uma "correção" fácil, aqui está o link para o cabo ímã tipo C que comprei:


    Feliz Natal
    Olá, estou passando pelo mesmo problema com o Mi 9 se. conseguiu resolver o problema com o cabo magnético? Obrigado.
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 2
      Hello guys.

      Noticed this problem with my mi 9 SE recently. My phone was draining 10-20% battery during night, on flight mode.
      Thanks to root and BBS, I could troubleshoot the problem, and something about the usb port was creating the problem. (I'm running stock rom)


      I believe I found what might be, at least, a temporary fix. Snugged a random usb type c cable in my phone and let it stay for a while, monitoring the "otg-default, usb,..." wakelocks, and for my surprise, it seems to solve the problem.
      Next move will be: buying a magnetic type c cable, and have the adapter 24/7 in my device.
      If this doesnt work, I might change the usb port...not expensive on aliexpress though.

      I hope this works for you guys too.

      Will give feedback whenever the magnetic cable arrives and share the link of it too.

      Thanks

      View attachment 5145689View attachment 5145693View attachment 5145691View attachment 5145695
      Hello you all,

      Tried to clean the usb port, but didn't work.
      In case you guys are insterested in an easy "fix", here is the link to the type c magnet cable I bought:


      Merry Christmas
      1
      Hello,

      I thought that I was the only one with such an issue but by now I see more and more people in the forums who are hit by this same problem. I created this thread to be a discussion for all things connected to this problem - when and how it happens, what you have tried, diagnosed, seen from other places, how you have solved it if you have - everything.

      How to spot if you have this issue:
      - If your battery drain is high, especially in standby
      - If your dmesg and logcat are getting spammed with "USB host device discovered" and then instantly dereferenced, then again and again
      - If the wakelocks otg_default, qcom-step-chg, usbpd0 and usb are eating at your battery (spot them using BetterBatteryStats or something like Smartpack Kernel Manager)

      Here is what I have tried to solve this problem:
      Wipe data/factory reset
      Full wipe from TWRP - system, vendor, data, cache, internal storage
      Change kernels
      Flash stock fastboot ROM and start over
      Compiling a special kernel with all USB Host functions turned off (I don't use them anyway), deleting /vendor/etc/permissions/android.system.usb.host and removing usb_otg from fstab

      Nothing worked. Issue is still here.

      I think it's a hardware issue and most likely at least partly connected to the bad fast charging issue. I will keep this thread updated with our findings. :)


      ------------------------------------------------------------------------------------------------------
      Logcat:

      Dmesg:

      ------------------------------------------------------------------------------------------------------

      Logcat message after modded kernel:

      UsbPortManager
      USB port changed: port=UsbPort{id=otg_default, supportedModes=dualsupportedContaminantProtectionModes=0supportsEnableContaminantPresenceProtection=falsesupportsEnableContaminantPresenceDetection=false, status=UsbPortStatus{connected=true, currentMode=dfp, currentPowerRole=source, currentDataRole=host, supportedRoleCombinations=[source:host, sink:device], contaminantDetectionStatus=0, contaminantProtectionStatus=0}, canChangeMode=true, canChangePowerRole=false, canChangeDataRole=false, connectedAtMillis=63812596, lastConnectDurationMillis=0

      ^ Take note here, USB OTG only makes sense to be in host mode NOT device mode. I tried disabling USB host fully and now I get OTG in DEVICE mode. That means that the phone is trying to be the USB device and not the phone! Lol. : (

      Dmesg after modded kernel:

      [63280.945666] PD_DISALLOWED_INDIRECT: current vote is now 0 voted by HVDCP_TIMEOUT_VOTER,1,previous voted 0
      [63280.945695] PD_ALLOWED: current vote is now 1 voted by PD_DISALLOWED_INDIRECT_VOTER,0,previous voted 1
      [63280.945734] OTG_VOTER: val: 0
      [63280.945769] LEGACY_UNKNOWN_VOTER: val: 100000
      [63280.945796] USB_ICL: current vote is now 0 voted by OTG_VOTER,2,previous voted 0
      [63280.945886] smblib_set_icl_current: set icl 0
      [63280.947289] usbpd usbpd0: Type-C Sink connected
      [63280.949267] FG: fg_cycle_counter_update: batt_soc: 219 bucket: 6 chg_status: 2
      [63280.949717] FG: fg_charge_full_update: msoc: 90 bsoc: db89 health: 1 status: 2 full: 0
      [63280.958466] PMI: smblib_handle_typec_cc_state_change: TypeC removal
      [63280.958555] LEGACY_UNKNOWN_VOTER: val: 100000
      [63280.958568] USB_ICL: current vote is now 100000 voted by LEGACY_UNKNOWN_VOTER,11,previous voted 100000
      [63280.958608] smblib_set_icl_current: set icl 25000
      [63280.958636] smblib_set_icl_current: set icl 100000
      [63280.958939] PD_DISALLOWED_INDIRECT: current vote is now 1 voted by CC_DETACHED_VOTER,0,previous voted 1
      [63280.958956] PD_ALLOWED: current vote is now 0 voted by PD_DISALLOWED_INDIRECT_VOTER,0,previous voted 0
      [63280.959170] PMI: __smblib_set_prop_typec_power_role: set power_role to 0
      [63280.959182] PMI: smblib_masked_write: set 0x1368 mask:0x7,val:0x0
      [63280.959260] PMI: smblib_masked_write: set 0x1368 mask:0x80,val:0x0
      [63280.959339] PMI: smblib_update_usb_type: APSD=UNKNOWN PD=0
      [63280.959353] notify_typec_mode_changed_for_pd
      [63280.961483] FG: status_change_work: charge_status:2 charge_type:1 charge_done:0
      [63281.016093] USBIN_USBIN_BOOST_VOTER: val: 0
      [63281.016147] LEGACY_UNKNOWN_VOTER: val: 100000

      I will edit later, as I am writing on the phone. :)
      1
      Mine fast charges fine now that the weather is hotter and the issue comes us rarely. Otherwise, during winter time and until recently I've had the same issue as you.

      Also, have you tested how the phone responds to wipes etc.? I've found that a full wipe really helped with overall speed and smoothness.

      Yes.......
      Now, i have downgraded to last pie build.
      Did a clean recovery flash of miui 11.0.5 pie full recovery rom from twrp...... Didnt root and twrp is replaced with mi recovery......decided to leave it as it is and now.....Phone SLEEPS normally - deep sleep is back. Checked with system battery stats.
      Quick charge seems broken still......when connected to poco charger, it shows quick charging initially but then after sometime quick charge disappears.
      But, regular 5v 2A charges charges faster :p
      1
      Hmm... 11.0.5 is Russian locality, yes? Global versions are 11.0.6 and 11.0.8? I'm asking because I use Xiaomi.eu. I'll try myself and see if that solves it but I think the issue comes up anyway.

      No..... I have the ota package (full rom) from India.
      Try 11.0.5 global recovery rom from xiaomi firmware updater website.

      ---------- Post added at 11:48 AM ---------- Previous post was at 11:47 AM ----------

      Or from here
      https://c.mi.com/thread-2766844-1-0.html
      1
      Strange because nothing should have changed from that point in the USB subsection. I will give it a try anyway, even though I want to use international or EU ROM.

      Do share your experience.....
    Our Apps
    Get our official app!
    The best way to access XDA on your phone
    Nav Gestures
    Add swipe gestures to any Android
    One Handed Mode
    Eases uses one hand with your phone