[solved] QNX2 console not rendering programs properly on screen

Here’s an odd one; I’ve been playing with remote telnet connections between my windows machine and my QNX test machine, as well as another system in the facility…

And (seemingly) out of nowhere, the main console on my test machine is no longer displaying our normal software properly, nor any other utilities either (things like fdisk, sac, for example)

It’s as if the system no longer recognizes new lines and everything getting sent to the screen just wraps back around indiscriminately. Typically I can type ctrl+alt+* (or ctrl+alt+printscreen) and have the option to either send a capture of the screen to a printer or a file, but that also failed and gave an error that I hadn’t seen before term_save_image: term_video not called

Terminal name: rterm                                                            
3:/$ who                                                                        
Node             User TTY Idle-Time  Sign-On-Time    Flags  Command             
   0           system   9  --:--:--  Dec-31 11:59 pm  ----  login               
   0             root   0   0:00:00  Dec-31 11:59 pm  ----  who                 
   0             root   8   0:02:04  Dec-31 11:59 pm  ----  afm                 
3:/$ fdisk 3                                                                    
2J3;5H7m     OS        start      End           Number        Boot m4;5H7m   nam
e type  Cylinder  Cylinder  Cylinders  Blocks        m9;5H4.  --- (---)   ----  
    ----      ----      -----8;5H3.  qnz (  9)   2020      3029      1010   1622
5650    7;5H2.  qny (  8)   1010      2019      1010   16225650    6;5H1.  qnx (
  7)      0      1009      1010   16225587   *12;1HUse up/down arrows to select 
partition.13;1HType the letter  c  to change/add a partition.14;1HType the lette
r  s  to save your changes.15;1HType the letter  q  to quit.17;1HQNX is os type 
7,8 or 9    DOS is os type 1 or 4    Unused is OS type 020;1HFirst cylinder is 0
    Last cylinder is 486422;1HDisk is 1,361,281,536 bytes    H=255  T=4865  N=63
23;1H1mNote: Some old AT/XT controllers do not support more than 1024 cylindersm
24;1H1mAlso, the BOOT file must always reside within the first 1024 cylindersm6;
1H5m-->m1;1H7mIgnorem Next Prev Change Delete Mount Boot Unboot Save Quit K1;1H1
;1HIgnore1;55H7mQuitm2jH                                                        
If you created or changed a partition, DO NOT forget to remount the disk        
specifying the 'pa=' option. Failure to do this may overwrite other areas of    
the disk.                                                                       
3:/$ term_save_image: term_video not called.                                    

(hand typed^)
you can see a number and a semicolon and another combination of number and “H” in each line where it seems like a given line would end…

If I press ctrl+alt+3 or 4 to switch to the other two consoles that are normally configured, they work fine, programs load/render as anticipated.

This makes me think some kind of configuration or settings for the console somehow got changed.

I compared each console with the stty command and didn’t see anything obvious…
that “term_video not called” error makes me think it might be related…
(also, my blinking underscore to denote cursor position disappeared/stopped after trying to do the screen capture keystroke)

any thoughts?

Just a guess here. Try running the stty command. There are some terminal options that might be set wrong. The usual option causes a CR to be returned as CR+LF. If turned off, it might be causing this.

I believe that is the +ers option, that is enabled.

Like I said, things run fine on the other two consoles, all three have the same options enabled.

I also noticed that any time something clears the screen, I see the character combination “2J” appear… and if I type the icls command to clear the screen manually, the same “2J” text appears and the screen doesn’t clear.

