FreeBSD auf Lenevo Thinkpad R500

Yamagi

Possessed With Psi Powers
Teammitglied
Hallo,
es gab in der letzten Zeit immer wieder Fragen, wie man ein Notebook unter FreeBSD konfiguriert. Diese Konfiguration hier bezieht sich auf FreeBSD 8.1-RC2. Mit ihr funktioniert das Notebook vollständig, lediglich der Fingerabdrucksensor wird nicht unterstützt. Suspend / Resume wird unterstützt, ebenso das Powermanagement.

1. Ich nutze seit langem Kernel, die alles was irgendwie geht als Modul laden. Es macht die Administration wesentlich einfacher, gerade Treiberaktualisierungen ohne Ausfallzeiten. Es wäre schön, wenn GENERIC entsprechend umgebaut werden würde, aber das passiert wohl nie. Wer das nicht will muss nur dafür sorgen, dass die in rc.suspend entladenen Treiber als Modul vorliegen. Hier die Konfiguration:
Code:
# Allgemein -- CPU
machine         amd64
cpu                     HAMMER
ident           SCREW
options         SMP

# Allgemein -- Options
options     SCHED_ULE
options     INET
options     INET6
options         IPSEC
options         SCTP
options     KBD_INSTALL_CDEV
options     PREEMPTION
options         KTRACE
options         AUDIT
options         PRINTF_BUFR_SIZE=128
options         FLOWTABLE
options         MAC

# Allgemein -- Debug
options     STACK
options         HWPMC_HOOKS     

# Allgemein -- Dateisysteme

# UFS2
options         SOFTUPDATES
options         UFS_ACL
options         UFS_DIRHASH
options     UFS_GJOURNAL
options     UFS_EXTATTR
options     UFS_EXTATTR_AUTOSTART
options         QUOTA

# Allgemein -- Kompatiblit<E4>t
options         COMPAT_FREEBSD4
options     COMPAT_FREEBSD5
options         COMPAT_FREEBSD6
options         COMPAT_FREEBSD7
options         COMPAT_43TTY
options         COMPAT_FREEBSD32
options     _KPOSIX_PRIORITY_SCHEDULING
options     SYSVSHM 
options     SYSVMSG
options     SYSVSEM
options         P1003_1B_SEMAPHORES     

# Hardware -- GraKa
device          vga
device          splash

# Hardware -- Console
device          sc
options         SC_PIXEL_MODE

# Hardware -- Netzwerk
device          loop
device          ether
device      bpf

# Hardware -- Pseudodevices
device          pty

# Hardware -- Keyboard
device          atkbdc
device          atkbd
device          psm

# Hardware -- Controller
device      isa
device          eisa
device          pci
device          acpi

# ALTQ
options     ALTQ
options     ALTQ_CBQ
options     ALTQ_RED
options     ALTQ_RIO
options     ALTQ_HFSC
options     ALTQ_CDNR
options     ALTQ_PRIQ
options     ALTQ_NOPCC

# Crypto fuer IPSEC
device          crypto

# Kein reboot bei strg-alt-entf
options         SC_DISABLE_REBOOT

Nun brauchen wir natürlich eine entsprechende loader.conf. Diese enthält neben diversen Treibern vor allem die Powermanagementeinstellungen:

Code:
# Loader
# ------
autoboot_delay="3"

# System
# ------

# Kein Strom fuer Geraete ohne Treiber
hw.pci.do_power_nodriver=3

# Kein Throtteling (braucht Strom und blockiert C2)
hint.acpi_throttle.0.disabled=1

# p4tcc ist ein Intel-Relikt aus Netburstzeiten
hint.p4tcc.0.disabled=1
hint.p4tcc.1.disabled=1

# APIC Timers blockieren C3
hint.apic.0.clock=0

# Keine dedizierte Realtime-Clock. Spart 128 Interrupts
# pro Sekunde, hat hier aber kaum Auswirkungen. Dafür
# Nebenwirkungen:
# - Tendenziell springende Uhr, die sehr seltsame
#   Effekte hat. U.a. blockiertes PAM.
# - Blockierende Maus
# - 100% CPU Last kann das System blockieren
#hint.atrtc.0.clock=0

# 100 Ticks reichen aus und sind stromsparender als 1000
kern.hz=100

# Unhoerbar schlechtere Tonqualitaet und leichte Latenz, aber weniger Strom
hint.pcm.0.buffersize=65536
hint.pcm.1.buffersize=65536
hw.snd.feeder_buffersize=65536
hw.snd.latency=7

# Agressives Powermanagement fuer SATA
hint.ahcich.0.pm_level=5
hint.ahcich.1.pm_level=5

# Soundkarte
hint.hdac.0.cad0.nid22.config="as=1 seq=15 device=Headphones"
hint.hdac.0.cad0.nid26.config="as=1 seq=0 device=Line-Out"

# Equalizer
hint.pcm.0.eq=1

# Treiber
# -------

# ACPI
acpi_load="YES"
acpi_ibm_load="YES"

# Partitionstypen
geom_part_bsd_load="YES"
geom_part_mbr_load="YES"
geom_part_gpt_load="YES"

# Label
geom_label_load="YES"

# GELI
geom_eli_load="YES"

# Random
random_load="YES"

# Zlib
zlib_load="YES"

