linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alper Nebi Yasak <alpernebiyasak@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>, Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	linux-serial@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Arvind Sankar <nivedita@alum.mit.edu>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Biggers <ebiggers@google.com>,
	Feng Tang <feng.tang@intel.com>,
	Grzegorz Halat <ghalat@redhat.com>,
	Lukas Wunner <lukas@wunner.de>, Nicolas Pitre <nico@fluxnic.net>,
	Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [RFC PATCH v2 0/3] Prefer working VT console over SPCR and device-tree chosen stdout-path
Date: Thu, 30 Apr 2020 22:32:04 +0300	[thread overview]
Message-ID: <f332a19b-e8d1-d2b0-37c8-08381563f41b@gmail.com> (raw)
In-Reply-To: <20200430164413.GV185537@smile.fi.intel.com>

On 30/04/2020 19:44, Andy Shevchenko wrote:
> First of all I see only cover letter and one out of 3 patches.

Apologies, the tool I've used to send the patches (U-Boot's patman)
Cc-ed the scripts/get_maintainer.pl output per-patch, instead of
per-series as I had assumed it would. This was the first time I tried
it, I'll keep that in mind.

Here are links to all four emails:

https://lore.kernel.org/linux-serial/20200430161438.17640-1-alpernebiyasak@gmail.com/
https://lore.kernel.org/linux-serial/20200430161438.17640-2-alpernebiyasak@gmail.com/
https://lore.kernel.org/linux-serial/20200430161438.17640-3-alpernebiyasak@gmail.com/
https://lore.kernel.org/linux-serial/20200430161438.17640-4-alpernebiyasak@gmail.com/

Or I can resend the last two patches to you, or resend all the parts to
everyone again.

>> eventually figured out that the kernel preferred the serial port
>> (inaccessible to me) over the built-in working display/keyboard and was
>> probably asking there.
> 
> "probably". Please, confirm that first.
> Also, without command line it's hard to say what you have asked kernel to do.

I was trying to boot a Debian userspace with cryptsetup, with the kernel
command line:

	root=/dev/mapper/sda3_crypt quiet splash

The Debian initramfs handles most of the work (the password prompt,
device mounts, etc.).

When I used the same kernel/initramfs/rootfs on a QEMU aarch64 VM, it
only prompted on the serial console instead the framebuffer. I'm
assuming the same thing happens on my hardware as well.

I can also ask the Debian initramfs to launch a shell by adding "break"
to the command line, which won't be printed on my device's screen unless
I also add "console=tty0". That shell also only appears on the serial
console on the QEMU aarch64 VM, unless I again add "console=tty0".

This is my primary computer and I'd prefer not dismantling it, so my
findings above are the best I believe I can do to confirm it now. I'm 
hoping other people would be interested in this, and would test more 
than I can.

>> Running plymouth in the initramfs solves that specific problem, but
> 
> What is plymouth?

Plymouth is a userspace program that's famous for showing a splash
animation during boot, but in this context: it handles user-interaction
that might need to happen while the initramfs is running, by printing
messages and prompts and reading user input to/from all consoles.

>>    ------------------+-----------------------+-----------------------+
>>    Chromebook Plus   | tty0     -WU (EC p  ) | tty0     -WU (EC p  ) |
>>    (w/o either)      |                       |                       |
>>    ------------------+-----------------------+-----------------------+
> 
> either == SPCR or stdout-path?

As in "When the device has no SPCR _and_ no chosen stdout-path".

>> This patchset tries to ensure that VT is preferred in those conditions
>> even in the presence of firmware-mandated serial consoles.
> 
> This sounds completely wrong. serial should be preferred over vt due to very
> debugging on early stages and SPCR is exactly for that.

I'm saying that from a userspace perspective, and the patches explicitly
try to switch to the vt only after a real framebuffer is initialized. So
if I did it right, it would still use SPCR/stdout-path's console during
the early stages. (I admit I haven't adjusted to talking within a kernel 
context yet).

In all honesty, I'm not sure if this is even considered a kernel bug,
let alone my patches a correct solution; hence the RFC PATCH as an
attempt at demonstrating this can be "fixed" in kernel.

> Maybe you should figure out the real root cause?

Thanks for the reply. Any ideas on what else could be causing this 
behaviour?

  reply	other threads:[~2020-04-30 19:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30 16:14 [RFC PATCH v2 0/3] Prefer working VT console over SPCR and device-tree chosen stdout-path Alper Nebi Yasak
2020-04-30 16:14 ` [RFC PATCH v2 1/3] printk: Add function to set console to preferred console's driver Alper Nebi Yasak
2020-04-30 16:46   ` Andy Shevchenko
2020-05-01  1:44   ` Sergey Senozhatsky
2020-05-01 11:48     ` Alper Nebi Yasak
2020-05-13  5:35   ` Sergey Senozhatsky
2020-05-24 10:01     ` Daniel Vetter
2020-04-30 16:14 ` [RFC PATCH v2 2/3] vt: Set as preferred console when a non-dummy backend is bound Alper Nebi Yasak
2020-04-30 16:14 ` [RFC PATCH v2 3/3] printk: Preset tty0 as a pseudo-preferred console Alper Nebi Yasak
2020-04-30 16:44 ` [RFC PATCH v2 0/3] Prefer working VT console over SPCR and device-tree chosen stdout-path Andy Shevchenko
2020-04-30 19:32   ` Alper Nebi Yasak [this message]
2020-05-01  1:30 ` Sergey Senozhatsky
2020-05-01 11:08   ` Alper Nebi Yasak
2020-05-01 13:16     ` Andy Shevchenko
2020-05-01 15:07       ` Alper Nebi Yasak
2020-05-13 14:37 ` Petr Mladek
2020-05-13 22:22   ` Benjamin Herrenschmidt
2020-05-15 19:27   ` Alper Nebi Yasak
2020-05-25 13:04     ` Petr Mladek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f332a19b-e8d1-d2b0-37c8-08381563f41b@gmail.com \
    --to=alpernebiyasak@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=benh@kernel.crashing.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=davem@davemloft.net \
    --cc=ebiggers@google.com \
    --cc=feng.tang@intel.com \
    --cc=ghalat@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=nico@fluxnic.net \
    --cc=nivedita@alum.mit.edu \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sam@ravnborg.org \
    --cc=sergey.senozhatsky@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).