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.
Solved! Go to Solution.
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
hi abraham,
Have enabled the CONFIG_DISABLE_CONSOLE_SUSPEND in your defconfig file? can you plz check it out
Thanks
shan
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.
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
Thank you Rick!
That was exactly what I was looking for.
Relieved,
Abraham V.