# ATA
ahci_load="YES"

# X11 Kram
mem_load="YES"
io_load="YES"

# SCSI
cam_load="YES"
atapicam_load="YES"

# Firewire
firewire_load="YES"

# NFS
nfsclient_load="YES"
nfs_common_load="YES"

# Netzwerk
miibus_load="YES"
if_bge_load="YES"

# SMBus
smbus_load="YES"
ichsmb_load="YES"

# CPUFreq
cpufreq_load="YES"

# Sound
sound_load="YES"
snd_hda_load="YES"

# CPU-Device
cpuctl_load="YES"

# USB
usb_load="YES"
ehci_load="YES"
uhci_load="YES"
ums_load="YES"
umass_load="YES"
ukbd_load="YES"

# Linux
linux_load="YES"

# Keyboard
kbdmux_load="YES"

# Bruecke
if_bridge_load="YES"
bridgestp_load="YES"

# Tap
if_tap_load="YES"

# Temperatursensoren
coretemp_load="YES"

# Tun
if_tun_load="YES"

# Wlan
wlan_load="YES"
wlan_tkip_load="YES"
wlan_amrr_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"

# Intel WLAN
if_iwn_load="YES"

# DRM
agp_load="YES"
drm_load="YES"
i915_load="YES"

# ProcFS
pseudofs_load="YES"
procfs_load="YES"

# UFS
ufs_load="YES"

# Kernel RPC
krpc_load="YES"

# VirtualBox
vboxdrv_load="YES"

# FUSE
fuse_load="YES"

# MSDOSFS
msdosfs_load="YES"
msdosfs_iconv_load="YES"

# CD9660
cd9660_load="YES"
cd9660_iconv_load="YES"

# Mono
mono_load="YES"

# Cardbus
cbb_load="YES"
exca_load="YES"

# VESA
vesa_load="YES"
dpms_load="YES"

# Kartenleser
sdhci_load="YES"

# Watchdog
ichwd_load="YES"

# Netgraph
netgraph_load="YES"

# Bluetooth
ng_ubt_load="YES"
ng_hci_load="YES"
ng_bluetooth_load="YES"

# CUSE
cuse4bsd_load="YES"

Dann haben wir da noch die rc.conf. Eigentliche keine Besonderheiten, nur C3 muss hier aktiviert werden.
Code:
# Netzwerk
# --------
hostname="maka.home.yamagi.org"
ifconfig_bge0="DHCP"
wlans_iwn0="wlan0"
ifconfig_wlan0="WPA DHCP"
ipv6_enable="NO"
background_dhclient="YES"
synchronous_dhclient="NO"

# NTP
# ---
ntpd_sync_on_start="YES"
ntpd_enable="NO"

# Console
# -------
font8x14="iso15-8x14"
font8x16="iso15-8x16"
font8x8="iso15-8x8"
keymap="german.iso"
keyrate="normal"
scrnmap="NO"
keybell="visual"
keyboard="/dev/kbdmux0"
allscreens_flags="MODE_366"

# Linux
# -----
linux_enable="YES"

# NFS
# ---
nfs_client_enable="YES"
nfs_server_enable="YES"

# SSH
# ---
sshd_enable="YES"

# Powerd
# ------
powerd_enable="YES"
powerd_flags="-a hadp -b adp"

# Powermanagement
# ---------------
performance_cx_lowest="C3"
economy_cx_lowest="C3"

# Dump
# ----
dumpdev="/dev/ada0s1b"
dumpdir="/usr/dump"

# Temp löschen
# ------------
clear_tmp_enable="YES"

# Devfs
# -----
devfs_system_ruleset="yamagi"

# MusicPD
# -------
musicpd_enable="YES"

# Sendmail
# --------
sendmail_enable="NO"

# Drucker
# -------
lpd_enable="YES"

# Microcode Updates
# -----------------
microcode_update_enable="YES"

# Quotas
# ------
enable_quotas="YES"
check_quotas="NO"
 
# Geli
# ----
geli_devices="ada0s1g"
geli_ada0s1g_flags="-k /boot/geli/home.key"

# VirtualBox
# ----------
vboxnet_enable="YES"

# moused
# ------
moused_enable="YES"
moused_type="auto"
moused_flags="-3 -V -U 2 -L 5"

# Kein fsck
# ---------
background_fsck_delay="-1"

Der Vollständigkeit halber noch die xorg.conf:
Code:
# X.org Konfiguration für X11R7.6
# ===============================

# Layouts
# -------
Section "ServerLayout"
	Identifier     "dualscreen"
	Screen         "Screen0"
	InputDevice    "Keyboard0" "CoreKeyboard"
	InputDevice    "Mouse0"    "CorePointer"
EndSection

# ============

# Servererweiterungen
# -------------------
Section "Extensions"
	Option "XVideo" "Disable"
EndSection

# ============

# Dateien, die X nutzen soll
# --------------------------
Section "Files"
EndSection

# ============

# Serverkonfiguration
# -------------------
Section "ServerFlags"
	Option "AllowEmptyInput" "false"
	Option "OffTime"  "20" 
	Option "DontZap" "off"
EndSection

# ============

# Module und Erweiterungen des Servers
# ------------------------------------
Section "Module"
EndSection

# ============

