imx6 suspend-to-RAM not working with Qt running in Yocto qte-in-use-image

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx6 suspend-to-RAM not working with Qt running in Yocto qte-in-use-image

ソリューションへジャンプ
2,454件の閲覧回数
2gigeng
Contributor II

Suspend to RAM is not working with Qt running in Yocto qte-in-use-image. Both the “mem” option and the “standby” option do not enter suspend.

     qtdemoE -qws &

     echo mem > /sys/power/state

     PM: Syncing filesystems ... done.

     < no more printing >

ラベル(3)
0 件の賞賛
返信
1 解決策
1,597件の閲覧回数
AnsonHuang
NXP Employee
NXP Employee

Hi,

     I have ever met this issue sometimes, and I have debug into it, the root cause should be caused by race condition of console, there is fix on v3.6 kernel, but I am not sure whether it can be ported to v3.0.35. Below is a simple patch to just remove the console prepare, maybe you can try it to identify whether you met the same issue.

https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=a7b12929be6cc55eab2d...

diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c

index 449ccc9..0396efa 100644

--- a/kernel/power/suspend.c

+++ b/kernel/power/suspend.c

@@ -91,7 +91,7 @@ static int suspend_prepare(void)

        if (!suspend_ops || !suspend_ops->enter)

                return -EPERM;

-       pm_prepare_console();

+       //pm_prepare_console();

        error = pm_notifier_call_chain(PM_SUSPEND_PREPARE);

        if (error)

@@ -109,7 +109,7 @@ static int suspend_prepare(void)

        usermodehelper_enable();

  Finish:

        pm_notifier_call_chain(PM_POST_SUSPEND);

-       pm_restore_console();

+       //pm_restore_console();

        return error;

}

@@ -250,7 +250,7 @@ static void suspend_finish(void)

        suspend_thaw_processes();

        usermodehelper_enable();

        pm_notifier_call_chain(PM_POST_SUSPEND);

-       pm_restore_console();

+       //pm_restore_console();

}

/**

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,598件の閲覧回数
AnsonHuang
NXP Employee
NXP Employee

Hi,

     I have ever met this issue sometimes, and I have debug into it, the root cause should be caused by race condition of console, there is fix on v3.6 kernel, but I am not sure whether it can be ported to v3.0.35. Below is a simple patch to just remove the console prepare, maybe you can try it to identify whether you met the same issue.

https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=a7b12929be6cc55eab2d...

diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c

index 449ccc9..0396efa 100644

--- a/kernel/power/suspend.c

+++ b/kernel/power/suspend.c

@@ -91,7 +91,7 @@ static int suspend_prepare(void)

        if (!suspend_ops || !suspend_ops->enter)

                return -EPERM;

-       pm_prepare_console();

+       //pm_prepare_console();

        error = pm_notifier_call_chain(PM_SUSPEND_PREPARE);

        if (error)

@@ -109,7 +109,7 @@ static int suspend_prepare(void)

        usermodehelper_enable();

  Finish:

        pm_notifier_call_chain(PM_POST_SUSPEND);

-       pm_restore_console();

+       //pm_restore_console();

        return error;

}

@@ -250,7 +250,7 @@ static void suspend_finish(void)

        suspend_thaw_processes();

        usermodehelper_enable();

        pm_notifier_call_chain(PM_POST_SUSPEND);

-       pm_restore_console();

+       //pm_restore_console();

}

/**

0 件の賞賛
返信
1,597件の閲覧回数
2gigeng
Contributor II

Thank you!  The above patch fixed the issue.  The other patch to vt_ioctl.c (https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=a7b12929be6cc55eab2d...) did not work for me.

0 件の賞賛
返信