Keyboard input / init + questions

Ray Strode halfline at gmail.com
Tue Sep 28 14:45:23 PDT 2010


Hi,

On Tue, Sep 28, 2010 at 5:23 PM, Jerome Martin
<jxm at risingtidesystems.com> wrote:
>> Can you post the output of
>> sudo stty -a --file=/dev/tty1
>
> root at 000c29af1815:~# stty -a --file=/dev/tty1
> speed 38400 baud; rows 30; columns 80; line = 0;
> intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 =
> <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z;
> rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
> -parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
> -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon
> -ixoff -iuclc -ixany -imaxbel iutf8
> opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0
> ff0
> isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
> echoctl echoke
Okay, so this is all wrong.  This is called "cooked" mode, and
plymouth requires "raw" mode.
(-icanon among other things).

plymouth explicitly locks the terminal with a TIOCGLCKTRMIOS ioctl
call, so other programs can't change it.
That means that either

a) plymouth is setting the wrong mode before locking the terminal
b) plymouth is failing to lock the terminal correctly
c) something else is unlocking the terminal and then setting the wrong mode.

At any rate, this is what's causing your problem.

> And tty1 after exiting plymouth:
> root at 000c29af1815:~# plymouth quit
> root at 000c29af1815:~# stty -a --file=/dev/tty1
> speed 38400 baud; rows 30; columns 80; line = 0;
> intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 =
> <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z;
> rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
> -parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
> -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon
> -ixoff -iuclc -ixany -imaxbel iutf8
> opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0
> ff0
> isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
> echoctl echoke
So that's exactly the same as before plymouth quit.  When plymouth
quit's, it's supposed to restore the attributes to what it found them
as when it was started.

So either,

1) Those are the settings it found the tty in originally (which is
plausible actually)
2) The tty is locked by something else so plymouth can't restore the
settings it found the tty in

> root at 000c29af1815:~# ls -l /proc/250/fd
> total 0
> lrwx------ 1 root root 64 2010-09-28 21:19 0 -> /dev/console (deleted)
> lrwx------ 1 root root 64 2010-09-28 21:19 1 -> /dev/console (deleted)
> lrwx------ 1 root root 64 2010-09-28 21:19 10 -> /dev/tty1
> lrwx------ 1 root root 64 2010-09-28 21:19 2 -> /dev/console (deleted)
> lrwx------ 1 root root 64 2010-09-28 21:19 3 -> anon_inode:[eventpoll]
> lr-x------ 1 root root 64 2010-09-28 21:19 4 -> pipe:[1922]
> l-wx------ 1 root root 64 2010-09-28 21:19 5 -> pipe:[1922]
> lrwx------ 1 root root 64 2010-09-28 21:19 6 -> /dev/ptmx
> lrwx------ 1 root root 64 2010-09-28 21:19 7 -> /dev/tty1
> lrwx------ 1 root root 64 2010-09-28 21:19 8 -> socket:[1927]
> lrwx------ 1 root root 64 2010-09-28 21:19 9 -> /dev/fb0
So this confirms that the tty is definitely getting reopened okay.  The

/dev/console (deleted)

suggests that

http://cgit.freedesktop.org/plymouth/commit/?id=5b4ed8f35a1e9358d94df4b84ad49cea790f57e9

isn't working like it should be (but it shouldn't really affect your
present issue)

> Mmhh. This is really going to be difficult. See, I have a live distro with
> some proprietary software in, a lot of customs packages, in a prototype
> form, that is built with a complex sequence of Makefiles and scripts...
> Mostly is ressembles a debian squeeze and a debian-live initramfs. Also, it
> lacks many packages and typical binaries found on a normal distro, the user
> will never see a shell on it, it is mostly remote-controlled by a cluster
> admin CLI.
Okay, well I probably just need a distro that uses sysvinit.  So i
could go with stock debian,
opensuse, or mandriva i guess.  Let's try to do more
debugging-by-proxy first though.

I'll reply again after I've looked over the code a bit closer.

--Ray


More information about the plymouth mailing list