# Die Maus
# --------
Section "InputDevice"
	Identifier  "Mouse0"
	Driver		"mouse"
	Option		"Protocol" "SysMouse"
	Option		"Device" "/dev/sysmouse"
EndSection

# ============

# Die Tastatur
# ------------
Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option	    "XkbModel" "pc105"
	Option	    "XkbLayout" "de"
    Option      "XkbVariant" "nodeadkeys"
	Option      "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

# ============

# Monitore
# --------
Section "Monitor"
	Identifier   "Monitor0"
	Option       "DPMS"
EndSection

# ============

# Grafikkarten
# ------------
Section "Device"
	Identifier  "Card0"
	Driver      "intel"
	Option	    "DRI" "true"
EndSection

# ============

# Screens
# -------
Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	DefaultDepth     24
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Modes "1680x1050"
		Virtual 1680 1050
	EndSubSection
EndSection

----

Nun die eigentliche Magie. Beginnen wir mit /etc/rc.local. Hier muss ich neben einem dreckigen Hack für webcamd (das rc-Script will nicht, der Bug ist gemeldet) vor allem das Powermanagement der Platte abschalten. Sonst erzeigt sie ca. 50 Load Cycles pro Minute und wäre in wenigen Wochen Schrott:
Code:
#!/bin/sh

# Dies ist ein Hack
/usr/local/sbin/webcamd &
#/bin/sleep 2
#/bin/chmod 0660 /dev/video0

# Und weil es so schoen ist noch das Powermanagement
# der Platte abschalten. Sonst fliegt uns Load_Cycle-Count
# durch die Decke, da er staendig den Kopf parkt und die Platte
# ist nach einigen Monaten im Arsch
/sbin/camcontrol cmd ada0 -a "EF 85 00 00 00 00 00 00 00 00 00 00"

So, dann habe ich meine devfs.rules, auch hier nichts besonderes:
Code:
[yamagi=1]
add path cd0 mode 0660
add path pass1 mode 0660
add path xpt0 mode 0660
add path tap* mode 0660
add path da* mode 0660
add path video* mode 0666

Interessanter ist die devd.conf, da hier viel Magie zusammenläuft. So werden beim Ausstecken des Netzwerkkabels die IP-Adressen entzogen und die IBM-Tasten werden an ein Script übergeben:
Code:
options {
	directory "/etc/devd";
	directory "/usr/local/etc/devd";
	pid-file "/var/run/devd.pid";
};

notify 0 {
	match "system"		"IFNET";
	match "type"		"LINK_UP";
	media-type		"ethernet";
	action "/etc/rc.d/dhclient quietstart $subsystem";
};
 
notify 0 {
	match "system"		"IFNET";
	match "type"		"LINK_DOWN";
	media-type		"ethernet";
	action "/etc/rc.d/dhclient quietstop $subsystem ; ifconfig $subsystem inet 0.0.0.0";
};
 
notify 0 {
	match "system"		"IFNET";
	match "type"		"LINK_UP";
	media-type		"802.11";
	action "/etc/rc.d/dhclient quietstart $subsystem";
};
 
notify 0 {
	match "system"		"IFNET";
	match "type"		"LINK_DOWN";
	media-type		"802.11";
	action "/etc/rc.d/dhclient quietstop $subsystem ; ifconfig $subsystem inet 0.0.0.0";
};
 

attach 100 {
	device-name "ubt[0-9]+";
	action "/etc/rc.d/bluetooth quietstart $device-name";
};

detach 100 {
	device-name "ubt[0-9]+";
	action "/etc/rc.d/bluetooth quietstop $device-name";
};

attach 100 {
	device-name "ukbd0";
	action "/etc/rc.d/syscons setkeyboard /dev/ukbd0";
};

detach 100 {
	device-name "ukbd0";
	action "/etc/rc.d/syscons setkeyboard /dev/kbd0";
};

attach 100 {
    device-name "ums[0-9]+";
    action "/etc/rc.d/moused quietstart $device-name";
};

detach 100 {
     device-name "ums[0-9]+";
     action "/etc/rc.d/moused stop $device-name";
};

notify 10 {
	match "system"		"ACPI";
	match "subsystem"	"ACAD";
	action "/etc/rc.d/power_profile $notify";
};

notify 10 {
	match "system"		"ACPI";
	match "subsystem"	"Thermal";
	match "notify"		"0xcc";
	action "logger -p kern.emerg 'WARNING: system temperature too high, shutting down soon!'";
};


notify 10 {
	match "system"		"ACPI";
	match "subsystem"	"Suspend";
	action "/etc/rc.suspend acpi $notify";
};
notify 10 {
	match "system"		"ACPI";
	match "subsystem"	"Resume";
	action "/etc/rc.resume acpi $notify";
};

notify 10 {
     match "system"          "ACPI";
     match "subsystem"       "IBM";
     action "/etc/acpi/acpi_oem_exec.sh $notify ibm";
};

Tjoa, das Script für die Tasten ist dann:
Code:
#!/bin/sh
#
if [ "$1" = "" -o "$2" = "" ]
then
	echo "usage: $0 notify oem_name"
	exit 1
fi

NOTIFY=`echo $1`
OEM=$2
LOGGER="logger"

