Subject: cannot switch between X and ttyE0
To: None <netbsd-users@netbsd.org>
From: Klaus Heinz <k.heinz.mai.zwei@onlinehome.de>
List: netbsd-users
Date: 05/06/2002 22:07:27
Hi,

I have a strange problem with X and wscons:

As of two hours ago I had 4 virtual consoles (see below for the config file)
in this system with NetBSD/i386 1.5.2 and when I started X I could switch
between the X screen and the 4 consoles on ttyE0-ttyE3 (ALT-SHIFT-F1 - F5).

After playing around with wsconscfg and wsfontload this has changed and
I don't know why: Now, when I press ALT-SHIFT-F1 I don't get ttyE0 anymore
but the X screen instead. A-S-F{2,3,4} shows the expected virtual console.
A-S-F5 does nothing.

Changing from the X screen to one of the consoles first shows the output
of the X server (like the output in /var/log/XFree86.0.log) but only up
to the line '(==) Using pcvt driver (version 3.32)'.
Often I have to wait a few tenths of a second or have to press RETURN once
or twice to make the virtual console (1-3) appear.

After closing the X session ttyE0 returns but _without_ the output of
the X server I mentioned above. Before my experiments with wsconsfg and
wsfontload, this output always went to the console where I had started X.
I could even go back to the console, press CTRL-z and suspend the X
server, but not anymore :-(

It seems, X now occupies the console where I type 'startx' instead of
number five.

Even renaming /etc/wscons.conf to a different name doesn't reenable the
old behaviour after a reboot. The only reaction is an error message
from /etc/rc.d/wscons about the missing /etc/wscons.conf.

Can anyone explain this?

I have _not_ changed my kernel config or even recompiled the kernel.
To my knowledge, no X configuration was changed.

I use XFree86 4.1.0 with a NVidia card and although 4.1.0 is not the
current version and it's not the native X for NetBSD 1.5.2 the described
_changed_ behaviour seems still very strange to me.


The only files I changed today were /etc/wscons.conf and /etc/ttys
(syslog.conf changed for other reasons) and I reset them to the old values.

  -rw-r--r--  1 root  wheel  1820 Feb  6 01:47 /etc/XF86Config

  # ls -alt /etc
  -rw-r--r--   1 root  wheel      2275 May  6 20:37 ttys
  -rw-r--r--   1 root  wheel      1321 May  6 19:35 wscons.conf
  -rw-r--r--   1 root  wheel        51 May  6 18:12 resolv.conf -> /etc/ppp/res
  -rw-r--r--   1 root  wheel       705 May  6 12:56 syslog.conf

  # grep -v '^#' /etc/wscons.conf
  screen  1       -       vt100
  screen  2       -       vt100
  screen  3       -       vt100
  encoding de.nodead
  mux             1


  # more /etc/ttys
  console "/usr/libexec/getty Pc"         pc3     off secure
  ttyE0   "/usr/libexec/getty Pc"         vt220   on secure
  ttyE1   "/usr/libexec/getty Pc"         vt220   on secure
  ttyE2   "/usr/libexec/getty Pc"         vt220   on secure
  ttyE3   "/usr/libexec/getty Pc"         vt220   on secure
  #ttyE4  "/usr/libexec/getty Pc"         vt220   on secure
  tty00   "/usr/libexec/getty std.9600"   unknown off secure



relevant section of the config file:
  # builtin terminal emulations
  #options        WSEMUL_SUN              # sun terminal emulation
  options         WSEMUL_VT100            # VT100 / VT220 emulation
  # different kernel output - see dev/wscons/wsdisplayvar.h
  options         WS_KERNEL_FG=WSCOL_GREEN
  #options        WS_KERNEL_BG=WSCOL_BLACK
  # compatibility to other console drivers
  options         WSDISPLAY_COMPAT_PCVT           # emulate some ioctls
  options         WSDISPLAY_COMPAT_SYSCONS        # emulate some ioctls
  options         WSDISPLAY_COMPAT_USL            # VT handling
  options         WSDISPLAY_COMPAT_RAWKBD         # can get raw scancodes
  # see dev/pckbc/wskbdmap_mfii.c for implemented layouts
  options         PCKBD_LAYOUT="(KB_DE | KB_NODEAD)"
  # allocate a number of virtual screens at autoconfiguration time
  options         WSDISPLAY_DEFAULTSCREENS=4
  # use a large software cursor that doesn't blink
  options         PCDISPLAY_SOFTCURSOR