<br><br><div class="gmail_quote">On Tue, Sep 28, 2010 at 11:45 PM, Ray Strode <span dir="ltr"><<a href="mailto:halfline@gmail.com">halfline@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<div class="im"><br>
On Tue, Sep 28, 2010 at 5:23 PM, Jerome Martin<br>
<<a href="mailto:jxm@risingtidesystems.com">jxm@risingtidesystems.com</a>> wrote:<br>
>> Can you post the output of<br>
>> sudo stty -a --file=/dev/tty1<br>
><br>
> root@000c29af1815:~# stty -a --file=/dev/tty1<br>
> speed 38400 baud; rows 30; columns 80; line = 0;<br>
> intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 =<br>
> <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z;<br>
> rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;<br>
> -parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts<br>
> -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon<br>
> -ixoff -iuclc -ixany -imaxbel iutf8<br>
> opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0<br>
> ff0<br>
> isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt<br>
> echoctl echoke<br>
</div>Okay, so this is all wrong. This is called "cooked" mode, and<br>
plymouth requires "raw" mode.<br>
(-icanon among other things).<br></blockquote><div><br></div><div>When you speak of raw vs cooked, it takes me back to the 80's, writing some asm to use int16h to setup the keyboard. That makes me nostalgic :-)</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
plymouth explicitly locks the terminal with a TIOCGLCKTRMIOS ioctl<br>
call, so other programs can't change it.<br>
That means that either<br>
<br>
a) plymouth is setting the wrong mode before locking the terminal<br>
b) plymouth is failing to lock the terminal correctly<br>
c) something else is unlocking the terminal and then setting the wrong mode.<br></blockquote><div><br></div><div>Any idea how I can help debug that ?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
At any rate, this is what's causing your problem.<br>
<div class="im"><br>
> And tty1 after exiting plymouth:<br>
> root@000c29af1815:~# plymouth quit<br>
> root@000c29af1815:~# stty -a --file=/dev/tty1<br>
> speed 38400 baud; rows 30; columns 80; line = 0;<br>
> intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 =<br>
> <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z;<br>
> rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;<br>
> -parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts<br>
> -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon<br>
> -ixoff -iuclc -ixany -imaxbel iutf8<br>
> opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0<br>
> ff0<br>
> isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt<br>
> echoctl echoke<br>
</div>So that's exactly the same as before plymouth quit. When plymouth<br>
quit's, it's supposed to restore the attributes to what it found them<br>
as when it was started.<br>
<br>
So either,<br>
<br>
1) Those are the settings it found the tty in originally (which is<br>
plausible actually)<br>
2) The tty is locked by something else so plymouth can't restore the<br>
settings it found the tty in<br></blockquote><div><br></div><div>Find attached a screenshot taken with break=bottom.</div><div>One weird thing is that sh says "can't access tty; job control turned off", but the tty devs do exist in /dev...</div>
<div>Hope it helps.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
> root@000c29af1815:~# ls -l /proc/250/fd<br>
> total 0<br>
> lrwx------ 1 root root 64 2010-09-28 21:19 0 -> /dev/console (deleted)<br>
> lrwx------ 1 root root 64 2010-09-28 21:19 1 -> /dev/console (deleted)<br>
> lrwx------ 1 root root 64 2010-09-28 21:19 10 -> /dev/tty1<br>
> lrwx------ 1 root root 64 2010-09-28 21:19 2 -> /dev/console (deleted)<br>
> lrwx------ 1 root root 64 2010-09-28 21:19 3 -> anon_inode:[eventpoll]<br>
> lr-x------ 1 root root 64 2010-09-28 21:19 4 -> pipe:[1922]<br>
> l-wx------ 1 root root 64 2010-09-28 21:19 5 -> pipe:[1922]<br>
> lrwx------ 1 root root 64 2010-09-28 21:19 6 -> /dev/ptmx<br>
> lrwx------ 1 root root 64 2010-09-28 21:19 7 -> /dev/tty1<br>
> lrwx------ 1 root root 64 2010-09-28 21:19 8 -> socket:[1927]<br>
> lrwx------ 1 root root 64 2010-09-28 21:19 9 -> /dev/fb0<br>
</div>So this confirms that the tty is definitely getting reopened okay. The<br>
<br>
/dev/console (deleted)<br>
<br>
suggests that<br>
<div class="im"><br>
<a href="http://cgit.freedesktop.org/plymouth/commit/?id=5b4ed8f35a1e9358d94df4b84ad49cea790f57e9" target="_blank">http://cgit.freedesktop.org/plymouth/commit/?id=5b4ed8f35a1e9358d94df4b84ad49cea790f57e9</a><br>
<br>
</div>isn't working like it should be (but it shouldn't really affect your<br>
present issue)<br></blockquote><div><br></div><div>ok.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
> Mmhh. This is really going to be difficult. See, I have a live distro with<br>
> some proprietary software in, a lot of customs packages, in a prototype<br>
> form, that is built with a complex sequence of Makefiles and scripts...<br>
> Mostly is ressembles a debian squeeze and a debian-live initramfs. Also, it<br>
> lacks many packages and typical binaries found on a normal distro, the user<br>
> will never see a shell on it, it is mostly remote-controlled by a cluster<br>
> admin CLI.<br>
</div>Okay, well I probably just need a distro that uses sysvinit. So i<br>
could go with stock debian,<br>
opensuse, or mandriva i guess. Let's try to do more<br>
debugging-by-proxy first though.<br>
<br>
I'll reply again after I've looked over the code a bit closer.<br></blockquote><div><br></div><div>You know, after that sh complaint during initrd, I wonder if something is not broken in my initramfs. What exactly is needed for proper tty setup ? I might have broken something (or pasted a bug from debian-live scripts).</div>
<div> </div></div>Best,<br>-- <br>Jérôme Martin<br>