In FreeBSD 4.4 and 4.5 CD both XFree86 3 and XFree86 4 are included, but XFree 3 is installed by default if you select to install as X user. This is because some old cards are not supported by XFree86 4. ThinkPad 380XD uses NeoMagic 128XD video adaptor. This card, although it is quite old, is only supported by XFree86 4. XFree86 group could not develop a drive for the card for quite some time because the manufature didn't release its specification. Anyway, you have to manually install XFree86 4. This can be done by /stand/sysinstall then "post installation configure" then "install prepackaged software".
Here is my XF86Config. A note: you better not comment out these two options:
Option "LcdCenter" "True"
Option "NoStretch" "True"
so that you get a better view in VGA mode.
Section "ServerLayout"
Identifier "XFree86 Configured"
Screen 0 "LCD"
InputDevice "Mouse" "CorePointer"
InputDevice "Keyboard" "CoreKeyboard"
EndSection
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
ModulePath "/usr/X11R6/lib/modules"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/CID/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection
Section "Module"
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
Load "pex5"
Load "record"
Load "xie"
EndSection
Section "InputDevice"
Identifier "Keyboard"
Driver "keyboard"
EndSection
Section "InputDevice"
Identifier "Mouse"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/sysmouse"
EndSection
Section "Monitor"
Identifier "LCD"
HorizSync 31.5 - 35.1
VertRefresh 50 - 70
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "NoLinear" # [<bool>]
Option "NoAccel" "False"
#Option "SWcursor" # [<bool>]
#Option "noMMIO" # [<bool>]
#Option "internDisp" # [<bool>]
#Option "externDisp" # [<bool>]
Option "LcdCenter" "True"
#Option "ShadowFB" # [<bool>]
Option "NoStretch" "True"
#Option "pciBurst" # [<bool>]
#Option "Rotate" # [<str>]
#Option "progLcdModeRegs" # [<bool>]
#Option "progLcdModeStretch" # [<bool>]
#Option "overrideValidateMode" # [<bool>]
Identifier "NM128XD"
Driver "neomagic"
VendorName "Neomagic"
BoardName "NM2160"
BusID "PCI:0:3:0"
EndSection
Section "Screen"
Identifier "LCD"
Device "NM128XD"
Monitor "LCD"
DefaultColorDepth 24
SubSection "Display"
Depth 16
Modes "800x600"
Virtual 1024 1024
EndSubSection
SubSection "Display"
Depth 24
Modes "800x600"
EndSubSection
EndSection
This Thinkpad uses Crystal 423x Audio system. It's supported by pcm. Because it's an on-board card, following option is required in kernel configuration:
options PNPBIOS
It took me months to discover this. I think this option is not well documented; you cannot find it or any reference to it in man pages of pcm snd and csa.
On a LCD every pixel is fixed, so when you start FreeBSD console it's often in a middle area of the screen (VGA mode), not full screen. However, FreeBSD console can be configured to work with SVGA mode.
Add this line to kernel config file for cs drive
options SC_PIXEL_MODE
to enalbe pixel mode for console, and then add
options VESA
for device vga to enable displaying console at SVGA resolution. Recompile the kernel. Then you can use
vidcontrol -g 100x37 VESA_800x600
to switch to a full screen 100x37 console. This looks much better.
# # TP380XD -- kernel configuration file for FreeBSD on Thinkpad 380XD # # If you have better configuration, let me know. # zhangweiwu@private.21cn.com machine i386 cpu I586_CPU ident ThinkPad380XD maxusers 32 #makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols options MATH_EMULATE #Support for x87 emulation options INET #InterNETworking options INET6 #IPv6 communications protocols options FFS #Berkeley Fast Filesystem options FFS_ROOT #FFS usable as root device [keep this!] options SOFTUPDATES #Enable FFS soft updates support options MFS #Memory Filesystem options MD_ROOT #MD is a potential root device options NFS #Network Filesystem options NFS_ROOT #NFS usable as root device, NFS required options CD9660 #ISO 9660 Filesystem options CD9660_ROOT #CD-ROM usable as root, CD9660 required options PROCFS #Process filesystem options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] #options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI options UCONSOLE #Allow users to grab the console options USERCONFIG #boot -c editor options VISUAL_USERCONFIG #visual boot -c editor options KTRACE #ktrace(1) support options SYSVSHM #SYSV-style shared memory options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options P1003_1B #Posix P1003_1B real-time extensions options _KPOSIX_PRIORITY_SCHEDULING options ICMP_BANDLIM #Rate limit bad replies options KBD_INSTALL_CDEV # install a CDEV entry in /dev device isa device eisa device pci # Floppy drives device fdc0 at isa? port IO_FD1 irq 6 drq 2 device fd0 at fdc0 drive 0 # ATA and ATAPI devices device ata device atadisk # ATA disk drives device atapicd # ATAPI CDROM drives options ATA_STATIC_ID #Static device numbering # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc0 at isa? port IO_KBD device atkbd0 at atkbdc? irq 1 flags 0x1 device psm0 at atkbdc? irq 12 options VESA device vga0 at isa? # splash screen/screen saver #pseudo-device splash # syscons is the default console driver, resembling an SCO console options SC_PIXEL_MODE options SC_HISTORY_SIZE=200 options SC_DISABLE_REBOOT options SC_TWOBUTTON_MOUSE #options SC_DFLT_FONT #makeoptions SC_DFLT_FONT=iso2 device sc0 at isa? flags 0x0080 # Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver #device vt0 at isa? #options XSERVER # support for X server on a vt console #options FAT_CURSOR # start with block cursor # If you have a ThinkPAD, uncomment this along with the rest of the PCVT lines options PCVT_SCANSET=2 # IBM keyboards are non-std # Floating point support - do not disable. device npx0 at nexus? port IO_NPX irq 13 # Power management support (see LINT for more options) device apm # PCCARD (PCMCIA) support device card device pcic0 device pcic1 # Serial (COM) ports device sio0 at isa? port IO_COM1 flags 0x10 irq 4 #device sio1 at isa? port IO_COM2 irq 3 # Parallel port device ppc0 at isa? irq 7 device ppbus # Parallel port bus (required) device lpt # Printer device plip # TCP/IP over parallel device ppi # Parallel port interface device # these are for my pcmcia nic. device miibus device ed # Pseudo devices - the number indicates how many units to allocate. pseudo-device loop # Network loopback pseudo-device ether # Ethernet support pseudo-device sl 1 # Kernel SLIP pseudo-device ppp 1 # Kernel PPP pseudo-device tun # Packet tunnel. pseudo-device pty # Pseudo-ttys (telnet etc) pseudo-device md # Memory "disks" pseudo-device gif # IPv6 and IPv4 tunneling pseudo-device faith 1 # IPv6-to-IPv4 relaying (translation) # The `bpf' pseudo-device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! ## This is (said to be) required for DHCP client pseudo-device bpf #Berkeley packet filter # USB support device uhci # UHCI PCI->USB interface device ohci # OHCI PCI->USB interface device usb # USB Bus (required) device ugen # Generic #device uhid # "Human Interface Devices" #device ukbd # Keyboard #device ulpt # Printer #device umass # Disks/Mass storage - Requires scbus and da #device ums # Mouse #device uscanner # Scanners Sound Device. Thinkpad 380XD has built-in Crystal PnP sound. options PNPBIOS device pcm0 at isa? port? irq 5 drq 1 flags 0x15 #device csa