This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WIFI suspend issue

Other Parts Discussed in Thread: TPS65930, DM3730, TPS65072, WL1271

Hi All,

We are using VAR-SOM-OM37 SOM(DM3730 + TPS65930) from variscite with kernel version 2.6.37 and Gingerbread android OS.

I am facing some power consumption issues with Wi-Fi during suspend state.

  1. If we won't enable WI-FI, The SOM current consumption is ~6mA and Wi-Fi module consumption is 0mA.
  2. But if i enable Wi-Fi and suspends the device, The SOM power consumption is very high ~40mA(Continuosly). But the Wi-Fi is consuming only 0mA  except while it is scanning for routers.

We connected Wi-Fi I/F to MMC2 controller. I am not handling OMAP SDIO pins during suspend.

I need this very urgently as we are going to deliver our product. So can anyone please help me on this?

Thanks,

Naresh

  • Hi Naresh,

    This behavior of the system about the power consumption after suspend when the Wi-Fi is enabled seems strange. I suspect that some other subsystem is not going to sleep in this case. I suggest you to look at the logcat debug log messages and search for something related to suspend/resume transitions.

    An other ability for analyzing the issue is to look at the power domain state statistics and clock domain active clocks by the following commands:

    # cat /debug/pm_debug/count

    # cat /debug/pm_debug/time

    If the debugfs is not mounted mount it by:

    mkdir /debug
    mount -t debugfs none /debug

    BR

    Tsvetolin Shulev

  • Hi Tsvetolin Shulev,

    Thanks for your reply. Here i am pasting the logcat data. But i couldn't find any difference from this logs.

    I couldn't enter cat /debug/pm_debug/count, cat /debug/pm_debug/time commands in suspend state eventhough i am using "no_console_suspend" boot arguement.

    Can you please tell me, how to execute those commands in system suspend state?

    and If you find anything is going wrong from this log or if you have any ideas please share.

    Thanks,

    Naresh

     

    Suspend Log Before Wi-Fi enabling:

    Suspend sequence:

    --------- beginning of /dev/log/main
    I/power ( 1400): *** set_screen_state 0
    [ 125.248657] request_suspend_state: sleep (0->3) at 91619873046 (2000-01-01 04:11:04.900177000 UTC)
    D/power ( 1400): updated the system governer to performance
    [ 125.258026] Entered fio_panel_suspend
    [ 126.433776] stop_drawing_early_suspend: timeout waiting for userspace to stop drawing
    [ 129.129394] Entered tps65072_i2c_suspend[ 126.534423] PM: Syncing filesystems ... done.
    [ 126.539337] Freezing user space processes ... (elapsed 0.02 seconds) done.
    [ 126.569458] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done.
    [ 127.089508] Entered hih6130_suspend
    [ 127.121215] Entered bma220_suspend
    [ 129.317260] PM: suspend of devices complete after 545.410 msecs
    [ 129.323913] PM: late suspend of devices complete after 0.488 msecs
    [ 137.682312] Successfully put all powerdomains to target state

    Resume Sequence:

    [ 137.688964] PM: early resume of devices complete after 0.427 msecs
    [ 137.702514] wakeup wake lock: event5-1400
    [ 138.096740]
    [ 138.096771] Entered tps65072_i2c_resume
    [ 138.151092] Entered bma220_resume
    [ 138.154632] Entered hih6130_resume
    [ 138.159790] PM: resume of devices complete after 464.172 msecs
    [ 138.166625] Restarting tasks ...
    [ 138.175079] request_suspend_state: wakeup (3->0) at 96188323979 (2000-01-01 04:11:17.515502930 UTC)
    D/KeyguardViewMe[ 138.186065] done.
    diator( 1400): w[ 138.188446] suspend: exit suspend, ret = 0 (2000-01-01 04:11:17.528900146 UTC)
    akeWhenReadyLocked(26)
    I/power ( 1400): *** set_screen_state 1
    D/power ( 1400): updated the system governer to onDemand
    [ 138.197631] Entered fio_panel_resume
    --------- beginning of /dev/log/system
    W/InputManagerService( 1400): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@40650c78

    Suspend Log after wifi-Enabling:

    Wifi Enabling:

    [ 249.685455] wl1271: loaded
    D/Tethering( 1400): wlan0 is not a tetherable iface, ignoring
    D/WifiHW ( 1400): updated the system off mode value to 0
    E/WifiHW ( 1400): Unable to open connection to supplicant on "wlan0:0": No such file or directory
    I/wpa_supplicant( 2396): rfkill: Cannot open RFKILL control device
    D/WifiStateTracker( 1400): Reset connections and stopping DHCP
    D/dalvikvm( 1400): GC_CONCURRENT freed 928K, 44% free 4390K/7815K, external 3257K/3410K, paused 24ms+22ms
    [ 251.753265] wl1271: firmware booted (Rev 6.3.6.0.79_2)
    [ 251.779296] ADDRCONF(NETDEV_UP): wlan0: link is not ready
    D/WifiStateTracker( 1400): Disabling interface
    W/ProcessStats( 1400): Skipping unknown process pid 2413
    V/WifiStateTracker( 1400): Connection to supplicant established, state=INACTIVE
    E/wpa_supplicant( 2396): Unsupported command: BTCOEXSCAN-STOP

    Suspend sequence:

    I/power ( 1400): *** set_screen_state 0
    [ 262.383483] request_suspend_state: sleep (0->3) at 191411132792 (2000-01-01 04:13:22.378936740 UTC)
    D/power ( 1400): updated the system governer to performance
    [ 262.392974] Entered fio_panel_suspend
    D/dalvikvm( 1400): GC_EXTERNAL_ALLOC freed 157K, 45% free 4354K/7815K, external 2761K/2767K, paused 70ms
    [ 263.569519] stop_drawing_early_suspend: timeout waiting for userspace to stop drawing
    [ 264.144805] Entered tps65072_i2c_suspend
    [ 265.428619] PM: Syncing filesystems ... done.
    [ 265.433624] Freezing user space processes ... (elapsed 0.01 seconds) done.
    [ 265.459960] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done.
    [ 265.820068] Entered hih6130_suspend
    [ 265.823822] Entered bma220_suspend
    [ 265.847961] Entered tps65072_i2c_suspend
    [ 266.035827] PM: suspend of devices complete after 544.067 msecs
    [ 266.042449] PM: late suspend of devices complete after 0.396 msecs
    [ 272.818664] Successfully put all powerdomains to target state

    Resume sequence:

    [ 272.824981] PM: early resume of devices complete after 0.244 msecs
    [ 272.838195] wakeup wake lock: event5-1400
    [ 273.084747]
    [ 273.084747] Entered tps65072_i2c_resume
    [ 273.138977] Entered bma220_resume
    [ 273.142517] Entered hih6130_resume
    [ 273.478942] PM: resume of devices complete after 647.399 msecs
    [ 273.485900] Restarting tasks ...
    [ 273.495178] request_suspend_state: wakeup (3->0) at 195747100841 (2000-01-01 04:13:32.847717284 UTC)
    D/KeyguardViewMe[ 273.506591] done.
    diator( 1400): w[ 273.508758] suspend: exit suspend, ret = 0 (2000-01-01 04:13:32.861328126 UTC)
    akeWhenReadyLocked(26)
    I/power ( 1400): *** set_screen_state 1
    D/power ( 1400): updated the system governer to onDemand
    [ 273.517730] Entered fio_panel_resume
    W/InputManagerService( 1400): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@40722010

  • Hi Tsvetolin Shulev,

    You are right that all power domains are not hitting OFF states in suspend while wifi enabled.

    The power domains usbhost_pwrdm, per_pwrdm, dss_pwrdm and core_pwrdm are hitting OFF states in system suspend while WiFi not enabled but not hitting while WiFi enabled.

    I observed one more thing that neon_pwrdm and mpu_pwrdm domains are hitting OFF states if system leaves inactive  for sometime without enabling WiFi. But they are not at all hitting OFF states if we enable WiFi.

    What should i handle for hitting their OFF states? Can you please share your ideas?

    I am pasting the log here.

    Just after booting without wifi enabling:

    # cat /debug/pm_debug/count
    usbhost_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    sgx_pwrdm (ON),OFF:1,RET:0,INA:0,ON:2,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    per_pwrdm (ON),OFF:0,RET:1048,INA:0,ON:1049,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    dss_pwrdm (ON),OFF:0,RET:4,INA:7,ON:11,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    cam_pwrdm (OFF),OFF:1,RET:1,INA:1,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    core_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0
    neon_pwrdm (ON),OFF:27,RET:402,INA:620,ON:1050,RET-LOGIC-OFF:0
    mpu_pwrdm (ON),OFF:27,RET:402,INA:620,ON:1050,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    iva2_pwrdm (OFF),OFF:1,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0,RET-MEMBANK3-OFF:0,RET-MEMBANK4-OFF:0
    per_clkdm->per_pwrdm (11)
    usbhost_clkdm->usbhost_pwrdm (3)
    cam_clkdm->cam_pwrdm (0)
    dss_clkdm->dss_pwrdm (2)
    core_l4_clkdm->core_pwrdm (16)
    core_l3_clkdm->core_pwrdm (5)
    d2d_clkdm->core_pwrdm (0)
    sgx_clkdm->sgx_pwrdm (2)
    iva2_clkdm->iva2_pwrdm (0)
    neon_clkdm->neon_pwrdm (0)
    mpu_clkdm->mpu_pwrdm (0)
    prm_clkdm->wkup_pwrdm (0)
    cm_clkdm->core_pwrdm (0)

    # cat /debug/pm_debug/time
    usbhost_pwrdm (ON),OFF:0,RET:0,INA:0,ON:34324829101
    sgx_pwrdm (ON),OFF:3131805420,RET:0,INA:0,ON:31193054199
    per_pwrdm (ON),OFF:0,RET:3480499261,INA:0,ON:30844390875
    dss_pwrdm (ON),OFF:0,RET:169647216,INA:4477813721,ON:29677429199
    cam_pwrdm (OFF),OFF:26382263184,RET:2743682861,INA:379760742,ON:4819213867
    core_pwrdm (ON),OFF:0,RET:0,INA:0,ON:34324951171
    neon_pwrdm (ON),OFF:1214233399,RET:1351928702,INA:914886473,ON:30843902597
    mpu_pwrdm (ON),OFF:1214294433,RET:1352844228,INA:914947515,ON:30842895513
    iva2_pwrdm (OFF),OFF:26382385254,RET:2743621827,INA:0,ON:5199005126

    After suspend-resume without wifi enabling:

    # cat /debug/pm_debug/count
    usbhost_pwrdm (ON),OFF:1,RET:0,INA:0,ON:2,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    sgx_pwrdm (ON),OFF:2,RET:0,INA:0,ON:4,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    per_pwrdm (ON),OFF:1,RET:2524,INA:0,ON:2526,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    dss_pwrdm (ON),OFF:133,RET:4,INA:7,ON:144,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    cam_pwrdm (OFF),OFF:1,RET:1,INA:1,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    core_pwrdm (ON),OFF:1,RET:0,INA:0,ON:2,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0
    neon_pwrdm (ON),OFF:834,RET:1000,INA:692,ON:2527,RET-LOGIC-OFF:0
    mpu_pwrdm (ON),OFF:834,RET:1000,INA:692,ON:2527,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    iva2_pwrdm (OFF),OFF:1,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0,RET-MEMBANK3-OFF:0,RET-MEMBANK4-OFF:0
    per_clkdm->per_pwrdm (11)
    usbhost_clkdm->usbhost_pwrdm (3)
    cam_clkdm->cam_pwrdm (0)
    dss_clkdm->dss_pwrdm (2)
    core_l4_clkdm->core_pwrdm (14)
    core_l3_clkdm->core_pwrdm (5)
    d2d_clkdm->core_pwrdm (0)
    sgx_clkdm->sgx_pwrdm (2)
    iva2_clkdm->iva2_pwrdm (0)
    neon_clkdm->neon_pwrdm (0)
    mpu_clkdm->mpu_pwrdm (0)
    prm_clkdm->wkup_pwrdm (0)
    cm_clkdm->core_pwrdm (0)

    # cat /debug/pm_debug/time
    usbhost_pwrdm (ON),OFF:17980377197,RET:0,INA:0,ON:172873016357
    sgx_pwrdm (ON),OFF:23146484375,RET:0,INA:0,ON:167706939697
    per_pwrdm (ON),OFF:17973571777,RET:97938293426,INA:0,ON:74941589386
    dss_pwrdm (ON),OFF:19492675786,RET:169647216,INA:4477813721,ON:166713317866
    cam_pwrdm (OFF),OFF:182910827637,RET:2743682861,INA:379760742,ON:4819213867
    core_pwrdm (ON),OFF:17973571777,RET:0,INA:0,ON:172879943848
    neon_pwrdm (ON),OFF:102716674853,RET:11917694034,INA:1280944821,ON:74938201917
    mpu_pwrdm (ON),OFF:102730560523,RET:11922546375,INA:1281097417,ON:74919341827
    iva2_pwrdm (OFF),OFF:182910949707,RET:2743621827,INA:0,ON:5199005126

    After suspend-resume with wifi enabling:

    # cat /debug/pm_debug/count
    usbhost_pwrdm (ON),OFF:1,RET:1,INA:0,ON:3,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    sgx_pwrdm (ON),OFF:3,RET:0,INA:0,ON:5,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    per_pwrdm (ON),OFF:1,RET:4285,INA:0,ON:4287,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    dss_pwrdm (ON),OFF:133,RET:55,INA:7,ON:195,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    cam_pwrdm (RET),OFF:1,RET:2,INA:1,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    core_pwrdm (ON),OFF:1,RET:1,INA:0,ON:3,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0
    neon_pwrdm (ON),OFF:840,RET:2083,INA:1054,ON:4288,RET-LOGIC-OFF:0
    mpu_pwrdm (ON),OFF:840,RET:2083,INA:1054,ON:4288,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
    iva2_pwrdm (RET),OFF:1,RET:2,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0,RET-MEMBANK3-OFF:0,RET-MEMBANK4-OFF:0
    per_clkdm->per_pwrdm (11)
    usbhost_clkdm->usbhost_pwrdm (3)
    cam_clkdm->cam_pwrdm (0)
    dss_clkdm->dss_pwrdm (2)
    core_l4_clkdm->core_pwrdm (14)
    core_l3_clkdm->core_pwrdm (5)
    d2d_clkdm->core_pwrdm (0)
    sgx_clkdm->sgx_pwrdm (2)
    iva2_clkdm->iva2_pwrdm (0)
    neon_clkdm->neon_pwrdm (0)
    mpu_clkdm->mpu_pwrdm (0)
    prm_clkdm->wkup_pwrdm (0)
    cm_clkdm->core_pwrdm (0)

    # cat /debug/pm_debug/time
    usbhost_pwrdm (ON),OFF:17980377197,RET:10566680908,INA:0,ON:292901275635
    sgx_pwrdm (ON),OFF:34631622315,RET:0,INA:0,ON:286816741942
    per_pwrdm (ON),OFF:17973571777,RET:181644134521,INA:0,ON:121830657959
    dss_pwrdm (ON),OFF:19492675786,RET:11684021002,INA:4477813721,ON:285793884266
    cam_pwrdm (RET),OFF:237715148926,RET:78534271240,INA:379760742,ON:4819213867
    core_pwrdm (ON),OFF:17973571777,RET:10559844970,INA:0,ON:292914978028
    neon_pwrdm (ON),OFF:130897613584,RET:66697753896,INA:2036926255,ON:121816131557
    mpu_pwrdm (ON),OFF:130916473577,RET:66704162627,INA:2036895750,ON:121790893338
    iva2_pwrdm (RET),OFF:237715148925,RET:78534271241,INA:0,ON:5199005126

    Thanks & Regards,

    Naresh

     

     

  • Hi Naresh,

    I would like to add some clarifications about the power management debugging commands. The cat /debug/pm_debug/count and cat /debug/pm_debug/time commands should not be executed is suspend state but when the system is active. Both commands give useful information about the powerdomain state statistics to check whether all states hit the desired state and check the powerdomain transition statistics.

    BR

    Tsvetolin Shulev

  • Hi Naresh,

    Now I see that you are already execute the power management debugging commands in the active state.
     I still analyzing the logs.

    BR

    Tsvetolin Shulev

  • Hi Tsvetolin Shulev,

    Thanks for your reply. Just now i got that information.

    Thanks & Regards,

    Naresh

  • Hi Naresh,

    I find the following log messages:

    D/Tethering( 1400): wlan0 is not a tetherable iface, ignoring
    D/omap3_pm_suspend(void)WifiHW ( 1400): updated the system off mode value to 0

    related to the WiFi driver for disturbing. You should investigate the the WiFi driver and to search for the reason for appearing of these messages.

    Also I see in the logs that the power managment decides that "Successfully put all powerdomains to target state" but it is possible the WiFi to be missed or get wrong result in the powerdomains check for sleeping in the omap3_pm_suspend() function in the ../arch/arm/mach-omap2/pm34xx.c file. I suggest you to pay attention on this. You could add more debug messages which could help you to investigate the issue.

    BR

    Tsvetolin Shulev

  • Hi Tsvetolin Shulev,

    D/Tethering( 1400): wlan0 is not a tetherable iface, ignoring
    D/omap3_pm_suspend(void)WifiHW ( 1400): updated the system off mode value to 0

    Actually we disabled Wifi tethering feature in our product. The above log messages are related to that one.

    Can you please tell me the status of Wifi_en pin in system suspend state? Usually how much SOM power consumption can increase with Wifi enable state?

    What is the wifi status in suspend if we enabled it? 

    Please give your comments.

    Thanks & Regards,

    Naresh

  • Hi Tsvetolin Shulev,

    I found root cause for this one. If i read /debug/pm_debug/enable_off_mode before enabling Wi-Fi, I am getting 1. But after enabling Wi-Fi, it is becoming '0' which is causing for system not entering into OFF mode.

    I tried manually by writing '0' to /debug/pm_debug/enable_off_mode after Wi-Fi enable, in that case the SOM is entering into OFF state properly and the power consumption of SOM is same before Wi-Fi enabling.

    Do you know, why it is becoming '0' automatically after enabling Wi-Fi?

    Please tell me, how can i make it to '1' always irrespective Wi-Fi status?

    Tsvetolin Shulev, thanks for guiding me to find the solution.

    Regards,

    Naresh