From philk@rotfl.com.au  Fri Feb 28 04:49:47 2003
Return-Path: <philk@rotfl.com.au>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 740FA37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 28 Feb 2003 04:49:47 -0800 (PST)
Received: from mail.rotfl.com.au (eth1779.sa.adsl.internode.on.net [150.101.235.242])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 334A043FCB
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 28 Feb 2003 04:49:46 -0800 (PST)
	(envelope-from philk@rotfl.com.au)
Message-Id: <20030228124944.E11C83F3@mail.rotfl.com.au>
Date: Fri, 28 Feb 2003 23:19:44 +1030 (CST)
From: Phil Kernick <philk@rotfl.com.au>
Reply-To: Phil Kernick <philk@rotfl.com.au>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: vidcontrol modes not restored on vt switch from X
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         48777
>Category:       kern
>Synopsis:       vidcontrol modes not restored on vt switch from X
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 28 04:50:04 PST 2003
>Closed-Date:    Sat Sep 17 12:38:46 GMT 2005
>Last-Modified:  Sat Sep 17 12:38:46 GMT 2005
>Originator:     Phil Kernick
>Release:        FreeBSD 4.8-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD catbert.rotfl.com.au 4.8-PRERELEASE FreeBSD 4.8-PRERELEASE #0: Fri Feb 28 18:00:36 CST 2003 root@catbert.rotfl.com.au:/pub/FreeBSD/obj/pub/FreeBSD/branches/4.0-stable/src/sys/CATBERT i386


>Description:
When switching virtual console from X to a text console, the vidcontol modes are not restored.

>How-To-Repeat:

Demonstration of the problem:

# vidcontrol VGA_90x30 < /dev/ttyv0

Alt-F9 to switch to XFree86
Alt-F1 to switch back

The screen is now in 80x25 mode, but it thinks it's in 90x30, meaning that each line is offset by 10 characters.

However, after the screen saver has activated and then been deactivated, the vidcontrol settings are restored.

Looking at the XFree86 source, when switching away it does this:

	ioctl(xf86Info.consoleFd, VT_ACTIVATE, key - KEY_F1 + 1);

Looking in src/sys/dev/syscons/syscons.c for this ioctl, we have:
	return sc_switch_scr(sc, i);

sc_switch_scr doesn't ever seem to call scrn_update which restores the screen.


Can someone who is a syscons expert have a look at this?


>Fix:

Not known.



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: rodrigc 
State-Changed-When: Sat Sep 17 12:37:54 GMT 2005 
State-Changed-Why:  
Video mode reverting cleaned up as part of fixes for kern/71142 
( http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/71142 ). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48777 
>Unformatted:
