how to enable serial console during android suspend?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to enable serial console during android suspend?

Jump to solution
4,473 Views
abraham_v
Contributor IV

Hello,

I have a custom IMX6D board running android based off the sabresd android JB 4.2.2 release. A lot of our debugging is done over the serial (UART1) console. When android goes into its low-power suspend state, the console becomes un-responsive. Only way to 'wake up' the console is to press the power button, which also brings the entire system (including display) back up.

Is there any way to have the system enter low power suspend state, but keep the serial console enabled for debug purposes?

I've tried adding 'no_console_suspend' to the boot arguments for kernel, but the console still goes dead when the system enters suspend mode.

Stumped,

Abraham V.

Labels (3)
1 Solution
2,090 Views
rickchu
Contributor IV

Hi Abraham,

Do you want to debug suspend/resume stability in your device? Or any others?

The UART will not workable when device into suspend mode, its because the CPU enter suspend mode too.

If you want to suspend Android system only and keep kernel still alive, you can modify /kernel/kernel/power/main.c to block kernel enter suspend.

After above changed, the Android system will suspend (LCD, Touch and Audio also stop working) but kernel still on work, so you can using debug UART on this status.

static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr,

    const char *buf, size_t n)

{

#if 0

  /*

  * Not enter suspend mode

  */

  do {} while (0);

  return 0;

#else

#ifdef CONFIG_SUSPEND

....

Exit:

  return error ? error : n;

#endif

}

Rick

View solution in original post

4 Replies
2,090 Views
shanmugamsundar
Contributor IV

hi abraham,

Have enabled the CONFIG_DISABLE_CONSOLE_SUSPEND in your defconfig file? can you plz check it out

Thanks

shan    

0 Kudos
2,090 Views
abraham_v
Contributor IV

Thanks for replying Shan.

Unfortunately, that was among the things I looked into. When I open up "make menuconfig" before building the kernel and try a search, "CONFIG_DISABLE_CONSOLE_SUSPEND" isn't there. :smileysad:

-Abraham V.

0 Kudos
2,091 Views
rickchu
Contributor IV

Hi Abraham,

Do you want to debug suspend/resume stability in your device? Or any others?

The UART will not workable when device into suspend mode, its because the CPU enter suspend mode too.

If you want to suspend Android system only and keep kernel still alive, you can modify /kernel/kernel/power/main.c to block kernel enter suspend.

After above changed, the Android system will suspend (LCD, Touch and Audio also stop working) but kernel still on work, so you can using debug UART on this status.

static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr,

    const char *buf, size_t n)

{

#if 0

  /*

  * Not enter suspend mode

  */

  do {} while (0);

  return 0;

#else

#ifdef CONFIG_SUSPEND

....

Exit:

  return error ? error : n;

#endif

}

Rick

2,090 Views
abraham_v
Contributor IV

Thank you Rick!

That was exactly what I was looking for.

Relieved,

Abraham V.

0 Kudos