SUMMARY: Console Not Scrolling Properly

From: Charles A Finnell (
Date: Sat Aug 08 1992 - 13:10:18 CDT

Dear Sun Managers,

Several replies pointed me to the console(4S) "man" page, which lists ASCII
escape sequences to reset the console driver, and I've included David Beard's
reply which nicely summarizes the main points and includes a fix that can be
inserted in the ~/.logout file.

Since we rebooted recently and the problem has not returned, I have not had a
chance to test these escape sequences on my particular problem, but they do
seem like the right approach.

I'll continue to keep an eye on the console and when I do catch it in its
confused state, I'll check everything and find out what works in my case.

Other possibilities mentioned include:

1. Check that TERM and TERMCAP are set properly for the console.

2. Use "stty" first to check *all* terminal settings, then use "stty" again
   to fix any that are set improperly, before trying "reset" and/or "tset".

3. Check that /etc/ttytab has the proper terminal type for the console.

4. CPU board may be bad.

5. Monitor may be about to go bad.

6. EEPROM revision may be out-of-date.

7. EEPROM settings may be incorrect: Use the "eeprom" command or the "q"
   command for older machines, or "setenv" with the newer EEPROMS to examine
   and change any incorrect parameters.

Thanks to all the following for their patient advice and assistance:

  Jeff Bacon <>
  David Beard <>
  Maurizio Codogno <mau@beatles.CSELT.STET.IT>
  Tad Guy <>
  Pete Hartman <> (Kurt J. Lidl)
  Jeff Nieusma <>
  Art Schoenstadt <0085P@NAVPGS.BITNET>
  kevins@corn.Japan.Sun.COM (Kevin Sheehan {Consulting Poster Child})
  Daniel Trinkle <> (Brad Walker)

-- Charlie <>

------- Forwarded Message

Date: Mon, 03 Aug 92 12:28:16 CST
cc: (David Beard)
In-Reply-To: <>; from "Charles A Finnell" at A
        ug 2, 92 5:06 pm
From: David Beard <>
Subject: Re: Console Not Scrolling Properly
> Our 19" black-and-white Sun console occasionally gets into a state where it
> will not scroll properly and seems confused about its own screen dimensions.
> The symptoms are that, outside of any windowing system, pressing return
> multiple times will cause prompts to appear normally for a dozen or so lines,
> then they'll pop up in the upper right corner and hop around in different
> places, as if the console thinks its screen dimensions are something other than
> the normal 80x34 and is therefore unable to scroll properly. Parts of the text
> seem to extend off the screen without wrapping, and additional returns can
> cause them to appear on the screen in a different place.

Your console has scrolling mode disabled. The console driver includes some ANSI
terminal emulation. If you send the console the escape sequence "<esc>[0r"
(where <esc> represents the Escape key, CTRL-[, 0x1B) scrolling mode will be
disabled. You can reenable this using "<esc>[1r". This is all detailed in the
manual pages - see console(4S).

> Various combinations and uses of "tset" and/or "reset" seem to have no effect.

reset should work IF you have the correct value for "TERM", Try
        set term=sun

If not, perhaps your TERMCAP entry for 'sun' has been screwed up ...

> Days to weeks after a reboot, after many different users have logged in and out
> of the console, I'll walk by and notice that it's in that state again.

Yes, this will happen if users have `term' set incorrectly, and they use
something that sends escape sequences to the screen. For example a screen
editor. tcsh will do this too, if you include highlighted text in your prompt.

> Is there any way to correct the problem without rebooting?

Yes, "set term=sun; reset", or write the appropriate escape sequences to the
console. I include the following in my global .logout file ...
if ( `/bin/tty` == "/dev/console" ) then
  echo -n "^[[s^[[0m^[[1r^[[p" >> /dev/console
  echo "${USER} logged out at `date`."
(Note the ^[ is the escape character)
This will
        1 Reset the terminal emulator
        2 Select normal graphics rendition (i.e. each subsequent character will
          appear with black writing on white background)
        3 Set the scrolling region
        4 Set the screen to "black on white".

Regards, David
------- End of Forwarded Message

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:46 CDT