case ${NOTIFY} in

	# WLAN an / aus
	0x05)
	if [ -e /var/run/wpa_supplicant/wlan0 ]
	then
		/usr/sbin/wpa_cli terminate
		/bin/sleep 2
		/sbin/ifconfig wlan0 destroy
		MESSAGE="WLAN deactivated"
	else
		/sbin/ifconfig wlan0 create wlandev iwn0
		/bin/sleep 2
		/usr/sbin/wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B 
		MESSAGE="WLAN activated"
	fi
	;;
	
	# Standby
	0x04)
	MESSAGE="Standby"
	/bin/sync
	/bin/sync
	/bin/sync
	/usr/sbin/zzz
	;;
	
	#Bluetooth an / aus 
	0x08)
	LEVEL=`sysctl -n dev.acpi_${OEM}.0.bluetooth`
	if [ "$LEVEL" = "1" ]
	then
		sysctl dev.acpi_${OEM}.0.bluetooth=0
		MESSAGE="bluetooth disabled"
	else
		sysctl dev.acpi_${OEM}.0.bluetooth=1
		MESSAGE="bluetooth enabled"
	fi
	;;

	# CD Eject
	0x09)
	MESSAGE="Ejecting CD"
	/sbin/camcontrol eject cd0
	;;

	# Sync Disks
	0x0c)
	MESSAGE="Syncing disks"
	/bin/sync

esac

${LOGGER} ${MESSAGE}

exit 0

