In kernel printk. C, there is a global variable console_suspend_enabled, which controls whether messages can be output to the console after suspend. The default value is unavailable. This will cause some troubles to debug, especially when the kernel panic or other exceptions occur after suspend.
Therefore, you can modify this variable and re-compile the kernel, or the kernel also provides a kernel upload line: no_console_suspend, Which is OK when defining the kernel config.
However, this no_console_suspend line of the kernel does not seem to work. Let's take a look.CodeIt seems that if the Conditional compilation variable module is defined, this no_console_suspend will not work, and the corresponding _ setup is an empty function.
Therefore, the insurance point is to directly modify the console_suspend_enabled variable in printk. C.