New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 710709 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

frecon: Make VT pseudo terminal device files more easily accessible.

Project Member Reported by hungte@chromium.org, Apr 12 2017

Issue description

Forked from discussion in  issue 691762 .

We have few suggestions to how frecon provides access to its virtual terminals today:

1. VT numbering.

The framebuffer used to call Ctrl-Alt-F1 = /dev/tty1 = VT1, Ctrl-Alt-F2 = /dev/tty2 = VT2. And we have document everywhere saying "enter VT2". Frecon tends to call Ctrl-Alt-F1 = /run/frecon/vt0, Ctrl-Alt-F2 = /run/frecon/vt1

This is sightly confusing - for example in the issue of "recovery image failed to output debug message on VT3", Shelly thinks the VT3 = Ctrl-Alt-F4 = /run/frecon/vt3 and once said "there's nothing on VT3", while we were referring to Frame buffer style Ctrl-Alt-F3 = /dev/tty3.

So is it possible to change the /run/frecon/vtX numbers, or at least don't call it vt? (for example, term0 term1 => so people can think "term N = VT N+1".)

2. Missing /dev/tty#.

/dev/tty# missing under frecon is bad, and we debated this previously here:
  https://chromium-review.googlesource.com/392789

3. Currently /run/frecon/vt* do not persist. They appear on demand (if user switches to the VT), and disappears automatically (for example if Chrome started, vt0 goes a way).

There is a switch ensuring VTs will be created, but it's not enabled in normal mode, which makes scripts accessing VT less reliable - unlike /dev/ttyX which were known to always exist.
 

Comment 1 by derat@chromium.org, Apr 12 2017

Cc: dbehr@chromium.org derat@chromium.org
Components: -OS>Packages OS>Kernel>Display
Owner: marc...@chromium.org
I don't know anything about frecon and am probably not the right owner for this. To Stephane for triage.
Cc: -dbehr@chromium.org marc...@chromium.org
Owner: dbehr@chromium.org

Comment 3 by dbehr@chromium.org, Apr 18 2017

Status: WontFix (was: Untriaged)
In normal mode there is no need for any script to use frecon terminals. So there is no need for links to be created at startup. As you noticed, in any script that starts frecon you can control its behavior and add --pre-create-vts when you start frecon.

If you think vt numbering or file names are confusing now, changing the numbering or the names will make it even worse, plus you will have to change all the scripts. 

Yes, vt links do not persist for a good reason, the underlying ptys do not persist either, and I do not see any good use for a link that points nowhere. So if the terminal is closed pty goes away and so does the link to it. The numbering is associated with the internal index we use to address term arrays, so it is easy enough to change, but at this time it would just add to the confusion. You could very well use variable names in scripts like TERM1=/run/frecon/vt0 and use TERM1 everywhere instead of frecon link.


Comment 4 by hungte@chromium.org, Apr 19 2017

> In normal mode there is no need for any script to use frecon terminals.
   Aake the boot-messages for example, currently they have to kill running frecon (if any) and restart to provide new image list.
   If the terminal is always available, we may reuse the running session right?
  
> changing the numbering or the names will make it even worse

 I don't see how it can make things worse, and it's not too late now to change all scripts.
 But if derat start cleaning all legacy tty code in  issue 691762  then we may have more scripts to fix in future - and that's why it's a good timing to fix now.

> TERM1=/run/frecon/vt0 

 Take https://b.corp.google.com/issues/35647974#comment3 for example.
 For a developer who is not very familiar with frecon, it's very likely he'll look at /run/frecon and see file names like VT* and map "VT*" the description in issues into device names there.
 

Comment 5 by hungte@chromium.org, May 23 2017

One minor question.

In frecon commands, "--enable-vt1" seem to be mapped to Ctrl-Alt-F1 = /run/frecon/vt0". Is that correct?

Sign in to add a comment