Dann rc.suspend. Sieht einfach aus, war aber nicht ganz einfach es auszufummeln, was man nun genau entladen muss:
Code:
  if [ $# -ne 2 ]; then
	echo "Usage: $0 [apm|acpi] [standby,suspend|1-4]"
	exit 1
fi

subsystem=$1
state=$2

if [ -r /var/run/rc.suspend.pid ]; then
	exit 1
fi

echo $$ 2> /dev/null > /var/run/rc.suspend.pid

# WPA
/usr/sbin/wpa_cli terminate

# Kill webcamd
pkill webcamd

# Shutdown moused
/etc/rc.d/moused stop

# If a device driver has problems suspending, try unloading it before
# suspend and reloading it on resume.  Example:
kldunload firewire
kldunload ehci
kldunload uhci
kldunload usb
kldunload if_iwn

logger -t $subsystem suspend at `date +'%Y%m%d %H:%M:%S'`
sync && sync && sync
sleep 2
sync && sync && sync

rm -f /var/run/rc.suspend.pid
if [ $subsystem = "apm" ]; then
	/usr/sbin/zzz
else
	# Notify the kernel to continue the suspend process
	/usr/sbin/acpiconf -k 0
fi

exit 0

Und rc.resume zum Fortsetzen des Systems:
Code:
   if [ $# -ne 2 ]; then
	echo "Usage: $0 [apm|acpi] [standby,suspend|1-4]"
	exit 1
fi

subsystem=$1
state=$2

if [ -r /var/run/rc.suspend.pid ]; then
	kill -9 `cat /var/run/rc.suspend.pid`
	rm -f /var/run/rc.suspend.pid
	echo 'rc.resume: killed rc.suspend that was still around'
fi

# Start moused
/etc/rc.d/moused start

# If a device driver has problems resuming, try unloading it before
# suspend and reloading it on resume.  Example:
kldload firewire
kldload usb
kldload uhci
kldload ehci
kldload if_iwn

# wpa_supplicant(8) doesn't seem to reassociate during resume.  Uncomment
# the following to signal it to reassociate.
/usr/sbin/wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B

# Our legendary webcam-hack
/bin/sleep 5
/usr/local/sbin/webcamd &

logger -t $subsystem resumed at `date +'%Y%m%d %H:%M:%S'`
sync && sync && sync

exit 0

Dann zum Abschluss noch meine sysctl.conf. Neben diversem Standardkram schalte ich dort vor allem die IBM-Tasten ein und setzte den uralten i8254 Timecounter, da dieser anders als ACPI-fast ein sicheres Suspend / Resume ermöglicht. ACPI-fast crasht das System ab und an, HPET lässt die Grafikkarte krepieren.
Code:
# Die Prozesse anderer Nutzer nicht sehen
security.bsd.see_other_uids=0

# Zufaellige IP-Paketnumemrn
net.inet.ip.random_id=1

# SHM darf wieder entfernt werden
kern.ipc.shm_allow_removed=1

# Maximale Anzahl virtueller Soundkanaele
hw.snd.maxautovchans=16

# Sound unterm Linuxulator
hw.snd.compat_linux_mmap=1

# User duerfen Tap oeffnen
net.link.tap.user_open=1 

# .core bitte nach /tmp
kern.corefile=/tmp/%N.core

# Nur Root darf den Messagebuffer lesen
security.bsd.unprivileged_read_msgbuf=0

# Mehr Platz fuer Dirhashs
vfs.ufs.dirhash_maxmem=134217728

# User duerfen mounten
vfs.usermount=1

# 32 Bloecke vorauslesen
vfs.read_max=32

# Standby wenn zugeklappt
hw.acpi.lid_switch_state=S3

# Sound lauter
dev.acpi_ibm.0.mute=0
hw.snd.vpc_0db=5

# Thinkpad-Keys
dev.acpi_ibm.0.events=1

# Anderer Timecounter
kern.timecounter.hardware=i8254

Mit dieser Konfiguration läuft das Thinkpad genauso lange aus dem Akku wie unter Windows 7 und Linux. Das Ganze mag noch nicht perfekt sein und in Teilen ein wenig zusammengehackt, aber dennoch inzwischen recht okay. Ich hoffe, dass der Kram jemanden hilft.
 
Zuletzt bearbeitet:
Hallo Yamagi,

besten Dank! Das hilft (mir) auf jeden Fall.
Es ist für mich ein guter Ansatz für mein X61, was seit gestern mit FreeBSD 8.1 noch RC1 läuft...

Vor allem läuft jetzt hier mein WLAN (AGN 4965) stabil. Das war mit der 8.0 noch nicht der Fall. Hald zickte etwas rum, aber jetzt rennt es und ich kann ACPI und Tasten anpassen.
Derzeit legt sich mein X61 noch bei Druck auf die FN-Taste schlafen - echt nervig.

Der Beitrag kommt also genau richtig - und spart mir viele Fragen und noch mehr Suchen :-)


Jörg
 
Moin Yamagi,

Hallo,
es gab in der letzten Zeit immer wieder Fragen, wie man ein Notebook unter FreeBSD konfiguriert. Diese Konfiguration hier bezieht sich auf FreeBSD 8.1-RC2. Mit ihr funktioniert das Notebook vollständig, lediglich der Fingerabdrucksensor wird nicht unterstützt. Suspend / Resume wird unterstützt, ebenso das Powermanagement.

ist der Fingerprintsensor nicht in der von fprint ( http://www.freebsd.org/cgi/ports.cgi?query=fprint&stype=all ) unterstützten Geräte?

JueDan
 
Nein, leider nicht. Ich habe es ausprobiert, fprint findet leider kein Gerät. Und der Upek-Blob funktioniert nicht mehr mit FreeBSD 8. Ist aber nicht so schlimm, ich kann gut drauf verzichten und klassische Passwörter nehmen. Sie sollen angeblich sogar sicherer sein...
 
Ich habe auf freebsd-mobile@ noch einen Patch im Flug, der eine Panic behebt. Wenn man die VESA-Konsole nutzt und einen Suspend durchführt, kann es zu einer Nullpointer-Dereferenz und damit zum Crash kommen: http://lists.freebsd.org/pipermail/freebsd-mobile/2010-July/012021.html Bevor nun aber blind gepatcht wird, würde ich noch auf ein wenig Feedback warten, ob die Lösung wirklich ausreichend ist. Kann aber noch ein paar Tage dauern, in USA ist gerade das Independence Day Wochenende.
 
Der Patch ist nun in -CURRENT:

- r209737: Besagte Nullpointer-Dereferenzierung. Damit läuft die Kombination aus VESA-Konsole und Suspend nun stabil. Ich habe inzwischen ca. 48h Uptime und insgesamt 28 Suspend / Resume Zyklen seit dem letzten Boot. Das ist ein normales 8.1-RC2 mit dem Patch.
 
Ah, genau sowas such ich schon lange :)
jetzt hab ich endlich mal eine gute Handhabe, mein T60 wieder sinnvoll unter BSD zu nutzen, danke für die vielen Tips.. suspend hat bei mir nie richtig funktioniert, wenn das endlich klappen würde, wärs perfekt...
Hat irgendjemand eigentlich einen groben Überblick, was sich von der 60er Generation bis zu besagtem R500 hardwaremäßig alles geändert hat? Damit ich weis, wo ich besonders aufpassen mus...

viele Grüße,
Hermann
 
Okay, noch eine dmesg:
Code:
Copyright (c) 1992-2010 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 8.1-RC2 #0: Wed Jun 30 19:16:52 CEST 2010
    root@maka.home.yamagi.org:/usr/obj/usr/src/sys/MAKA amd64
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Core(TM)2 Duo CPU     T6670  @ 2.20GHz (2194.52-MHz K8-class CPU)
  Origin = "GenuineIntel"  Id = 0x1067a  Family = 6  Model = 17  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=0x408e3bd<SSE3,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE>
  AMD Features=0x20100800<SYSCALL,NX,LM>
  AMD Features2=0x1<LAHF>
  TSC: P-state invariant
real memory  = 2147483648 (2048 MB)
avail memory = 1950572544 (1860 MB)
ACPI APIC Table: <LENOVO TP-7Y   >
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
Cuse4BSD v0.1.11 @ /dev/cuse
kbd1 at kbdmux0
ichwd module loaded
cryptosoft0: <software crypto> on motherboard
acpi0: <LENOVO TP-7Y> on motherboard
CPU0: local APIC error 0x40
acpi0: [ITHREAD]
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, 7bf00000 (3) failed
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
acpi_hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 900
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: detected 32764k stolen memory
agp0: aperture size is 256M
drm0: <Mobile Intel\M-B\M-. GM45 Express Chipset> on vgapci0
info: [drm] MSI enabled 1 message(s)
vgapci0: child drm0 requested pci_enable_busmaster
info: [drm] AGP at 0xd0000000 256MB
info: [drm] Initialized i915 1.6.0 20080730
vgapci1: <VGA-compatible display> mem 0xf4200000-0xf42fffff at device 2.1 on pci0
pci0: <simple comms> at device 3.0 (no driver attached)
uhci0: <Intel 82801I (ICH9) USB controller> port 0x1820-0x183f irq 20 at device 26.0 on pci0
uhci0: [ITHREAD]
usbus0: <Intel 82801I (ICH9) USB controller> on uhci0
uhci1: <Intel 82801I (ICH9) USB controller> port 0x1840-0x185f irq 21 at device 26.1 on pci0
uhci1: [ITHREAD]
usbus1: <Intel 82801I (ICH9) USB controller> on uhci1
uhci2: <Intel 82801I (ICH9) USB controller> port 0x1860-0x187f irq 22 at device 26.2 on pci0
uhci2: [ITHREAD]
usbus2: <Intel 82801I (ICH9) USB controller> on uhci2
ehci0: <Intel 82801I (ICH9) USB 2.0 controller> mem 0xfc204c00-0xfc204fff irq 23 at device 26.7 on pci0
ehci0: [ITHREAD]
usbus3: EHCI version 1.0
usbus3: <Intel 82801I (ICH9) USB 2.0 controller> on ehci0
hdac0: <Intel 82801I High Definition Audio Controller> mem 0xfc000000-0xfc003fff irq 17 at device 27.0 on pci0
hdac0: HDA Driver Revision: 20100226_0142
hdac0: [ITHREAD]
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(R) PRO/Wireless 5100> mem 0xf4300000-0xf4301fff irq 17 at device 0.0 on pci3
iwn0: MIMO 1T2R, MoW, address 00:26:c6:c4:39:9e
iwn0: [ITHREAD]
iwn0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
iwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
iwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
pcib3: <ACPI PCI-PCI bridge> irq 23 at device 28.3 on pci0
pci5: <ACPI PCI bus> on pcib3
pcib4: <ACPI PCI-PCI bridge> irq 20 at device 28.4 on pci0
pci13: <ACPI PCI bus> on pcib4
pcib5: <ACPI PCI-PCI bridge> irq 22 at device 28.5 on pci0
pci4: <ACPI PCI bus> on pcib5
bge0: <Broadcom NetXtreme Gigabit Ethernet Controller  , ASIC rev. 0x00b002> mem 0xf4800000-0xf480ffff irq 17 at device 0.0 on pci4
miibus0: <MII bus> on bge0
brgphy0: <BCM5787 10/100/1000baseTX PHY> PHY 1 on miibus0
brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
bge0: Ethernet address: 00:22:68:1f:4a:36
bge0: [FILTER]
uhci3: <Intel 82801I (ICH9) USB controller> port 0x1880-0x189f irq 16 at device 29.0 on pci0
uhci3: [ITHREAD]
usbus4: <Intel 82801I (ICH9) USB controller> on uhci3
uhci4: <Intel 82801I (ICH9) USB controller> port 0x18a0-0x18bf irq 17 at device 29.1 on pci0
uhci4: [ITHREAD]
usbus5: <Intel 82801I (ICH9) USB controller> on uhci4
uhci5: <Intel 82801I (ICH9) USB controller> port 0x18c0-0x18df irq 18 at device 29.2 on pci0
uhci5: [ITHREAD]
usbus6: <Intel 82801I (ICH9) USB controller> on uhci5
ehci1: <Intel 82801I (ICH9) USB 2.0 controller> mem 0xfc205000-0xfc2053ff irq 19 at device 29.7 on pci0
ehci1: [ITHREAD]
usbus7: EHCI version 1.0
usbus7: <Intel 82801I (ICH9) USB 2.0 controller> 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 0xf4900000-0xf4900fff irq 16 at device 0.0 on pci21
cbb0: [FILTER]
fwohci0: <1394 Open Host Controller Interface> mem 0xf4901000-0xf49017ff irq 17 at device 0.1 on pci21
fwohci0: [ITHREAD]
fwohci0: OHCI version 1.10 (ROM=0)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 00:01:6c:20:00:b9:6b:16
fwohci0: Phy 1394a available S400, 1 ports.
fwohci0: Link S400, max_rec 2048 bytes.
firewire0: <IEEE1394(FireWire) bus> on fwohci0
fwohci0: Initiate bus reset
fwohci0: fwohci_intr_core: BUS reset
fwohci0: fwohci_intr_core: node_id=0x00000000, SelfID Count=1, CYCLEMASTER mode
sdhci0: <RICOH R5C822 SD> mem 0xf4901800-0xf49018ff irq 18 at device 0.2 on pci21
sdhci0: 1 slot(s) allocated
sdhci0: [ITHREAD]
pci21: <base peripheral> at device 0.3 (no driver attached)
pci21: <base peripheral> at device 0.4 (no driver attached)
pci21: <base peripheral> at device 0.5 (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 0x1818-0x181f,0x180c-0x180f,0x1810-0x1817,0x1808-0x180b,0x18e0-0x18ff mem 0xfc204000-0xfc2047ff irq 16 at device 31.2 on pci0
ahci0: [ITHREAD]
ahci0: AHCI v1.20 with 4 3Gbps ports, Port Multiplier not supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich0: [ITHREAD]
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich1: [ITHREAD]
ichsmb0: <Intel 82801I (ICH9) SMBus controller> port 0x1c00-0x1c1f mem 0xfc205400-0xfc2054ff irq 23 at device 31.3 on pci0
ichsmb0: [ITHREAD]
smbus0: <System Management Bus> on ichsmb0
acpi_tz0: <Thermal Zone> on acpi0
acpi_tz1: <Thermal Zone> on acpi0
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 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]
atkbd0: [ITHREAD]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: [ITHREAD]
psm0: model GlidePoint, device ID 0
battery0: <ACPI Control Method Battery> on acpi0
acpi_acad0: <AC Adapter> on acpi0
acpi_ibm0: <IBM ThinkPad ACPI Extras> on acpi0
ichwd0: <Intel ICH9M watchdog timer> on isa0
ichwd0: Intel ICH9M watchdog timer (ICH9 or equivalent)
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
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
coretemp1: <CPU On-Die Thermal Sensors> on cpu1
est1: <Enhanced SpeedStep Frequency Control> on cpu1
fuse4bsd: version 0.3.9-pre1, FUSE ABI 7.8
Timecounters tick every 10.000 msec
vboxdrv: fAsync=0 offMin=0x1ad offMax=0x63b
IPsec: Initialized Security Association Processing.
firewire0: 1 nodes, maxhop <= 0 cable IRM irm(0)  (me) 
firewire0: bus manager 0 
hdac0: HDA Codec #0: Conexant CX20561 (Hermosa)
pcm0: <HDA Conexant CX20561 (Hermosa) PCM #0 Analog> at cad 0 nid 1 on hdac0
pcm1: <HDA Conexant CX20561 (Hermosa) PCM #1 Analog> at cad 0 nid 1 on hdac0
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
ugen0.1: <Intel> at usbus0
uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <Intel> at usbus1
uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ugen2.1: <Intel> at usbus2
uhub2: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
ugen3.1: <Intel> at usbus3
uhub3: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus3
ugen4.1: <Intel> at usbus4
uhub4: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus4
ugen5.1: <Intel> at usbus5
uhub5: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus5
ugen6.1: <Intel> at usbus6
uhub6: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus6
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: <HITACHI HTS545032B9A300 PB3ZC61H> ATA-8 SATA 2.x device
ada0: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 305245MB (625142448 512 byte sectors: 16H 63S/T 16383C)
SMP: AP CPU #1 Launched!
cd0 at ahcich1 bus 0 scbus1 target 0 lun 0
cd0: <Optiarc DVD RW AD-7700H 1.FA> Removable CD-ROM SCSI-0 device 
cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed
Root mount waiting for: usbus7 usbus6 usbus5 usbus4 usbus3 usbus2 usbus1 usbus0
uhub1: 2 ports with 2 removable, self powered
uhub0: 2 ports with 2 removable, self powered
uhub4: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
uhub5: 2 ports with 2 removable, self powered
uhub6: 2 ports with 2 removable, self powered
Root mount waiting for: usbus7 usbus3
Root mount waiting for: usbus7 usbus3
uhub3: 6 ports with 6 removable, self powered
uhub7: 6 ports with 6 removable, self powered
Root mount waiting for: usbus3
ugen3.2: <Chicony Electronics Co., Ltd.> at usbus3
Trying to mount root from ufs:/dev/ufs/root
 
Danke, sehr hilfreich. Hast aber glaube ein Tippfehler im /etc/acpi/acpi_oem_exec.sh Skript, unter "Sync Disks" muesste wohl /bin/sync heissen.
 
Danke auch noch mal, jetzt läuft Suspend/Resume bei mir zuverlässig auf nem Lenovo Thinkpad X301.
 
@ernst
Danke für den Hinweis. Lokal ist es schon lange korrigiert, nachdem ich schmerzhaft feststellen musste, dass es falsch geschrieben ist... Hierher hatte es die Änderung aber nicht geschafft. :)
 
