From kostik@org.chem.msu.su  Sat Feb 13 12:08:44 1999
Received: from org.chem.msu.su (org.chem.msu.su [158.250.32.94])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA10834
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 13 Feb 1999 12:08:41 -0800 (PST)
          (envelope-from kostik@org.chem.msu.su)
Received: (from kostik@localhost)
	by org.chem.msu.su (8.8.8/8.8.8) id XAA05957;
	Sat, 13 Feb 1999 23:08:37 +0300 (MSK)
	(envelope-from kostik)
Message-Id: <199902132008.XAA05957@org.chem.msu.su>
Date: Sat, 13 Feb 1999 23:08:37 +0300 (MSK)
From: kostik@org.chem.msu.su
Reply-To: kostik@org.chem.msu.su
To: FreeBSD-gnats-submit@freebsd.org
Subject: problem with an x-server and syscons driver seems to be solved
X-Send-Pr-Version: 3.2

>Number:         10066
>Category:       kern
>Synopsis:       problem with a X-Window and syscons driver solved
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 13 12:10:00 PST 1999
>Closed-Date:    Fri Jan 11 22:26:59 PST 2002
>Last-Modified:  Fri Jan 11 22:27:15 PST 2002
>Originator:     Konstantin Y. Pasichnichenko
>Release:        FreeBSD 3.0-RELEASE i386
>Organization:
Russia, Moscow, Moscow State University, Chemistry department.
>Environment:
System: FreeBSD-3.0-Release i386  + XFree86-3.3.2
Architecture: i386 (Pentium-133 system)

>Description:
it is well known problem: switching between consoles using syscons driver
while x-server is starting will hang the syscons driver with a ~50% possibility
(i.e. turn it to unknown abnormal state).

>How-To-Repeat:
start an x-server (xfree86, independently to x-server type)
(or run x-window system), and while x-server _is_ starting
and _is_ switching to next available free console,
quickly switch back to text console by ctrl+alt+f? combination.
it will some times turn syscons console driver
to unknown half-hung state, when it isn't possible to switch back
from graphics-x-server-console to text-cosole.
or, the most better way, run x-window (xfree86-3.3.2) in 8-bpp mode
and then run xf86quake linux version (with a linux emulation enabled).
xf86quake will lock console driver with all x-server. then while running
xf86quake try to switch to text console (regardless which one text console
will need). syscons driver will `beep' but willn't switch back to
text console. after this your may quit from xf86quake - syscons driver
have hung and willn't switch to any text console anymore, he will `beep'
instead, but you still able to run x-server remotely, while loggin in
from network or serial console and to continue your work in x-window;
text-mode consoles will broke.

>Fix:
the following patch applied to syscons driver source
/usr/src/sys/i386/isa/syscons.c
will fix the broblem discussed above in a case of FreeBSD-3.0-RELEASE:

-- file syscons.c.diff --

*** syscons.c.old	Fri Oct  2 01:04:52 1998
--- syscons.c	Thu Jan  7 23:40:04 1999
***************
*** 2312,2317 ****
--- 2312,2328 ----
  	else
  	    switch_in_progress = FALSE;
      }
+     /*
+      * XXX: kostik's hack:
+      *      i found it eliminate console Xserver related problem;
+      *      now console will not hang while switching
+      *      to text console simultaneously with a Xserver starting;
+      *      if it will work for somebody else
+      *        pls, drop me e-mail to kostik@org.chem.msu.su
+      */
+     switch_in_progress = FALSE;
+     delayed_next_scr   = FALSE;
+ 
      return 0;
  }
  

>Release-Note:
>Audit-Trail:

From: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
To: kostik@org.chem.msu.su
Cc: FreeBSD-gnats-submit@freebsd.org,
	yokota@zodiac.mech.utsunomiya-u.ac.jp
Subject: Re: kern/10066: problem with an x-server and syscons driver seems to
	 be solved 
Date: Tue, 31 Aug 1999 18:17:25 +0900

 >>Number:         10066
 >>Category:       kern
 >>Synopsis:       problem with a X-Window and syscons driver solved
 [...]
 >>Originator:     Konstantin Y. Pasichnichenko
 >>Release:        FreeBSD 3.0-RELEASE i386
 >>Organization:
 >Russia, Moscow, Moscow State University, Chemistry department.
 >>Environment:
 >System: FreeBSD-3.0-Release i386  + XFree86-3.3.2
 >Architecture: i386 (Pentium-133 system)
 >
 >>Description:
 >it is well known problem: switching between consoles using syscons driver
 >while x-server is starting will hang the syscons driver with a ~50% possibilit
 >y
 >(i.e. turn it to unknown abnormal state).
 [...]
 
 Both 4.0-CURRENT and 3.2-STABLE (and forthcoming 3.3-RELEASE) have
 revised vty switching code and we should see the above problem less
 frequently, if not never...
 
 Kazu
 
State-Changed-From-To: open->feedback 
State-Changed-By: mike 
State-Changed-When: Thu Jul 19 16:16:27 PDT 2001 
State-Changed-Why:  

Does this problem still occur in newer versions of FreeBSD, 
such as 4.3-RELEASE? 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=10066 
State-Changed-From-To: feedback->closed 
State-Changed-By: bmah 
State-Changed-When: Fri Jan 11 22:26:59 PST 2002 
State-Changed-Why:  
Feedback timeout (5 months). 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=10066 
>Unformatted:
