Subject: X Problem: Cirrus Logic GD-5430/40 Graphics Card
To: None <port-i386@netbsd.org>
From: Simon Wenmouth <sbw102@u2fan.net>
List: port-i386
Date: 01/18/2001 15:08:39
Hi,

I have an old IBM i486 (16MB RAM) using NetBSD 1.4.2.
The graphics card is a:

Cirrus Logic GD-5430/40 with 1MB RAM

My problem is this:

When I leave an x-session the console font is 'lost'
being replaced with graphics characters (i.e. not
straight ASCII).

                //////////////////

This is quite annoying. On the mailing list from May 2000
someone on the list experienced a similar problem (Graham
Jenkins / Jeff Rizzo). However I cannot find the end of
this discussion and am desperate to know its conclusion.

If they are no longer on this list, here is a bit more
background for those who may be able to help. Actually I
hope i've included enough to solve the problem.

                //////////////////

The README.cirrus file details this problem under XFree86
version 3.1 an requires the use of a program such as Linuxs'
restorefont. However, the man pages do not make it clear (to
myself at least) what the BSD equivalent is.

NetBSD 1.4 changed from pccons and PCVT to wscons to handle
console affairs(?). So I assume I am to use wsfontload. The
command:

'wsfontload -e pcvt /usr/share/pcvt/fonts/vt220h.808'

does not work (I chose .808 at random). It reports:

"wsfontload: short read"

and

'wsfontload -e pcvt /usr/share/pcvt/fonts/vt220h.816'

"wsfontload: WSDISPLAYIO_LAYOUT: File name too long"

Attempts with .../vt220l.??? and ibm as the font type had same
problems. OK. Can anybody see the mistake ???

                //////////////////

For the curious, my /etc/wscons.conf file is this:

font  ibm  -8  ibm  /usr/share/pcvt/fonts/vt220l.808

#screen     0     -     vt220
screen     1     -     vt220
screen     2     -     vt220
screen     3     -     vt220
screen     4     -     -
#screen     4     80x25bf     vt220
#screen     5     80x50     vt220

                //////////////////

My kernel is a custom compile (new kb maps). The graphics options
are:

options     XSERVER
options      UCONSOLE
options      WSEMUL_VT100
options      WSDISPLAY_COMPAT_PCVT
options      WSDISPLAY_COMPAT_SYSCONS
options      WSDISPLAY_COMPAT_USL
options      WSDISPLAY_DEFAULTSCREENS=4
#pc0     at isa? port 0x60 irq 1
#vt0     at isa? port 0x60 irq 1
pcdisplay0     at isa?
wsdisplay*     at isa?
wsdisplay*     at vga? console ?
wsdisplay*     at pcdisplay? console ?

Any obvious problems here?

                //////////////////

My XF86Config file. This is hand built because XF86Setup
(etc) all hung when presented with the graphics card.

#
# Custom XF86Config
# Date: 12-12-00
#

Section "Files"
     FontPath "/usr/X11R6/lib/X11/fonts/local/"
     FontPath "/usr/X11R6/lib/X11/fonts/misc/"
     FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
     FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
     FontPath "/usr/X11R6/lib/X11/fonts/Type1"
     FontPath "/usr/X11R6/lib/X11/fonts/Speedo"
     FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
     FontPath "/usr/X11R6/lib/X11/fonts/100dpi"
     RGBPath "/usr/X11R6/lib/X11/rgb"
     ModulePath "/usr/X11R6/lib/modules"
EndSection


Section "Module"
#     No modules to load.
EndSection

Section "ServerFlags"
     DontZoom
     AllowMouseOpenFail
EndSection

Section "Keyboard"
     Protocol "Standard"
     XkbRules "xfree86"
     XkbModel "pc102"
     XkbLayout "us"
     XkbVariant ""
     XkbOptions ""
EndSection

Section "Pointer"
     Protocol "Wsmouse"
     Device "/dev/wsmouse0"
     BaudRate 1200
     Buttons 3
     ZAxisMapping Y
EndSection

Section "Monitor"
     Identifier "14 inch Monitor"
     VendorName "Penta"
     HorizSync 31.5
     VertRefresh 60
#
     Mode "640x480"
     DotClock 25.175
     HTimings 640 664 760 800
     VTimings 480 491 493 525
     EndMode
#
EndSection

Section "Device"
     Identifier "Cirrus Logic GD-5430/40"
     VendorName "Cirrus Logic"
     BoardName "unknown"
     ClockChip "cirrus"
     Option "no_linear"
     VideoRam 1024
     BIOSBase 0x360
     IOBase 0xa0000
EndSection

Section "Screen"
     Driver "SVGA"
     Device "Cirrus Logic GD-5430/40"
     Monitor "14 inch Monitor"
     DefaultColorDepth 8
     BlankTime 10
#
     SubSection "Display"
     Depth 8
     Virtual 800 600
     ViewPort 0 0
     Modes "640x480"
     Visual "TrueColor"
     EndSubSection
EndSection

Section "XInput"
#     Nothing
EndSection

                //////////////////

The X-server doesnt work if the no_linear option isn't set. It
doesn't work if the IOBase BIOSBase aren't there either. They
came from my dmesg printout.

                //////////////////

The output from dmesg is:

vga0 at isa0 port 0x3b0-0x3df iomem 0xa0000-0xbffff
wsdisplay0 at vga0: console (80x25, vt100 emulation)
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)

                //////////////////

Many thanks to those who have managed this far. Any help
appreciated,

Sincerly,

Simon Wenmouth



------------------------------------------------------------
Free e-mail for U2 fans: http://www.u2fan.net  - yourname@u2fan.net.
US$ 0,60 per hour = http://www.spedia.net/cgi-bin/tz.cgi?run=show_svc&fl=8&vid=1