Hi,

ich habe das jetzt auch mal mit meinem SL510 so weit nachvollzogen und gemacht, habe aber beim Booten das Problem, dass er die Festplatte nicht findet (SATA), ich habe zwar ein ata0-Device, aber damit kann ich nichts machen (mountroot). Ich hatte dann nochmal atapci mit in die loader.conf reingenommen, was aber auch nichts brachte.

Woran könnte das liegen bzw. welches Modul könnte noch fehlen?

Viele Grüße, Morfio
 
Potentiell blöde Frage, aber vielleicht auch nicht: Bei mir stand der S-ATA Controller im BIOS auf "IDE". Das wird mit meinem Setup dort oben nicht funktionieren. Du müsstest ihn auf "AHCI" stellen, falls das noch nicht der Fall ist. Der von mir verwendete "ahci.ko" braucht es. Liegt es nicht daran, kann man mal schauen, was man da an weiteren Modulen reinpackt, aber es würde dann auf klassisches ATA hinauslaufen.
 
Ich hatte im BIOS beides ausprobiert. Wenn ich auf "Compatible" anstelle von "ahci" stelle, kommen gar keine Devices mehr raus. Ich könnte noch "Compatible" ausprobieren und ata laden, bin mir aber nicht sicher, ob das sinnvoll wäre.
 