I did some brief fishing around online and it appears that “[2J” and “[H” are common ‘clear screen’ escape sequence commands… It also looks as though the “3;5H” “12;1H” “17;1H” and similar codes sprinkled through that garbled fdisk command above are calls to move the cursor to a line and then column, or at least, again, it appears as such based on some of the other commands I found online.

This leads me to think that some component of the system that processes internal escape codes for rendering the console has somehow gotten messed up…

but I don’t really know the first place to look. Obviously I was poking around with the tcap command when trying to adjust settings for the telnet stuff I was doing, but I don’t recall explicitly doing anything that might have changed the main console session/profile…

I could just restore a fresh install of the system and go about my business, but I’d like to try and work out if this is recoverable.

[edit]: I switched to one of the other two consoles ($con3, $con4) to compare the “keys” option in the tcap command…
tcap keys <$con3
and both con3 and con4 have an empty table of key commands by default, but it appears the main console has a populated table which ALSO gets scrambled the same way as just about anything else in the main console

$con3 key configuration:

                                                          Feb 11  9:46:56 am  ý

Alternate:                              function key  1:
up arrow key:                           function key  2:
down arrow key:                         function key  3:
left arrow key:                         function key  4:
right arrow key:                        function key  5:
home key:                               function key  6:
end key:                                function key  7:
page up key:                            function key  8:
page down key:                          function key  9:
insert key:                             function key 10:
delete key:                             function key 11:
rubout key:                             function key 12:
erase line:                             function key 13:
select key:                             function key 14:
cancel key:                             function key 15:
help key:                               function key 16:
show:                                   function key 17:
tab to beg:                             function key 18:
tab to end:                             function key 19:
tab:                                    function key 20:
3:/das$

$con configuration:

3:/das$ tcap keys <$con                                   Feb 11  9:47:15 am  ý
2JH3;1HAlternate: ESC a         4;1Hup arrow key: ESC [ A       5;1Hdown arrow k
ey: ESC [ B       6;1Hleft arrow key: ESC [ D       7;1Hright arrow key: ESC [ C
       8;1Hhome key: ESC [ 2 ~     9;1Hend key: ESC [ 5 ~     10;1Hpage up key:
ESC [ 3 ~     11;1Hpage down key: ESC [ 6 ~     12;1Hinsert key: ESC [ 1 ~     1
3;1Hdelete key: ESC [ 4 ~     14;1Hrubout key: DEL           15;1Herase line: EM
            16;1Hselect key: ESC +         17;1Hcancel key: ESC -         18;1Hh
elp key: ESC [ 2 9 ~   19;1Hshow: ESC s         20;1Htab to beg: ESC HT b      2
1;1Htab to end: ESC HT e      22;1Htab: HT            23;1Hesc:               3;
41Hfunction key  1: ESC 1         4;41Hfunction key  2: ESC 2         5;41Hfunct
ion key  3: ESC 3         6;41Hfunction key  4: ESC 4         7;41Hfunction key
 5: ESC 5         8;41Hfunction key  6: ESC 6         9;41Hfunction key  7: ESC
7         10;41Hfunction key  8: ESC 8         11;41Hfunction key  9: ESC 9
    12;41Hfunction key 10: ESC 0         13;41Hfunction key 11: ESC !         14
;41Hfunction key 12: ESC @         15;41Hfunction key 13: ESC #         16;41Hfu
nction key 14: ESC $         17;41Hfunction key 15: ESC %         18;41Hfunction
 key 16: ESC ^         19;41Hfunction key 17: ESC &         20;41Hfunction key 1
8: ESC *         21;41Hfunction key 19: ESC (         22;41Hfunction key 20: ESC
 )
3:/das$

leads me to think it’s definitely something to do with the tcap configuration

So I had made a backup of the “tcap.dbase” file before I started making a new terminal profile to jive with PuTTY’s commands, and when I switched back to that backup, everything is fine.

Not sure what caused it to get corrupted, so I guess that’s something else I have to investigate, but at least it loads and renders things properly again.

[edit]: no corruption at all; a little more fumbling and I had apparently set the terminal profile to “rterm” because I had noticed that that was the default option offered when I was connecting via telnet. swapped the tcap database files around to reestablish the “problem,” then simply entered
tcap set qnx
and it was fine again.

I’m glad to hear that it worked out.