2012年12月15日 星期六

ACPI problem when debian starts

ACPI problem when debian starts

Here is stuff to play with if your patient, if you find what ailes you please post the solution here.
From: http://www.columbia.edu/~ariel/acpi/acpi_howto.txt
22. Boot parameter reference

acpi=force
If you built your kernel with acpi disabled, you can use this option
to force its use.

acpi=off
If you built your kernel with ACPI enabled, you can use this option
to turn it off (in case you'd rather use APM, it interferes with
something else, or it's just plain broken).

acpi=ht
Enable ACPI only to the degree needed to support hyperthreading. If
you don't want to use most of the ACPI driver, but you want
hyperthreading working, use this option so that the ACPI tables will
be used for virtual processor discovery.

acpi=strict
Be anal about syntax and method requirements in ACPI tables provided
by the vendor; if you turn this on, you can find potential problems
with your DSDT that may not show up by other means.

acpi_sleep=s3_bios
If this boot parameter is passed, upon wake from suspend, the kernel
will try to initialize your video adapter by calling code at
c000:0003h. In practice, this code may no longer be available after
power on, so your system may crash. But for some people, this is the
only way to get suspend to RAM to work. Use with caution.

acpi_sleep=s3_mode
Upon wake from suspend, the kernel will set the video adapter mode to
the mode it was in before suspend, using the VESA BIOS mode set call
(0x4f02). Use this if your system can get back to VGA text mode from
suspend, i.e. it suspends ok from a text console, but doesn't work
from X. This could crash your system so use with caution.

acpi_sleep=s3_bios,s3_mode
On some systems that require acpi_sleep=s3_bios, the system will be
left in VGA text mode and so you'll need to do s3_mode as well.

acpi_sci=level|edge|high|low
Set ACPI System Control Interrupt trigger mode; it's very unlikely
that you'll need this, as SCI handling has been stable for some time.
However, if you have a prerelease BIOS, and you see messages in your
log about unrecognized SCIs, try using one of these settings. [If
someone who has to use this option would contact me, I'll add a
better description.]

acpi_irq_balance
ACPI will balance active IRQs to minimize sharing. This is the
default in APIC mode.

acpi_irq_nobalance
ACPI will not move active IRQs around (the opposite of
acpi_irq_balance). This is the default in PIC mode.

acpi_irq_pci=...
If you have set acpi_irq_balance, you have to reserve some IRQs for
for use by PCI or else ACPI may use them all; list them here. Format:
,...

acpi_irq_isa
If you have set acpi_irq_balance, you have to reserve some IRQs for
for use by ISA or else ACPI may use them all; list them here. Don't
do this unless you have ISA devices. Format: ,...

acpi_osi=
By default, the _OSI method in ACPI will tell the BIOS that we are
running Microsoft Windows NT. But if you use this option with an
empty parameter, it disables the _OSI method. (What does the BIOS do
then?)

acpi_os_name=
By default, the _OSI method in ACPI will tell the BIOS that we are
running Microsoft Windows NT. But if you specify a name here, that OS
name will be reported to the BIOS instead. This may enable or disable
some methods in your DSDT depending on the OS string you choose.

acpi_serialize
If you see errors in your log which include things like

Error: Looking up [some-device-id] in namespace, AE_ALREADY_EXISTS


then try setting this option. It forces serialization of AML methods
in case a method creates namespace objects, fails to complete
cleanly, and leaves its debris around; this may allow us to track
down the specific problem.

acpi_skip_timer_override
This option is specific to certain versions of the nForce2 BIOS which
map IRQ0 to pin 2 and result in the timer being XT-PIC instead of
IO-APIC-edge. This isn't really an ACPI issue but it's called
acpi_skip_timer_override so it's in this document. See kernel bug
1203 at [241]http://bugme.osdl.org/show_bug.cgi?id=1203 for more
info.

acpi_dbg_layer=
Format: ; Turn on or off debugging of a or several acpi debug
layers. Each bit of the indicates a separate layer. Starting
from the rightmost bit, you can turn on debugging for the layers:
UTILITIES, HARDWARE, EVENTS, TABLES, NAMESPACE, PARSER, DISPATCHER,
EXECUTER, RESOURCES, CA_DEBUGGER, OS_SERVICES, CA_DISASSEMBLER,
COMPILER, and TOOLS. If you don't do this at boot time you can still
enable this by writing to /proc/acpi/debug_layer.

acpi_dbg_level=
Format: ; Turn on or off debugging of a or several acpi debug
levels. Each bit of the indicates a separate level. Starting
from the rightmost bit, you can turn on debugging for messages logged
at the level: ERROR, WARN, INIT, DEBUG_OBJECT, INFO, INIT_NAMES,
PARSE, LOAD, DISPATCH, EXEC, NAMES, OPREGION, BFIELD, TABLES, VALUES,
OBJECTS, RESOURCES, USER_REQUESTS, PACKAGE, ALLOCATIONS, FUNCTIONS,
OPTIMIZATIONS, MUTEX, THREADS, IO, INTERRUPTS, AML_DISASSEMBLE,
VERBOSE_INFO, FULL_TABLES, and EVENTS. If you don't do this at boot
time you can still enable this by writing to /proc/acpi/debug_level.

ec_burst=
use burst mode instead of polling mode for embedded controller; this
mode is better in the long run than polling mode but not ready for
prime time yet. Use it, however, if you see problems with button
failure or battery status failure or other ACPI events just
disappearing and not being handled; see kernel bug 3851 at
[242]http://bugzilla.kernel.org/show_bug.cgi?id=3851 for more
information.

acpi_generic_hotkey
There is a generic hotkey driver which will let you map hotkey codes
to specific acpi methods. It's not at all user friendly. Nonetheless,
it may be useful for you if your laptop has hotkeys that use the ACPI
interface. If you compile in the generic hotkey driver, using
CONFIG_ACPI_HOTKEY, you must use this boot option for the driver to
be enabled.

Some laptops have specific hotkey drivers for their setups; see the
CONFIG options above for the list. If you set this option and you
have compiled in both the generic hotkey driver and a specific driver
for one of those laptops, only the generic hotkey driver will be
used.

acpi_fake_ecdt
Workaround failure due to BIOS lacking ECDT; use this if you see
errors in your log early on about the battery, adapter or the
embedded controller. Setting this option lets the kernel ignore the
missing ECDT, and come back to complete initialization of those
devices later when it has pulled more complete information from the
DSDT.

acpi_wake_gpes_always_on
If your system seems not to be generating ACPI events, try setting
this option. Here's the explanation, taken right from the kernel
code:

Wake and Run-Time GPES are expected to be separate. We disable
wake-GPEs at run-time to prevent spurious interrupts. However, if a
system exists that shares Wake and Run-time events on the same GPE
this flag is available to tell Linux to keep the wake-time GPEs
enabled at run-time.

pci=noacpi
Do not use ACPI for IRQ routing. ACPI looks at _PRT packages to
figure out which interrupt goes with which PCI interrupt link device
and then looks up the resources that device uses. Instead, use the
PCI IRQ routing table. If your kernel hangs during boot, you may have
serious IRQ problems; try this option.

pci=routeirq
Do IRQ routing for all PCI devices. Each device should call
pci_enable_device(), which will do this IRQ routing, but some drivers
may be broken and not call it, so this option makes sure it gets
called for each device outside of the driver. If you have problems
with a particular device, try this option. Someday this option should
go away. I wonder about proprietary drivers though... Maybe this
option is here to stay.

pnpacpi=off
Try this option if you are having trouble with PNP devices under
ACPI; this will disable use of PNPACPI and will use PNPBIOS instead.

processor.max_cstate
Limit processor to maximum C-state; if you enabled
CONFIG_ACPI_PROCESSOR so that the CPU is placed in different power
states when it is idle, you may want this. Various IBM Thinkpad
systems emit a high-pitched whine when the CPU enters C3 or C4, so
passing C2 as a parameter will prevent that. See ThinkWiki at
[243]http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noisesto
check your specific model.

If you don't want to lose the ability to use these lower power
states, you can try adjusting your timer speed instead: set your
default timer speed to HZ_100 (CONFIG_HZ_100).

If you know that your system should support C3 or C4 and a look at
/sys/module/processor/parameters/max_cstate shows that it's set
lower, you can try to increase it. Some BIOSes are blacklisted from
these lower power states in the kernel. As of this writing, those are
the IBM ThinkPad R40e, the Medion 41700, and the Clevo 5600D. Set
max_cstate=9 to override this limit.

2012年9月1日 星期六

ZFS on Linux

ZFS on Linux只支持64bits平台,包括兩個組件SPL(Solaris Porting Layer)和ZFS,當前版本為0.6.0-rc10,支持的zfs pool版本為28,文件系統版本為5。


安裝solaris移植層SPL

下載spl-0.6.0-rc10.tar.gz,解壓生成spl-0.6.0-rc10子目錄,進入該目錄執行以下操作

$ sudo apt-get install build-essential gawk alien fakeroot linux-headers-$(uname -r)

$ ./configure

$ make deb



這會在當前目錄下生成三個deb包

spl_0.6.0-1_amd64.deb

spl-modules_0.6.0-1_amd64.deb

spl-modules-devel_0.6.0-1_amd64.deb



安裝生成的deb包

$sudo dpkg -i *_amd64.deb



安裝ZFS

sudo apt-get install zlib1g-dev
sudo apt-get install uuid-dev



下載zfs-0.6.0-rc10.tar.gz,解壓縮生成zfs-0.6.0-rc10子目錄,進入該目錄執行以下操作

$ sudo apt-get install zlib1g-dev uuid-dev libblkid-dev libselinux-dev parted lsscsi

$ ./configure

$ make deb



這會在當前目錄下生成六個deb包

zfs_0.6.0-1_amd64.deb

zfs-dracut_0.6.0-1_amd64.debls

zfs-modules-devel_0.6.0-1_amd64.deb

zfs-devel_0.6.0-1_amd64.deb

zfs-modules_0.6.0-1_amd64.deb

zfs-test_0.6.0-1_amd64.deb



安裝生成的deb包

$sudo dpkg -i *_amd64.deb



讓系統啟動時自動加載zfs內核模塊,編輯/etc/modules文件,zfs作為單獨的一行添加到文件中。



測試



加載ZFS模塊

# modprobe zfs



查看zfs模塊信息

$ lsmod
grep zfs

Module Size Used by

zfs 791314 0

zunicode 324466 1 zfs

zavl 13115 1 zfs

zcommon 35811 1 zfs

znvpair 31373 2 zcommon,zfs

spl 120446 6 znvpair,zcommon,zavl,zunicode,zfs,splat



加載splat(Solaris Porting LAyer Test)模塊

#modprobe splat



查看splat使用說明

#splat

usage: splat [hvla] [-t >]

–help -h This help

–verbose -v Increase verbosity

–list -l List all tests in all subsystems

–all -a Run all tests in all subsystems

–test -t Run 『test』 in subsystem 『sub』

–exit -x Exit on first test error

–nocolor -c Do not colorize output



Examples:

splat -t kmem:all # Runs all kmem tests

splat -t taskq:0×201 # Run taskq test 0×201



執行kmem測試

#splat -t kmem:all

———–Running SPLAT Tests —————-

kmem:kmem_alloc Pass

kmem:kmem_zalloc Pass

kmem:vmem_alloc Pass

kmem:vmem_zalloc Pass

kmem:slab_small Pass

kmem:slab_large Pass

kmem:slab_align Pass

kmem:slab_reap Pass

kmem:slab_age Pass

kmem:slab_lock Pass

kmem:slab_overcommit Pass