Als wenn kein /dev/ada* auftaucht, ist das Problem meist, dass irgendwas in der Kette nicht komplett zu AHCI kompatibel ist. Klassischer Anwärter ist da das Interrupt-Handling, aber dann würde er gar nicht booten, stattdessen irgendwo zwischendrin mit "ahci timeout" oder so ähnlich hängen bleiben. Vielleicht auch die Platte selbst.

Du könntest versuchen das Powermanagement des S-ATA Systems abzuschalten:
Code:
# Agressives Powermanagement fuer SATA
hint.ahcich.0.pm_level=0
hint.ahcich.1.pm_level=0
Einfach die entsprechenden Zeilen in der loader.conf ändern oder die Werte manuell am Loader-Prompt setzen. Funktioniert es dann, könntest du die Level hochzählen, bis es nicht mehr funktioniert. 5 ist halt die agressivste Einstellung und bedeutet auch, dass man DInge wie Hotplug verliert. Vielleicht mögen die Platten das nicht.

Als pragmatische Lösung könntest du auf ATACAM verzichten und stattdessen klassisches ATA nehmen. Du verlierst zwar Powermanagement und NCQ, aber beides ist nicht wirklich sehr kritisch. Dazu wirfst du "ahci.ko" aus der loader.conf oder deaktivierst es manuell am Loader-Prompt per "disable-module ahci". Anschließend trägst du in die loader.conf ein oder lädtst manuell:
Code:
ata_load="YES"   # ATA selbst
atapci_load="YES"   # PCI ATA-Controller
ataintel_load="YES"   # Intel ATA Controller
ataahci_load="YES"   # AHCI mit klassischem ATA
atadisk_load="YES"   # ATA-Festplatten
 
