You are not logged in.
The output of the "stty size" command in /etc/rc.d/functions returns "0 0" when using a serial console, resulting in a bad value for $STAT_COL and subsequently deltext().
This produces output like:
Changing the code to something like:
STAT_COL=$(stty size)
STAT_COL=${STAT_COL##* }
if [ "$STAT_COL" = "0" ]; then
STAT_COL=80
fi
STAT_COL=$[ $STAT_COL - 13 ]
Produces output like:
Code modified from LFS bugfix.
Offline
What's a serial console?
A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.
Offline
Offline
Post a bug report, sodface, including your fix. You can be sure the devs will see it that way.
Offline
Post a bug report, sodface, including your fix. You can be sure the devs will see it that way.
I actually already did, tomk, it's Bug 4316.
I wasn't sure whether I should or not so I post this thread first. I didn't get a response after a day or so and then I pacman'd something that upgraded the /etc/functions file and my fix got overwritten so my display was messed up again - that's when I went ahead and did the bug report.
But thanks for the reaffirmation, I'm sure that frivolous bug reports drive the devs nuts
Offline
Frivolous, yeah - but this one isn't, AND it provides the fix. That's the best kind of bug report.
Offline
Holy hell, you actually use a real terminal? That's awesome.
This fix could be better if you can determine how to detect wide terminals to, to flip the COLS from 80 to 132.
Offline
Holy hell, you actually use a real terminal? That's awesome.
I like being able to see everything from grub to login - I just wish my mobo would output to serial port also so I could see POST, BIOS etc.
This fix could be better if you can determine how to detect wide terminals to, to flip the COLS from 80 to 132.
I agree, it's not a very flexible fix.
Another thing about using a serial console with Arch is that the stock kernel config on at least one kernel version left out support for it. The next version re-enabled it.
The current 2.6.15 Arch kernel works and I'm pretty sure these are the relavent entries from the .config:
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_CS=m
The 2.6.16 kernel in testing doesn't work. I get grub output, lose kernel output, and then get it back at login.
The current .config seems to be missing the CONFIG_SERIAL_8250_CONSOLE=y entry completely:
#
# Serial drivers
#
CONFIG_SERIAL_8250=m
CONFIG_SERIAL_8250_CS=m
# CONFIG_SERIAL_8250_ACPI is not set
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set
And modularizing 8250 support kind of hurts too doesn't it, as far as when the serial port becomes available for use?
Offline
You can load the module in initrd. If it's not there at all, either module or built-in, it's a feature request.
Offline
This fix could be better if you can determine how to detect wide terminals to, to flip the COLS from 80 to 132.
Calling 'tset -Q' just prior to defining STAT_COLS results in the 'stty size' command returning a valid window size, so everything then works normally as written. Unfortunately, tset takes ~ 1 second to return and ends up being called 5 times on shutdown and 6 times on startup, obviously adding 5 and 6 seconds to each process respectively.
So I adjusted the suggested code a bit as seen below. This should adjust for different size terminals?
STAT_COL=$(stty size)
STAT_COL=${STAT_COL##* }
if [ "$STAT_COL" = "0" ]; then
tset -Q
STAT_COL=$(stty size)
STAT_COL=${STAT_COL##* }
fi
STAT_COL=$[ $STAT_COL - 13 ]
Offline