<br><br><div class="gmail_quote">On Tue, Sep 28, 2010 at 11:45 PM, Ray Strode <span dir="ltr">&lt;<a href="mailto:halfline@gmail.com">halfline@gmail.com</a>&gt;</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>
&lt;<a href="mailto:jxm@risingtidesystems.com">jxm@risingtidesystems.com</a>&gt; wrote:<br>
&gt;&gt; Can you post the output of<br>
&gt;&gt; sudo stty -a --file=/dev/tty1<br>
&gt;<br>
&gt; root@000c29af1815:~# stty -a --file=/dev/tty1<br>
&gt; speed 38400 baud; rows 30; columns 80; line = 0;<br>
&gt; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = &lt;undef&gt;; eol2 =<br>
&gt; &lt;undef&gt;; swtch = &lt;undef&gt;; start = ^Q; stop = ^S; susp = ^Z;<br>
&gt; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;<br>
&gt; -parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts<br>
&gt; -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon<br>
&gt; -ixoff -iuclc -ixany -imaxbel iutf8<br>
&gt; opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0<br>
&gt; ff0<br>
&gt; isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt<br>
&gt; echoctl echoke<br>
</div>Okay, so this is all wrong.  This is called &quot;cooked&quot; mode, and<br>
plymouth requires &quot;raw&quot; 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&#39;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&#39;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&#39;s causing your problem.<br>
<div class="im"><br>
&gt; And tty1 after exiting plymouth:<br>
&gt; root@000c29af1815:~# plymouth quit<br>
&gt; root@000c29af1815:~# stty -a --file=/dev/tty1<br>
&gt; speed 38400 baud; rows 30; columns 80; line = 0;<br>
&gt; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = &lt;undef&gt;; eol2 =<br>
&gt; &lt;undef&gt;; swtch = &lt;undef&gt;; start = ^Q; stop = ^S; susp = ^Z;<br>
&gt; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;<br>
&gt; -parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts<br>
&gt; -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon<br>
&gt; -ixoff -iuclc -ixany -imaxbel iutf8<br>
&gt; opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0<br>
&gt; ff0<br>
&gt; isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt<br>
&gt; echoctl echoke<br>
</div>So that&#39;s exactly the same as before plymouth quit.  When plymouth<br>
quit&#39;s, it&#39;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&#39;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 &quot;can&#39;t access tty; job control turned off&quot;, 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>
&gt; root@000c29af1815:~# ls -l /proc/250/fd<br>
&gt; total 0<br>
&gt; lrwx------ 1 root root 64 2010-09-28 21:19 0 -&gt; /dev/console (deleted)<br>
&gt; lrwx------ 1 root root 64 2010-09-28 21:19 1 -&gt; /dev/console (deleted)<br>
&gt; lrwx------ 1 root root 64 2010-09-28 21:19 10 -&gt; /dev/tty1<br>
&gt; lrwx------ 1 root root 64 2010-09-28 21:19 2 -&gt; /dev/console (deleted)<br>
&gt; lrwx------ 1 root root 64 2010-09-28 21:19 3 -&gt; anon_inode:[eventpoll]<br>
&gt; lr-x------ 1 root root 64 2010-09-28 21:19 4 -&gt; pipe:[1922]<br>
&gt; l-wx------ 1 root root 64 2010-09-28 21:19 5 -&gt; pipe:[1922]<br>
&gt; lrwx------ 1 root root 64 2010-09-28 21:19 6 -&gt; /dev/ptmx<br>
&gt; lrwx------ 1 root root 64 2010-09-28 21:19 7 -&gt; /dev/tty1<br>
&gt; lrwx------ 1 root root 64 2010-09-28 21:19 8 -&gt; socket:[1927]<br>
&gt; lrwx------ 1 root root 64 2010-09-28 21:19 9 -&gt; /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&#39;t working like it should be (but it shouldn&#39;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>
&gt; Mmhh. This is really going to be difficult. See, I have a live distro with<br>
&gt; some proprietary software in, a lot of customs packages, in a prototype<br>
&gt; form, that is built with a complex sequence of Makefiles and scripts...<br>
&gt; Mostly is ressembles a debian squeeze and a debian-live initramfs. Also, it<br>
&gt; lacks many packages and typical binaries found on a normal distro, the user<br>
&gt; will never see a shell on it, it is mostly remote-controlled by a cluster<br>
&gt; 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&#39;s try to do more<br>
debugging-by-proxy first though.<br>
<br>
I&#39;ll reply again after I&#39;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>