Ich werde das nachher mal ausprobieren. Powermanagement wäre mir allerdings in so fern wichtig, als das Suspend2RAM funktioniert.
 
Das tut es weiterhin. S-ATA Powermanagement schaltet nur gewisse Kontrollsignale ab, die ein wenig Strom verbrauchen. Sonst macht es nichts.
 
@Morfio:
Als ich auf dem X301 mit 8.1-RELEASE amd64 USB aus dem Kernel geworfen habe und in rc.suspend die Module entladen habe, hatte ich eine reproduzierbare Kernel Panic.
Das ist inzwischen in 8-STABLE gefixt. Falls du (oder sonst jemand) das gleiche Problem haben solltest, einfach auf STABLE hochziehen.
 
Danke an alle. Ich werde berichten, dauert aber ein wenig, da ich das Gerät einschicken muss, da die Tastatur nicht richtig geht und ich noch nicht weiss, wann mein Firmennotebook geliefert wird :'-(
 
Danke Yamagi, da juckts mich doch tatsächlich wieder meinen Laptop mit FBSD zu bestücken. Unter Ubuntu läuft ja alles einfach so: WIE LANGWEILIG :)
Kommt das noch ins wiki? Wäre wie geschaffen dafür.....
 
Hilfe!
Ich habe die obige Anleitung als Basis für mein T60 verwendet und artig USB und WLAN in suspend und resume berücksichtigt.
Allerdings habe ich immer noch das gleiche Problem wie zu Beginn meiner Suche: wenn ich versuche das T60 aus dem Stanby aufzuwecken, leuchtet einmal kurz die Platten-Diode und die Lüfter laufen los. Sonst passiert aber leider gar nichts.

Auch im Logfile lässt sich nichts finden, dass überhaupt irgendwas vom System versucht hat zu resume'n. :(

Das Logfile findet sich auszugsweise hier.

System ist FreeBSD 8.1-STABLE auf einem Lenovo IBM T60 Thinkpad.

Vielen Dank vorab!
Arvid
 
Moin,

ich muß das alten Thema jetzt nochmal ausgraben, nachdem ich beschlossen habe meinem Notebook (Lenovo R500) eine neue Festplatte (ssd von Samsung) zu spendieren.

Ich würde ja gerne aber ich trau mich nicht.
Mein Debian lief bis jetzt immer ganz problemlos aber durch die vielen Änderungen bei den Linux Systemen und jetzt auch noch systemd somit möchte ich auch mit meinen Desktop Systemen umsteigen (Server laufen seit ca. einem Jahr problemlos mit FreeBSD).

Den Anfang muß also das Notebook machen.
Ist den für die Konfiguration mit FreeBSD 9.1 RC3 immer noch der von Yamagi für FreeBSD 8.... beschrieben Aufwand (insbesondere der selbskonfigurierte Kernel) notwendig um ein stabiles System (mit Suspend) zu erreichen?

Bedanke mich für ne Info

Dilbert
 
Also, ich selbst habe auf meinen R500 noch kein 9.x installiert. Voraussichtlich werde ich es so schnell auch nicht tun, da ich im Moment einfach nicht die Nerven dazu habe und ich den einzigen Vorteil in Form von 802.11N nicht benötige. Dennoch einige Anmerkungen:
- Patches und ähnliches sind schon in 8.3 nicht mehr notwendig. In 9.x erst recht nicht.
- USB unterstützt inzwischen Suspend, man muss die Module also nicht mehr entladen.
- Firewire muss nach wie vor entladen werden. Aber wenn man partout keinen eigenen Kernel bauen will und Firewire eh nicht nutzt, kann man es auch einfach im BIOS ausknippsen.
- if_iwn muss man ebenfalls nicht mehr entladen.
- Das Powermanagement der Platte ist bei SSD natürlich harmlos und muss nicht abgeschaltet werden.
 
Zurück
Oben