public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] Suspend failure with nbcon + pm_debug_messages (Linux 6.18-rc4)
@ 2025-11-04  7:44 Sherry Sun
  2025-11-04  8:28 ` John Ogness
  0 siblings, 1 reply; 8+ messages in thread
From: Sherry Sun @ 2025-11-04  7:44 UTC (permalink / raw)
  To: esben@geanix.com, john.ogness@linutronix.de, pmladek@suse.com,
	senozhatsky@chromium.org, tglx@linutronix.de, Greg KH, Jiri Slaby,
	Shawn Guo, Sascha Hauer, ryotkkr98@gmail.com, kkartik@nvidia.com,
	fj6611ie@aa.jp.fujitsu.com
  Cc: Linux Kernel Mailing List, linux-serial, imx@lists.linux.dev,
	Pengutronix Kernel Team, linux-pm@vger.kernel.org

Hi all,

Since the latest i.MX UART switch to nbcon console with commit 70acca67bdd3 ("serial: imx: Switch to nbcon console"), I'm encountering a suspend issue on an i.MX8MP EVK board while testing with Linux 6.18-rc4.
The system fails to suspend when both nbcon is enabled and `pm_debug_messages` is turned on. When `pm_debug_messages` is disabled, suspend works normally. Additionally, if I revert the patch that adds nbcon support for the i.MX UART, suspend also works fine even with `pm_debug_messages` enabled.

The error message during suspend is:
    echo: write error: Operation not supported

This seems to indicate that nbcon's interaction with the suspend flow-especially when debug messages are printed-might be preventing certain threads or devices from freezing properly.
Let me know if more logs or testing details would help. I'd be happy to assist in debugging or validating any proposed fixes.

Suppose this is not i.MX UART specific issue, currently the following 3 UART drivers also support nbcon console.
Hi Toshiyuki / Kartik / Ryo, if it's convenient, can you please help check if this issue also exists on your UARTs? Thanks!

drivers/tty/serial/sifive.c:907:        .flags          = CON_PRINTBUFFER | CON_NBCON,
drivers/tty/serial/tegra-utc.c:512:     tup->console.flags              = CON_PRINTBUFFER | CON_NBCON;
drivers/tty/serial/amba-pl011.c:2616:   .flags          = CON_PRINTBUFFER | CON_ANYTIME | CON_NBCON,

The reproduce steps are quite simple:
root@imx8mpevk:~# echo 1 > /sys/power/pm_debug_messages
root@imx8mpevk:~# cat /sys/power/pm_debug_messages
1
root@imx8mpevk:~# echo mem > /sys/power/state
[   46.434401] PM: suspend entry (deep)
[   46.439474] Filesystems sync: 0.005 seconds
[   46.444008] Freezing user space processes
[   46.451855] Freezing user space processes completed (elapsed 0.007 seconds)
[   46.451876] OOM killer disabled.
[   46.451884] Freezing remaining freezable tasks
[   46.453106] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[   46.498122] PM: suspend devices took 0.048 seconds
[   46.505390] Disabling non-boot CPUs ...
[   46.511169] psci: CPU3 killed (polled 0 ms)
[   46.517174] psci: CPU2 killed (polled 0 ms)
[   46.523472] psci: CPU1 killed (polled 0 ms)
[   46.528669] Enabling non-boot CPUs ...
[   46.532891] Detected VIPT I-cache on CPU1
[   46.532920] GICv3: CPU1: found redistributor 1 region 0:0x00000000388a0000
[   46.532947] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[   46.551156] CPU1 is up
[   46.553907] Detected VIPT I-cache on CPU2
[   46.553934] GICv3: CPU2: found redistributor 2 region 0:0x00000000388c0000
[   46.553959] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[   46.554629] CPU2 is up
[   46.554999] Detected VIPT I-cache on CPU3
[   46.555022] GICv3: CPU3: found redistributor 3 region 0:0x00000000388e0000
[   46.555044] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[   46.555748] CPU3 is up
[   46.602411] imx-dwmac 30bf0000.ethernet eth1: No Safety Features support found
[   46.604199] imx-dwmac 30bf0000.ethernet eth1: IEEE 1588-2008 Advanced Timestamp supported
[   46.606020] imx-dwmac 30bf0000.ethernet eth1: configuring for phy/rgmii-id link mode
[   46.713935] caam 30900000.crypto: registering rng-caam
[   46.714857] xhci-hcd xhci-hcd.1.auto: xHC error in resume, USBSTS 0x401, Reinit
[   46.714867] usb usb1: root hub lost power or was reset
[   46.714871] usb usb2: root hub lost power or was reset
[   46.818976] PM: resume devices took 0.260 seconds
-sh: echo: write error: Operation not supported
[   46.819307] OOM killer enabled.
[   46.819311] Restarting tasks: Starting
[   46.820385] Restarting tasks: Done
[   46.820450] random: crng reseeded on system resumption
[   46.820553] PM: suspend exit
root@imx8mpevk:~#

Best Regards
Sherry


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-11-05  7:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-04  7:44 [BUG] Suspend failure with nbcon + pm_debug_messages (Linux 6.18-rc4) Sherry Sun
2025-11-04  8:28 ` John Ogness
2025-11-04  9:46   ` Sherry Sun
2025-11-04 10:16     ` John Ogness
2025-11-04 10:43       ` Sherry Sun
2025-11-04 23:19         ` John Ogness
2025-11-05  3:43           ` Sherry Sun
2025-11-05  7:30           ` Petr Mladek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox