Skip to content

Commit b090f9f

Browse files
arve-androidtorvalds
authored andcommitted
PM: Wait for console in resume
Avoids later waking up to a blinking cursor if the device woke up and returned to sleep before the console switch happened. Signed-off-by: Brian Swetland <swetland@google.com> Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Len Brown <lenb@kernel.org> Cc: Greg KH <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent ebae260 commit b090f9f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎kernel/power/console.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ void pm_restore_console(void)
7878
}
7979
set_console(orig_fgconsole);
8080
release_console_sem();
81+
82+
if (vt_waitactive(orig_fgconsole)) {
83+
pr_debug("Resume: Can't switch VCs.");
84+
return;
85+
}
86+
8187
kmsg_redirect = orig_kmsg;
8288
}
8389
#endif

0 commit comments

Comments
 (0)