Installing FreeBSD 10 (amd64) on a ThinkPad T400
Contents
Features
FreeBSD is an UNIX operating system for x86 and others compatible architectures. It is derived from BSD, the version of UNIX® developed at the University of California, Berkeley. It is developed and maintained by a team of individuals.
FreeBSD offers advanced networking, performance, security and compatibility features which are still missing in some of the best commercial operating systems.
FreeBSD makes an ideal Internet or Intranet server. It provides robust network services under the heaviest loads and uses memory efficiently to maintain good response times for thousands of simultaneous user processes. But on notebooks it is a very usable operating system with many features for customization, including power management.
With over 20,000 ported libraries and applications for desktop, server, appliance, and embedded environments, there are many applications which were designed specifically for notebooks.
The best is that FreeBSD is free, and the open source BSD license it is distributed under make sure it will continue to be free. Since FreeBSD is open source and a framework has been set up to easily do so, it is possible to build a custom kernel, allowing faster booting and operation since you can remove any features unneeded in your specific operations.
Installation
The best way to install the 64 bits version of FreeBSD (amd64) on a ThinkPad T400 is to download the ISO files and burn them. There are also image files for an USB stick. You can find the ISOs and image files right here: FTP Server of FreeBSD. Choose the version you want to install:
- FreeBSD-10.0-RELEASE-amd64-bootonly.iso: This is an image for CD for boot only and repair purposes
- FreeBSD-10.0-RELEASE-amd64-disc1.iso: Here is everything for installing FreeBSD on harddisk including the source codes ofd the whole operating system
- FreeBSD-10.0-RELEASE-amd64-dvd1.iso: The same as above plus many software packages for desktops and servers
- FreeBSD-10.0-RELEASE-amd64-memstick.img: This is an image for USB sticks with a size of about 700MB. Please copy it with this command to your stick
dd if=/path/to/FreeBSD-10.0-RELEASE-amd64-memstick.img of=/dev/<USB stick device>
Known Issues
If you are choosing the installation from USB stick then you have to press F12 during the POST of the boot phase of your T400. During the installation process of FreeBSD there are no issues. It is done in fast fifteen minutes and the GENERIC kernel finds all devices.
Post-Installation Setup
The post installation setup is on some points very tricky while the setup oif the video device Intel GM45 is very easy. The following lines show all devices found by the kernel.
# dmesg
Copyright (c) 1992-2014 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 10.0-RELEASE-p7 #3: Fri Aug 22 20:51:43 CEST 2014 juergen@t400-freebsd:/usr/obj/usr/src/sys/T400 amd64 FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 CPU: Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz (2394.05-MHz K8-class CPU) Origin = "GenuineIntel" Id = 0x1067a Family = 0x6 Model = 0x17 Stepping = 10 Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> Features2=0xc08e3fd<SSE3,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,OSXSAVE> AMD Features=0x20100800<SYSCALL,NX,LM> AMD Features2=0x1<LAHF> TSC: P-state invariant, performance statistics real memory = 3221225472 (3072 MB) avail memory = 2993881088 (2855 MB) Event timer "LAPIC" quality 400 ACPI APIC Table: <LENOVO TP-7U > FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs FreeBSD/SMP: 1 package(s) x 2 core(s) cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ioapic0: Changing APIC ID to 1 ioapic0 <Version 2.0> irqs 0-23 on motherboard kbd1 at kbdmux0 random: <Software, Yarrow> initialized acpi0: <LENOVO TP-7U> on motherboard CPU0: local APIC error 0x40 acpi_ec0: <Embedded Controller: GPE 0x11, ECDT> port 0x62,0x66 on acpi0 acpi0: Power Button (fixed) acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, bbf00000 (3) failed cpu0: <ACPI CPU> on acpi0 cpu1: <ACPI CPU> on acpi0 attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 950 Event timer "HPET" frequency 14318180 Hz quality 450 Event timer "HPET1" frequency 14318180 Hz quality 440 Event timer "HPET2" frequency 14318180 Hz quality 440 Event timer "HPET3" frequency 14318180 Hz quality 440 atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0 Event timer "RTC" frequency 32768 Hz quality 0 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 acpi_lid0: <Control Method Lid Switch> on acpi0 acpi_button0: <Sleep Button> on acpi0 pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0 pci0: <ACPI PCI bus> on pcib0 vgapci0: <VGA-compatible display> port 0x1800-0x1807 mem 0xf4400000-0xf47fffff,0xd0000000-0xdfffffff irq 16 at device 2.0 on pci0 agp0: <Intel GM45 SVGA controller> on vgapci0 agp0: aperture size is 256M, detected 32764k stolen memory drm0: <Mobile Intel® GM45 Express Chipset> on vgapci0 info: [drm] MSI enabled 1 message(s) info: [drm] AGP at 0xd0000000 256MB info: [drm] Initialized i915 1.6.0 20080730 vgapci0: Boot video device vgapci1: <VGA-compatible display> mem 0xf4200000-0xf42fffff at device 2.1 on pci0 pci0: <simple comms> at device 3.0 (no driver attached) pci0: <simple comms, UART> at device 3.3 (no driver attached) em0: <Intel(R) PRO/1000 Network Connection 7.3.8> port 0x1840-0x185f mem 0xfc100000-0xfc11ffff,0xfc325000-0xfc325fff irq 20 at device 25.0 on pci0 em0: Using an MSI interrupt em0: Ethernet address: <mac address lan> uhci0: <Intel 82801I (ICH9) USB controller> port 0x1860-0x187f irq 20 at device 26.0 on pci0 usbus0 on uhci0 uhci1: <Intel 82801I (ICH9) USB controller> port 0x1880-0x189f irq 21 at device 26.1 on pci0 usbus1 on uhci1 uhci2: <Intel 82801I (ICH9) USB controller> port 0x18a0-0x18bf irq 22 at device 26.2 on pci0 usbus2 on uhci2 ehci0: <Intel 82801I (ICH9) USB 2.0 controller> mem 0xfc326c00-0xfc326fff irq 23 at device 26.7 on pci0 usbus3: EHCI version 1.0 usbus3 on ehci0 pci0: <multimedia, HDA> at device 27.0 (no driver attached) pcib1: <ACPI PCI-PCI bridge> irq 20 at device 28.0 on pci0 pci2: <ACPI PCI bus> on pcib1 pcib2: <ACPI PCI-PCI bridge> irq 21 at device 28.1 on pci0 pci3: <ACPI PCI bus> on pcib2 iwn0: <Intel Ultimate N WiFi Link 5300> mem 0xf4300000-0xf4301fff irq 17 at device 0.0 on pci3 pcib3: <ACPI PCI-PCI bridge> irq 22 at device 28.2 on pci0 pci4: <ACPI PCI bus> on pcib3 pci4: <memory> at device 0.0 (no driver attached) pcib4: <ACPI PCI-PCI bridge> irq 23 at device 28.3 on pci0 pci5: <ACPI PCI bus> on pcib4 pcib5: <ACPI PCI-PCI bridge> irq 20 at device 28.4 on pci0 pci13: <ACPI PCI bus> on pcib5 uhci3: <Intel 82801I (ICH9) USB controller> port 0x18c0-0x18df irq 16 at device 29.0 on pci0 usbus4 on uhci3 uhci4: <Intel 82801I (ICH9) USB controller> port 0x18e0-0x18ff irq 17 at device 29.1 on pci0 usbus5 on uhci4 uhci5: <Intel 82801I (ICH9) USB controller> port 0x1c00-0x1c1f irq 18 at device 29.2 on pci0 usbus6 on uhci5 ehci1: <Intel 82801I (ICH9) USB 2.0 controller> mem 0xfc327000-0xfc3273ff irq 19 at device 29.7 on pci0 usbus7: EHCI version 1.0 usbus7 on ehci1 pcib6: <ACPI PCI-PCI bridge> at device 30.0 on pci0 pci21: <ACPI PCI bus> on pcib6 cbb0: <RF5C476 PCI-CardBus Bridge> mem 0xf4800000-0xf4800fff irq 16 at device 0.0 on pci21 cardbus0: <CardBus bus> on cbb0 pccard0: <16-bit PCCard bus> on cbb0 pci21: <serial bus, FireWire> at device 0.1 (no driver attached) isab0: <PCI-ISA bridge> at device 31.0 on pci0 isa0: <ISA bus> on isab0 ahci0: <Intel ICH9M AHCI SATA controller> port 0x1c48-0x1c4f,0x183c-0x183f,0x1c40-0x1c47,0x1838-0x183b,0x1c20-0x1c3f mem 0xfc326000-0xfc3267ff irq 16 at device 31.2 on pci0 ahci0: AHCI v1.20 with 4 3Gbps ports, Port Multiplier not supported ahcich0: <AHCI channel> at channel 0 on ahci0 ahcich1: <AHCI channel> at channel 1 on ahci0 pci0: <serial bus, SMBus> at device 31.3 (no driver attached) acpi_tz0: <Thermal Zone> on acpi0 acpi_tz1: <Thermal Zone> on acpi0 atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0 atkbd0: <AT Keyboard> irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: <PS/2 Mouse> irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model Generic PS/2 mouse, device ID 0 battery0: <ACPI Control Method Battery> on acpi0 acpi_acad0: <AC Adapter> on acpi0 acpi_ibm0: <IBM ThinkPad ACPI Extras> on acpi0 orm0: <ISA Option ROMs> at iomem 0xc0000-0xcffff,0xde000-0xdf7ff,0xe0000-0xeffff on isa0 sc0: <System console> at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 est0: <Enhanced SpeedStep Frequency Control> on cpu0 p4tcc0: <CPU Frequency Thermal Control> on cpu0 est1: <Enhanced SpeedStep Frequency Control> on cpu1 p4tcc1: <CPU Frequency Thermal Control> on cpu1 Timecounters tick every 1.000 msec random: unblocking device. usbus0: 12Mbps Full Speed USB v1.0 usbus1: 12Mbps Full Speed USB v1.0 usbus2: 12Mbps Full Speed USB v1.0 usbus3: 480Mbps High Speed USB v2.0 usbus4: 12Mbps Full Speed USB v1.0 usbus5: 12Mbps Full Speed USB v1.0 usbus6: 12Mbps Full Speed USB v1.0 usbus7: 480Mbps High Speed USB v2.0 ugen2.1: <Intel> at usbus2 uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2 ugen1.1: <Intel> at usbus1 uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1 ugen0.1: <Intel> at usbus0 uhub2: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0 ugen6.1: <Intel> at usbus6 uhub3: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus6 ugen5.1: <Intel> at usbus5 uhub4: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus5 ugen4.1: <Intel> at usbus4 uhub5: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus4 ugen3.1: <Intel> at usbus3 uhub6: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus3 ugen7.1: <Intel> at usbus7 uhub7: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus7 ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: <ST9160827AS 3.CMG> ATA-8 SATA 1.x device ada0: Serial Number 5RG8F36M ada0: 150.000MB/s transfers (SATA 1.x, UDMA5, PIO 8192bytes) ada0: Command Queueing enabled ada0: 152627MB (312581808 512 byte sectors: 16H 63S/T 16383C) ada0: Previously was known as ad4 Netvsc initializing... SMP: AP CPU #1 Launched! uhub1: 2 ports with 2 removable, self powered uhub0: 2 ports with 2 removable, self powered uhub2: 2 ports with 2 removable, self powered uhub5: 2 ports with 2 removable, self powered uhub4: 2 ports with 2 removable, self powered uhub3: 2 ports with 2 removable, self powered uhub6: 6 ports with 6 removable, self powered uhub7: 6 ports with 6 removable, self powered cd0 at ahcich1 bus 0 scbus1 target 0 lun 0 cd0: <HL-DT-ST DVDRAM GSA-U20N HX12> Removable CD-ROM SCSI-0 device cd0: Serial Number M1A93IM5248 cd0: 150.000MB/s transfers (SATA 1.x, UDMA6, ATAPI 12bytes, PIO 8192bytes) cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed Root mount waiting for: usbus3 Trying to mount root from ufs:/dev/ada0s4a [rw]... ugen1.2: <vendor 0x08ff> at usbus1 ugen0.2: <vendor 0x04f3> at usbus0 ums0: <vendor 0x04f3 PS2+USB Mouse, class 0/0, rev 1.10/22.90, addr 2> on usbus0 ums0: 3 buttons and [XYZ] coordinates ID=0 ugen1.3: <Lenovo Computer Corp> at usbus1 wlan0: Ethernet address: <mac address wlan> ubt0: <Lenovo Computer Corp ThinkPad Bluetooth with Enhanced Data Rate II, class 224/1, rev 2.00/3.99, addr 3> on usbus1 WARNING: attempt to domain_add(bluetooth) after domainfinalize() WARNING: attempt to domain_add(netgraph) after domainfinalize() hdac0: <Intel 82801I HDA Controller> mem 0xfc320000-0xfc323fff irq 17 at device 27.0 on pci0 hdacc0: <Conexant CX20561 (Hermosa) HDA CODEC> at cad 0 on hdac0 hdaa0: <Conexant CX20561 (Hermosa) Audio Function Group> at nid 1 on hdacc0 pcm0: <Conexant CX20561 (Hermosa) (Front Analog)> at nid 22 and 24 on hdaa0 pcm1: <Conexant CX20561 (Hermosa) (Internal Analog)> at nid 26 and 29 on hdaa0 hdacc1: <Conexant (0x2c06) HDA CODEC> at cad 1 on hdac0
General System Settings
It is a good choice to create a custom kernel. First it is needed for suspend/resume and it reduces the startup time significant. Here is a possible configuration for a custom kernel:
# cat T400
# # T400 -- kernel configuration file for FreeBSD/amd64 on Thinkpad T400 # # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the # FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the # latest information. # # An exhaustive list of options and more detailed explanations of the # device lines is also present in the ../../conf/NOTES and NOTES files. # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # # $FreeBSD: release/10.0.0/sys/amd64/conf/GENERIC 256329 2013-10-11 19:43:37Z gjb $ cpu HAMMER ident T400 makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WITH_CTF=1 # Run ctfconvert(1) for DTrace support options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS options MD_ROOT # MD is a potential root device options NFSCL # New Network Filesystem Client options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_RAID # Soft RAID functionality. options GEOM_LABEL # Provides labelization options COMPAT_FREEBSD32 # Compatible with i386 binaries options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options COMPAT_FREEBSD6 # Compatible with FreeBSD6 options COMPAT_FREEBSD7 # Compatible with FreeBSD7 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options CAPABILITY_MODE # Capsicum capability mode options CAPABILITIES # Capsicum capabilities options PROCDESC # Support for process descriptors options MAC # TrustedBSD MAC Framework options KDTRACE_FRAME # Ensure frames are compiled in options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging support. Always need this: options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel # CPU frequency control device cpufreq # Bus support. device acpi device pci # Floppy drives device fdc # ATA controllers device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers options ATA_STATIC_ID # Static device numbering device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers options AHC_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~128k to driver. options AHD_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~215k to driver. device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. # ATA/SCSI peripherals device scbus # SCSI bus (required for ATA/SCSI) device ch # SCSI media changers device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD device pass # Passthrough device (direct ATA/SCSI access) device ses # Enclosure Services (SES and SAF-TE) #device ctl # CAM Target Layer # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller device atkbd # AT keyboard device psm # PS/2 mouse device kbdmux # keyboard multiplexer device vga # VGA video card driver device splash # Splash screen and screen saver support # syscons is the default console driver, resembling an SCO console device sc options SC_PIXEL_MODE # add support for the raster text mode device agp # support several AGP chipsets # PCCARD (PCMCIA) support # PCMCIA and cardbus bridge support device cbb # cardbus (yenta) bridge device pccard # PC Card (16-bit) bus device cardbus # CardBus (32-bit) bus # PCI Ethernet NICs. device em # Intel PRO/1000 Gigabit Ethernet Family # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support # Wireless NIC cards device wlan # 802.11 support options IEEE80211_DEBUG # enable debug msgs options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's options IEEE80211_SUPPORT_MESH # enable 802.11s draft support device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm device iwn # Intel 4965/1000/5000/6000 wireless NICs. # Pseudo devices. device loop # Network loopback device random # Entropy device device padlock_rng # VIA Padlock RNG device rdrand_rng # Intel Bull Mountain RNG device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. device md # Memory "disks" device gif # IPv6 and IPv4 tunneling device faith # IPv6-to-IPv4 relaying (translation) device firmware # firmware assist module # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter # USB support (wird per Modul geladen) options USB_DEBUG # enable debug msgs # Sound support (wird per Modul geladen) # MMC/SD device mmc # MMC/SD bus device mmcsd # MMC/SD memory card device sdhci # Generic PCI SD Host Controller # VirtIO support device virtio # Generic VirtIO bus (required) device virtio_pci # VirtIO PCI device device vtnet # VirtIO Ethernet device device virtio_blk # VirtIO Block device device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device # HyperV drivers device hyperv # HyperV drivers # Xen HVM Guest Optimizations # NOTE: XENHVM depends on xenpci. They must be added or removed together. options XENHVM # Xen HVM kernel infrastructure device xenpci # Xen HVM Hypervisor services driver # VMware support device vmx # VMware VMXNET3 Ethernet
Certainly more improvements could be done but this one is ok. Store the configuration in /usr/src/sys/amd64/conf for example in T400 and use the follwong commands to generate the new kernel:
# cd /usr/src # make buildkernel KERNCONF=T400 # make installkernel KERNCONF=T400 # reboot
Video
Because the new concole drivers are currently under development the standard concole drivers sc are used. They are in
sc0: <System console> at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300>
agp0: <Intel GM45 SVGA controller> on vgapci0 agp0: aperture size is 256M, detected 32764k stolen memory drm0: <Mobile Intel® GM45 Express Chipset> on vgapci0 info: [drm] MSI enabled 1 message(s) info: [drm] AGP at 0xd0000000 256MB info: [drm] Initialized i915 1.6.0 20080730
ACPI
To enable ACPI goodies of the Thinkpad (Advanced Configuration and Power Interface - not to confuse with APIC Advanced Programmable Interrupt Controller!) put the following line in /boot/loader.conf:
# ACPI-Modul fuer Thinkpad laden acpi_ibm_load="YES"
This results in the boot message:
acpi_ibm0: <IBM ThinkPad ACPI Extras> on acpi0
Sleeping and Awaking: suspend/resume
This is the most tricky, difficult and sometimes frustrating part of the post setup of FreeBSD 10.
In the most cases the notebook has to be powered down for cold restart and the file system is therefore in an inconsistent state which needs fsck-ed.
But if this is done too often could eventually become defect# cat /etc/fstab
# Device Mountpoint FStype Options Dump Pass# /dev/ada0s1a / ufs ro 1 1 /dev/ada0s1e /home ufs ro 1 1
If you want to do some configuration then type
# mount -o rw /
and all the editied configuration filescan be saved.
Patches for USB
In some cases the USB prts do not wake up during the resume process. For this bug exists a patch which is described on the mailing list in this thread: [patch USB after second suspend/resume on ThinkPads]. Copy and paste the patch code in your favorite editor and store the file for example in /tmp. Then change to the directoy where the code of the module acpi_ibm resides and run the patch:
# cd /usr/src/sys/dev/acpi_support/
# patch acpi_ibm.c <path to patchfile>
After this rebuild and reinstall the kernel as described above.
Konfiguration: /boot/loader.conf
The whole USB stuff has to be loaded as modules. Therefore all this stuff is put in /boot/loader.conf:
# USB usb_load="YES" ehci_load="YES" uhci_load="YES" ums_load="YES" u3g_load="YES" umass_load="YES" ukbd_load="YES"
Konfiguration: /etc/rc.local
The most notebook harddisks have a biuld in powermanagement. This must be turned off because otherwise the Load Cycle Count increases dramatically and this results in an early exitus of the device.
/sbin/camcontrol cmd ada0 -a "EF 85 00 00 00 00 00 00 00 00 00 00"
Konfiguration: /etc/rc.suspend
With this file all the USB stuff is unloaded and the wifi operation is terminated:
/usr/sbin/wpa_cli terminate /etc/rc.d/moused stop # If a device driver has problems suspending, try unloading it before # suspend and reloading it on resume. Example: # kldunload usb kldunload ehci kldunload uhci kldunload umass kldunload u3g kldunload usb /usr/bin/logger -t $subsystem suspend at `/bin/date +'%Y%m%d %H:%M:%S'` /bin/sync && /bin/sync && /bin/sync /bin/sleep 3
/bin/rm -f /var/run/rc.suspend.pidOtherwise a kernel panic could be the result
Konfiguration: /etc/rc.resume
In resume mode all the USB stuff is loaded again and the wifi operation is started again:
kldload ehci kldload uhci kldload umass kldload u3g kldload usb /etc/rc.d/moused restart /usr/sbin/wpa_cli reassociate /usr/sbin/camcontrol cmd ada0 -a "EF 85 00 00 00 00 00 00 00 00 00 00" /usr/bin/logger -t $subsystem resumed at `/bin/date +'%Y%m%d %H:%M:%S'`
/bin/sync && /bin/sync && /bin/sync exit 0Otherwise they have no effect
Konfiguration: /etc/sysctl.conf
In /etc/sysctl.conf some fine tuning has to be done to get suspend/resume working properly:
hw.acpi.reset_video=0 hw.acpi.lid_switch_state=S3 hw.acpi.sleep_button_state=S3 hw.acpi.power_button_state=S5 hw.acpi.sleep_delay=3 hw.acpi.verbose=1 hw.syscons.sc_no_suspend_vtswitch=0 dev.acpi_ibm.0.events=1
Graphics device
Generally you have to remove the option VESA from the kernel configuration.
- Intel GM45: It is important in resume operation that the kernel restores the registers of the Intel graphics chip and not of the VESA graphics board.
The DRM drivers are loaded via /boot/loader.conf:
i915_load="YES"
- ATi Radeon RV620
TODO
|
ATi Radeon RV620
|
CPU controlling
To enable frequency control the kernel module cpufreq.ko must be loaded, four lines added to /etc/rc.conf, and the computer rebooted:
- /boot/loader.conf
- Add this line to load the module cpufreq.ko on each boot, allowing the CPU frequency to be modified:
cpufreq_load="YES"
- /etc/rc.conf
- Add these four lines to enable automatic control of the CPU frequency:
powerd_enable="YES" powerd_flags="-a adaptive -b adaptive -n adaptive" performance_cx_lowest="C3" economy_cx_lowest="C3"
This enables the automatic control of frequency parameters of the CPU. By default, the computer runs in a state called C1. During periods of low activity, it is possible to shut down parts of the processor, including clocks, and disconnect from the system bus. In the C2 state, the CPU shuts down clocks. In the C3 state, additional power can be saved by disconnecting from the system bus and shutting down the CPU for a short time. This can provide significant power savings without any real cost. Using the paramters performance_cx_lowest
and economy_cx_lowest
, it is possible to tell powerd
the maximum state to put the CPU into. When allowing powerd
to use C3, it can be beneficial to add a line like the one below to /boot/loader.conf:
kern.hz=100
This modifies the interrupt rate of the kernel. By default it is 1000 interrupts per second. With a very slight increase (9ms!) in time between interrupts, it is possible to maximize the benefit from using C3. This might make the computer slightly less responsive, but with significant power gains.
Mouse
psm0: <PS/2 Mouse> irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model Generic PS/2 mouse, device ID 0
Network
LAN
em0: <Intel(R) PRO/1000 Network Connection 7.3.8> port 0x1840-0x185f mem 0xfc100000-0xfc11ffff,0xfc325000-0xfc325fff irq 20 at device 25.0 on pci0 em0: Using an MSI interrupt em0: Ethernet address: <mac address lan>
Wifi
iwn0: <Intel Ultimate N WiFi Link 5300> mem 0xf4300000-0xf4301fff irq 17 at device 0.0 on pci3 wlan0: Ethernet address: <mac address wlan>
Bluetooth
TODO
|
Bluetooth
|
Sound
For the access to the sound devices a module must be loaded. Put the follwong line in /boot/loader.conf:
sound_enable="YES" snd_hda_load="YES"
The boot messages should show the followg lines:
hdac0: <Intel 82801I HDA Controller> mem 0xfc320000-0xfc323fff irq 17 at device 27.0 on pci0 hdacc0: <Conexant CX20561 (Hermosa) HDA CODEC> at cad 0 on hdac0 hdaa0: <Conexant CX20561 (Hermosa) Audio Function Group> at nid 1 on hdacc0 pcm0: <Conexant CX20561 (Hermosa) (Front Analog)> at nid 22 and 24 on hdaa0 pcm1: <Conexant CX20561 (Hermosa) (Internal Analog)> at nid 26 and 29 on hdaa0 hdacc1: <Conexant (0x2c06) HDA CODEC> at cad 1 on hdac0
It is also possible to check if the sound devices are identified:
# cat /dev/sndstat
A possible result is
Installed devices: pcm0: <Conexant CX20561 (Hermosa) (Front Analog)> (play/rec) default pcm1: <Conexant CX20561 (Hermosa) (Internal Analog)> (play/rec)
For using the internal speakers of the Thinkpad the following line should be added to /etc/sysctl.conf:
hw.snd.default_unit=1
This sets the second pcm channel to default so all audio signals can be heard.
MATE Desktop
Applications
Applets
Additional Hardware
Tips and Tricks
In this section some tips and tricks are described.
Thinkpad buttons
TODO
|
Thinkpad buttons
|
Special thanks
A special thanks to Yamagi of BSDForen.de for essential hints for the configuration of suspend/resume. Also thanks to the author of the patch described above.
References
The following man pages are important for understanding:
- devd(8), devd.conf(5)
- xorg.conf(5)
- sysctl(8), sysctl.conf(5)
- rc.conf(5)
- acpiconf(8)
- kldload(8), loader.conf(5)
- device.hints(5)
- aic(4)
- moused(8), sysmouse(4), ums(4)
- wpa_supplicant(8), wpa_supplicant.conf(5)
- est (no manpage), p4tcc (no manpage)
External links
- The FreeBSD Homepage
- The excellent FreeBSD manual: FreeBSD Handbook
- German forums: UNIXForen.de and BSDForen.de