Bug 2277 - Let OS restore console fonts in VGA console - not X.
Summary: Let OS restore console fonts in VGA console - not X.
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/DDX/Xorg (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Egbert Eich
QA Contact:
URL: http://readlist.com/lists/vger.kernel...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-14 10:26 UTC by Egbert Eich
Modified: 2006-04-02 00:54 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Described patch (18.35 KB, patch)
2005-01-14 10:32 UTC, Egbert Eich
no flags Details | Splinter Review
Check kernel version (3.65 KB, patch)
2005-01-17 08:53 UTC, Egbert Eich
no flags Details | Splinter Review

Description Egbert Eich 2005-01-14 10:26:52 UTC
So far we relied on the generic VGA layer to restore text console fonts for us
when shutting down the server or VT switching back to the text console.
This has worked rather well but it has some downsides on Linux:
a. Many people use fbdev as console text mode. In this case it is not necessary   
   to save/restore console fonts as the console is running in graphics mode  
   anyway. 
b. Some architectures don't have a fbdev console but require a full POST of even 
   the primary card (ie. IA64). This posting has to take place before we even   
   have a chance to save anything. Therefore the fonts we save are the once  
   written to the chip by POST, not what has been programmed by the user.
c. Certain chipsets utilize the BIOS to perform mode setting. This may interfer
   with the vga save/restore font function in a strange way.

It would therefore be preferrable to let the OS - which has been used to set up
 the font in the first place - take care of saving/restoring the data.
I will attach a patch which will do so for Linux.
To make this fully functional a small patch needs to be applied to the Linux
kernel. See URL above.
Comment 1 Egbert Eich 2005-01-14 10:32:37 UTC
Created attachment 1679 [details] [review]
Described patch

The above patch is enabled by default. It is expected to cause problems when a
font with a different hight than the BIOS font is loaded.
This goes away once the kernel gets fixed.
To build without this new feature please add:
#define DoOSFontRestore NO
to your host.def.
Comment 2 Egbert Eich 2005-01-14 10:42:52 UTC
Committed.
Leaving open for further discussion.
Comment 3 Egbert Eich 2005-01-17 08:53:38 UTC
Created attachment 1692 [details] [review]
Check kernel version

Alan Cox has requested on LKML that we should check the OS version to see if
the kernel is able to support this feature.
The attached patch implements this. It checks if the release number is < 2.6.11

and doesn't attempt to do font save/restore thru the kernel.
Comment 4 Egbert Eich 2005-01-21 06:26:09 UTC
Kernel version check committed.
Comment 5 Stefan Dirsch 2005-04-16 11:57:39 UTC
Can we close this meanwhile as FIXED? 
Comment 6 Egbert Eich 2005-04-25 01:42:12 UTC
I intentionally left it open just in case problems arise.
Comment 7 Erik Andren 2006-04-02 18:54:30 UTC
As no problems seems to have risen over the last year I'm closing this bug. 


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.