Suspend / Resume problem with -ck kernels.

Sometimes with the linux-ck kernel my laptop doesn't suspend / resume correctly.
Sometimes when suspending my laptop will take "extra long" to suspend.
When it resumes the processor & fan will turn on, but the suspend light will still be blinking and the screen doesn't turn on.  Sometimes (but not always) the caps-lock light will start blinking after I try to wake it up, like a kernel panic. It happens more often when closing the lid to suspend, but has happened while suspending manually.
This only happens with -ck kernels. I have tried both the linux-ck and linux-ck-corex kernels with same result. This started happening around kernel 3.0.8 I believe. I thought it was a bug that would be fixed, but it still occurs.
I have a Lenovo Thinkpad T410s,  Intel Core i5, Intel graphics. I use the TLP scripts for power savings, and Xfce-Power-Manager for my power manager. I can see nothing relevant in the logs. Suspend / Resume always works with the "official" kernel.
Any ideas?

Ok, I think I narrowed the problem down to the BFS scheduler.
I compiled "linux-bfs" from the AUR, installed it and rebooted and lo and behold my suspend / resume problem was back. Rebooted with the stock kernel, did about 10 suspend & resume cycles in a row... and it worked great each time.
Sometimes when using linux-bfs or linux-ck, I can "revive" the system after a bad resume, by closing the lid and opening it slowly. Also I know the screen is just not "off", because the caps lock key light will not respond. If the caps-lock key light starts blinking (on-and-off) after a resume, I assume it is a kernel panic, and nothing besides a forced power-off will fix it.
Last edited by jon (2011-12-09 18:11:27)

Similar Messages

  • Two problems with custom kernel

    I get two problems with my custom kernel that is not using initrd and otherwise working fine:
    1) initscripts does not print anything, i.e., I see the kernel messages and after a short while the login prompt. It seems to start the daemons, however, since my network is working. During shutdown the printout is working as usual.
    2) the machine does not power off properly (just hangs/stops after saying that is now powers off).
    I am missing some kernel options? Or do I have to configure something differently for not having an initrd?
    Thanks,  CC

    ccom wrote:I now re-compiled with Arch Linux's default settings (except for SCSI, SATA, and filesystem drivers built in) and noinitrd in GRUB. I get the same two problems. What is initrd doing that I missed?
    how about display drivers? are you compiling them in the kernel or as external modules?

  • Problem with 640 kernel: SAP R3, Oracle9i, Sunsolaris

    Dear Experts,
    Am facing problem with kernel 640 version.
    1. We have Production (620) and DR servers (620).
    2. I upgraded kernel in production to 640, still pumping and applying redo logs in DR server which is 620 kernel.
    3. I copied kernel 640 from production server to DR server.
    4. When I open database in DR server (system started normally) it is showing kernel version 620 only, not 640.
    5. Only diff is production server is upgraded from 4.0B to 4.7 and DR server recently we installed 4.7 directly.
    After restoring backup in DR server again control file created and moved to DR server and applying redo logs normally.
    Why kernel version showing only 620 in DR server???
    Is control file plays any role in kernel upgrade. Should I open database and check again (with new control file and newly restored data). . .  .
    Any idea, , , ,
    Adv thanks....

    Am believe I did. I followed as under.
    1. Copied production box exe in /sapmnt/SID/ to other location of same box
    2. zipped using zip command zip <newfilename>.zip exe on same box
    3. ftp'ed to DR box with normal ftp
    4. unzipped the the zip file there with command unzip  <newfilename>.zip then  moved to /sapmnt/SID/
    5. next renamed.
    You tell me one thing will there be any wrong with zip command
    regds

  • Problems with own kernel and nvidia

    Hi.
    I've got a little problem with nvidia driver. I removed stock kernel and compiled my own. Then I installed nvidia drivers (from nvidia.com) and everythings gone fine. But after reboot Xserver doesn't seem to start. The only way to run X is to reinstall nvidia drivers (after every reboot)... anyone knows any solution for that?

    Log:
    (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
    (==) NVIDIA(0): RGB weight 888
    (==) NVIDIA(0): Default visual is TrueColor
    (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
    (**) NVIDIA(0): Option "NoLogo" "on"
    (**) NVIDIA(0): Option "TripleBuffer" "on"
    (**) NVIDIA(0): Option "AddARGBGLXVisuals"
    (**) NVIDIA(0): Enabling RENDER acceleration
    (II) NVIDIA(0): Support for GLX with the Damage and Composite X extensions is
    (II) NVIDIA(0): enabled.
    (EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module! Please ensure
    (EE) NVIDIA(0): that there is a supported NVIDIA GPU in this system, and
    (EE) NVIDIA(0): that the NVIDIA device files have been created properly.
    (EE) NVIDIA(0): Please consult the NVIDIA README for details.
    (EE) NVIDIA(0): *** Aborting ***
    (II) UnloadModule: "nvidia"
    (II) UnloadModule: "wfb"
    (II) UnloadModule: "fb"
    (EE) Screen(s) found, but none have a usable configuration.
    Fatal server error:
    no screens found

  • Sound problems with new kernel

    When I upgraded to 2.6.21, my sound just started skipping.  It would still play, but apps would freeze and sounds would continue for ages.  Now, for some odd reason, I get no sound at all.
    dmesg:
    Linux version 2.6.21-suspend2 (root@architect) (gcc version 4.1.2 20070423 (prerelease)) #1 SMP PREEMPT Tue May 8 23:00:33 CEST 2007
    BIOS-provided physical RAM map:
    sanitize start
    sanitize end
    copy_e820_map() start: 0000000000000000 size: 000000000009f800 end: 000000000009f800 type: 1
    copy_e820_map() type is E820_RAM
    copy_e820_map() start: 000000000009f800 size: 0000000000000800 end: 00000000000a0000 type: 2
    copy_e820_map() start: 00000000000d8000 size: 0000000000008000 end: 00000000000e0000 type: 2
    copy_e820_map() start: 00000000000e4000 size: 000000000001c000 end: 0000000000100000 type: 2
    copy_e820_map() start: 0000000000100000 size: 000000001be70000 end: 000000001bf70000 type: 1
    copy_e820_map() type is E820_RAM
    copy_e820_map() start: 000000001bf70000 size: 000000000000c000 end: 000000001bf7c000 type: 3
    copy_e820_map() start: 000000001bf7c000 size: 0000000000004000 end: 000000001bf80000 type: 4
    copy_e820_map() start: 000000001bf80000 size: 0000000000080000 end: 000000001c000000 type: 2
    copy_e820_map() start: 000000002bf80000 size: 0000000000080000 end: 000000002c000000 type: 2
    copy_e820_map() start: 00000000fff80000 size: 0000000000080000 end: 0000000100000000 type: 2
    BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
    BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
    BIOS-e820: 00000000000d8000 - 00000000000e0000 (reserved)
    BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
    BIOS-e820: 0000000000100000 - 000000001bf70000 (usable)
    BIOS-e820: 000000001bf70000 - 000000001bf7c000 (ACPI data)
    BIOS-e820: 000000001bf7c000 - 000000001bf80000 (ACPI NVS)
    BIOS-e820: 000000001bf80000 - 000000001c000000 (reserved)
    BIOS-e820: 000000002bf80000 - 000000002c000000 (reserved)
    BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
    0MB HIGHMEM available.
    447MB LOWMEM available.
    Entering add_active_range(0, 0, 114544) 0 entries of 256 used
    Zone PFN ranges:
    DMA 0 -> 4096
    Normal 4096 -> 114544
    HighMem 114544 -> 114544
    early_node_map[1] active PFN ranges
    0: 0 -> 114544
    On node 0 totalpages: 114544
    DMA zone: 32 pages used for memmap
    DMA zone: 0 pages reserved
    DMA zone: 4064 pages, LIFO batch:0
    Normal zone: 862 pages used for memmap
    Normal zone: 109586 pages, LIFO batch:31
    HighMem zone: 0 pages used for memmap
    DMI 2.3 present.
    ACPI: RSDP 000F6AB0, 0014 (r0 PTLTD )
    ACPI: RSDT 1BF752A9, 002C (r1 PTLTD RSDT 6040000 LTP 0)
    ACPI: FACP 1BF7BF64, 0074 (r1 ATI Salmon 6040000 ATI F4240)
    ACPI: DSDT 1BF752D5, 6C8F (r1 ATI MS2_1535 6040000 MSFT 100000E)
    ACPI: FACS 1BF7CFC0, 0040
    ACPI: BOOT 1BF7BFD8, 0028 (r1 PTLTD $SBFTBL$ 6040000 LTP 1)
    ATI board detected. Disabling timer routing over 8254.
    ACPI: PM-Timer IO Port: 0x8008
    Allocating PCI resources starting at 30000000 (gap: 2c000000:d3f80000)
    Built 1 zonelists. Total pages: 113650
    Kernel command line: root=/dev/hda3 ro resume2=swap:/dev/hda2
    Local APIC disabled by BIOS -- you can enable it with "lapic"
    mapped APIC to ffffd000 (0138b000)
    Enabling fast FPU save and restore... done.
    Enabling unmasked SIMD FPU exception support... done.
    Initializing CPU#0
    PID hash table entries: 2048 (order: 11, 8192 bytes)
    Detected 2591.805 MHz processor.
    Console: colour VGA+ 80x25
    Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    Memory: 448176k/458176k available (2391k kernel code, 9452k reserved, 784k data, 268k init, 0k highmem)
    virtual kernel memory layout:
    fixmap : 0xfff83000 - 0xfffff000 ( 496 kB)
    pkmap : 0xff800000 - 0xffc00000 (4096 kB)
    vmalloc : 0xdc800000 - 0xff7fe000 ( 559 MB)
    lowmem : 0xc0000000 - 0xdbf70000 ( 447 MB)
    .init : 0xc0422000 - 0xc0465000 ( 268 kB)
    .data : 0xc0355fb1 - 0xc041a2ac ( 784 kB)
    .text : 0xc0100000 - 0xc0355fb1 (2391 kB)
    Checking if this processor honours the WP bit even in supervisor mode... Ok.
    Calibrating delay using timer specific routine.. 5190.03 BogoMIPS (lpj=2595019)
    Security Framework v1.0.0 initialized
    Mount-cache hash table entries: 512
    CPU: After generic identify, caps: bfebf9ff 00000000 00000000 00000000 00004400 00000000 00000000
    CPU: Trace cache: 12K uops, L1 D cache: 8K
    CPU: L2 cache: 128K
    CPU: Hyper-Threading is disabled
    CPU: After all inits, caps: bfebf9ff 00000000 00000000 00003080 00004400 00000000 00000000
    Intel machine check architecture supported.
    Intel machine check reporting enabled on CPU#0.
    CPU0: Intel P4/Xeon Extended MCE MSRs (12) available
    CPU0: Thermal monitoring enabled
    Checking 'hlt' instruction... OK.
    SMP alternatives: switching to UP code
    Early unpacking initramfs... done
    ACPI: Core revision 20070126
    ACPI: Looking for DSDT in initramfs... error, file /DSDT.aml not found.
    ACPI: setting ELCR to 0200 (from 0420)
    CPU0: Intel(R) Celeron(R) CPU 2.60GHz stepping 09
    SMP motherboard not detected.
    Local APIC not detected. Using dummy APIC emulation.
    Brought up 1 CPUs
    Device driver platform lacks bus and class support for being resumed.
    NET: Registered protocol family 16
    ACPI: bus type pci registered
    PCI: PCI BIOS revision 2.10 entry at 0xfd89b, last bus=2
    PCI: Using configuration type 1
    Setting up standard PCI resources
    ACPI: Interpreter enabled
    ACPI: (supports S0 S3 S4 S5)
    ACPI: Using PIC for interrupt routing
    ACPI: PCI Root Bridge [PCI0] (0000:00)
    PCI: Probing PCI hardware (bus 00)
    Device driver pci0000:00 lacks bus and class support for being resumed.
    PCI quirk: region 8000-803f claimed by ali7101 ACPI
    PCI quirk: region 8040-805f claimed by ali7101 SMB
    Boot video device is 0000:01:05.0
    ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
    ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.AGPB._PRT]
    ACPI: PCI Interrupt Link [LNK0] (IRQs 7 10) *0, disabled.
    ACPI: PCI Interrupt Link [LNK1] (IRQs 7 *10)
    ACPI: PCI Interrupt Link [LNK2] (IRQs 7 *10)
    ACPI: PCI Interrupt Link [LNK3] (IRQs 7 *10)
    ACPI: PCI Interrupt Link [LNK4] (IRQs 7 10) *0, disabled.
    ACPI: PCI Interrupt Link [LNK5] (IRQs 7 11) *0, disabled.
    ACPI: PCI Interrupt Link [LNK6] (IRQs 7 10) *0, disabled.
    ACPI: PCI Interrupt Link [LNK7] (IRQs *5)
    ACPI: PCI Interrupt Link [LNK8] (IRQs 7 10) *0, disabled.
    Linux Plug and Play Support v0.97 (c) Adam Belay
    pnp: PnP ACPI init
    Device driver pnp0 lacks bus and class support for being resumed.
    pnp: PnP ACPI: found 9 devices
    SCSI subsystem initialized
    PCI: Using ACPI for IRQ routing
    PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report
    NetLabel: Initializing
    NetLabel: domain hash size = 128
    NetLabel: protocols = UNLABELED CIPSOv4
    NetLabel: unlabeled traffic allowed by default
    Time: tsc clocksource has been installed.
    pnp: 00:07: ioport range 0x40b-0x40b has been reserved
    pnp: 00:07: ioport range 0x480-0x48f has been reserved
    pnp: 00:07: ioport range 0x4d0-0x4d1 has been reserved
    pnp: 00:07: ioport range 0x4d6-0x4d6 has been reserved
    pnp: 00:07: ioport range 0x8000-0x807f could not be reserved
    pnp: 00:07: iomem range 0xd0007000-0xd0007fff has been reserved
    PCI: Bridge: 0000:00:01.0
    IO window: 9000-9fff
    MEM window: d0300000-d03fffff
    PREFETCH window: d8000000-dfffffff
    PCI: Bus 2, cardbus bridge: 0000:00:0a.0
    IO window: 00001800-000018ff
    IO window: 00001c00-00001cff
    PREFETCH window: 30000000-33ffffff
    MEM window: 34000000-37ffffff
    PCI: Enabling device 0000:00:0a.0 (0000 -> 0003)
    ACPI: PCI Interrupt Link [LNK5] enabled at IRQ 11
    PCI: setting IRQ 11 as level-triggered
    ACPI: PCI Interrupt 0000:00:0a.0[A] -> Link [LNK5] -> GSI 11 (level, low) -> IRQ 11
    NET: Registered protocol family 2
    IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
    TCP established hash table entries: 16384 (order: 6, 262144 bytes)
    TCP bind hash table entries: 16384 (order: 5, 196608 bytes)
    TCP: Hash tables configured (established 16384 bind 16384)
    TCP reno registered
    checking if image is initramfs... it is
    Simple Boot Flag at 0x37 set to 0x1
    apm: BIOS not found.
    VFS: Disk quotas dquot_6.5.1
    Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    Installing knfsd (copyright (C) 1996 [email protected]).
    io scheduler noop registered
    io scheduler anticipatory registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    Activating ISA DMA hang workarounds.
    Device driver pnp1 lacks bus and class support for being resumed.
    isapnp: Scanning for PnP cards...
    Switched to high resolution mode on CPU 0
    isapnp: No Plug & Play device found
    Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
    PCI: Enabling device 0000:00:08.0 (0000 -> 0003)
    ACPI: PCI Interrupt Link [LNK6] enabled at IRQ 10
    PCI: setting IRQ 10 as level-triggered
    ACPI: PCI Interrupt 0000:00:08.0[A] -> Link [LNK6] -> GSI 10 (level, low) -> IRQ 10
    0000:00:08.0: ttyS0 at I/O 0x1428 (irq = 10) is a 8250
    0000:00:08.0: ttyS1 at I/O 0x1440 (irq = 10) is a 8250
    0000:00:08.0: ttyS2 at I/O 0x1450 (irq = 10) is a 8250
    0000:00:08.0: ttyS3 at I/O 0x1460 (irq = 10) is a 8250
    Couldn't register serial port 0000:00:08.0: -28
    Device driver isa lacks bus and class support for being resumed.
    RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
    loop: loaded (max 8 devices)
    Device driver lo lacks bus and class support for being resumed.
    input: Macintosh mouse button emulation as /class/input/input0
    PNP: PS/2 Controller [PNP0303:KBC0,PNP0f13:MSE0] at 0x60,0x64 irq 1,12
    serio: i8042 KBD port at 0x60,0x64 irq 1
    serio: i8042 AUX port at 0x60,0x64 irq 12
    mice: PS/2 mouse device common for all mice
    input: AT Translated Set 2 keyboard as /class/input/input1
    TCP cubic registered
    NET: Registered protocol family 1
    NET: Registered protocol family 17
    Using IPI No-Shortcut mode
    Suspend v2.2.10
    Suspend2 Userspace Storage Manager support registered.
    Suspend2 Basic User Interface support registered.
    Suspend2 Compressor support registered.
    Suspend2 Block I/O support registered.
    Suspend2 Swap Allocator support registered.
    Suspend2 File Allocator support registered.
    Suspend2 Userspace UI support registered.
    Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
    ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
    ALI15X3: IDE controller at PCI slot 0000:00:10.0
    ACPI: Unable to derive IRQ for device 0000:00:10.0
    ACPI: PCI Interrupt 0000:00:10.0[A]: no GSI
    ALI15X3: chipset revision 196
    ALI15X3: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0x2040-0x2047, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0x2048-0x204f, BIOS settings: hdc:pio, hdd:pio
    Probing IDE interface ide0...
    hda: TOSHIBA MK4025GAS, ATA DISK drive
    Device driver ide0 lacks bus and class support for being resumed.
    ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
    Probing IDE interface ide1...
    hdc: SD-R2512, ATAPI CD/DVD-ROM drive
    Device driver ide1 lacks bus and class support for being resumed.
    ide1 at 0x170-0x177,0x376 on irq 15
    PCI driver ALI15x3_IDE lacks driver specific resume support.
    PCI driver PCI_IDE lacks driver specific resume support.
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    PCI: Enabling device 0000:00:0b.2 (0010 -> 0012)
    ACPI: PCI Interrupt 0000:00:0b.2[C] -> Link [LNK5] -> GSI 11 (level, low) -> IRQ 11
    ehci_hcd 0000:00:0b.2: EHCI Host Controller
    ehci_hcd 0000:00:0b.2: new USB bus registered, assigned bus number 1
    ehci_hcd 0000:00:0b.2: irq 11, io mem 0xd0005000
    ehci_hcd 0000:00:0b.2: USB 2.0 started, EHCI 0.95, driver 10 Dec 2004
    Device driver usbdev1.1_ep00 lacks bus and class support for being resumed.
    usb usb1: configuration #1 chosen from 1 choice
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 4 ports detected
    Device driver usbdev1.1_ep81 lacks bus and class support for being resumed.
    USB Universal Host Controller Interface driver v3.0
    ACPI: PCI Interrupt Link [LNK2] enabled at IRQ 10
    ACPI: PCI Interrupt 0000:00:0b.0[A] -> Link [LNK2] -> GSI 10 (level, low) -> IRQ 10
    uhci_hcd 0000:00:0b.0: UHCI Host Controller
    uhci_hcd 0000:00:0b.0: new USB bus registered, assigned bus number 2
    uhci_hcd 0000:00:0b.0: irq 10, io base 0x00002000
    Device driver usbdev2.1_ep00 lacks bus and class support for being resumed.
    usb usb2: configuration #1 chosen from 1 choice
    hub 2-0:1.0: USB hub found
    hub 2-0:1.0: 2 ports detected
    Device driver usbdev2.1_ep81 lacks bus and class support for being resumed.
    ACPI: PCI Interrupt Link [LNK3] enabled at IRQ 10
    ACPI: PCI Interrupt 0000:00:0b.1[b] -> Link [LNK3] -> GSI 10 (level, low) -> IRQ 10
    uhci_hcd 0000:00:0b.1: UHCI Host Controller
    uhci_hcd 0000:00:0b.1: new USB bus registered, assigned bus number 3
    uhci_hcd 0000:00:0b.1: irq 10, io base 0x00002020
    Device driver usbdev3.1_ep00 lacks bus and class support for being resumed.
    usb usb3: configuration #1 chosen from 1 choice
    hub 3-0:1.0: USB hub found
    hub 3-0:1.0: 2 ports detected
    Device driver usbdev3.1_ep81 lacks bus and class support for being resumed.
    usb 3-2: new low speed USB device using uhci_hcd and address 2
    hda: max request size: 128KiB
    hda: 78140160 sectors (40007 MB), CHS=65535/16/63, UDMA(100)
    hda: cache flushes supported
    hda:Device driver usbdev3.2_ep00 lacks bus and class support for being resumed.
    usb 3-2: configuration #1 chosen from 1 choice
    Device driver usbdev3.2_ep81 lacks bus and class support for being resumed.
    hda1 hda2 hda3 hda4
    hdc: ATAPI 24X DVD-ROM CD-R/RW drive, 2048kB Cache, DMA
    Uniform CD-ROM driver Revision: 3.20
    Suspend2: SwapAllocator: Signature found.
    Suspend2: Resuming enabled.
    Suspend2: Normal swapspace found.
    ReiserFS: hda3: found reiserfs format "3.6" with standard journal
    ReiserFS: hda3: using ordered data mode
    ReiserFS: hda3: journal params: device hda3, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
    ReiserFS: hda3: checking transaction log (hda3)
    ReiserFS: hda3: replayed 3 transactions in 0 seconds
    ReiserFS: hda3: Using r5 hash to sort names
    natsemi dp8381x driver, version 2.1, Sept 11, 2006
    originally by Donald Becker <[email protected]>
    http://www.scyld.com/network/natsemi.html
    2.4.x kernel port by Jeff Garzik, Tjeerd Mulder
    ACPI: PCI Interrupt Link [LNK1] enabled at IRQ 10
    ACPI: PCI Interrupt 0000:00:12.0[A] -> Link [LNK1] -> GSI 10 (level, low) -> IRQ 10
    Device driver eth0 lacks bus and class support for being resumed.
    natsemi eth0: NatSemi DP8381[56] at 0xd0006000 (0000:00:12.0), 00:0e:7f:eb:fd:8a, IRQ 10, port TP.
    ndiswrapper version 1.43 loaded (smp=yes)
    ndiswrapper: driver bcmwl5 (Broadcom,06/26/2004, 3.70.17.0) loaded
    PCI: Enabling device 0000:00:09.0 (0000 -> 0002)
    ACPI: PCI Interrupt 0000:00:09.0[A] -> Link [LNK3] -> GSI 10 (level, low) -> IRQ 10
    ndiswrapper: using IRQ 10
    Device driver wlan0 lacks bus and class support for being resumed.
    wlan0: ethernet device 00:90:4b:4a:18:85 using NDIS driver: bcmwl5, version: 0x3461100, NDIS version: 0x501, vendor: '', 14E4:4320.5.conf
    wlan0: encryption modes supported: WEP; TKIP with WPA; AES/CCMP with WPA
    usbcore: registered new interface driver ndiswrapper
    ACPI: AC Adapter [ACAD] (on-line)
    ACPI: Battery Slot [BAT1] (battery present)
    input: Power Button (FF) as /class/input/input2
    ACPI: Power Button (FF) [PWRF]
    input: Power Button (CM) as /class/input/input3
    ACPI: Power Button (CM) [PWRB]
    input: Lid Switch as /class/input/input4
    ACPI: Lid Switch [LID]
    ACPI: CPU0 (power states: C1[C1] C2[C2])
    Time: acpi_pm clocksource has been installed.
    ACPI: Thermal Zone [THRM] (55 C)
    Linux agpgart interface v0.102 (c) Dave Jones
    agpgart: Detected Ati IGP345M chipset
    agpgart: AGP aperture is 64M @ 0xd4000000
    PCI: Enabling device 0000:00:06.0 (0005 -> 0007)
    ACPI: PCI Interrupt Link [LNK7] enabled at IRQ 5
    PCI: setting IRQ 5 as level-triggered
    ACPI: PCI Interrupt 0000:00:06.0[A] -> Link [LNK7] -> GSI 5 (level, low) -> IRQ 5
    ali_stimer_read: stimer is not ready.
    pci_hotplug: PCI Hot Plug PCI Core version: 0.5
    ali_stimer_read: stimer is not ready.
    ali_stimer_read: stimer is not ready.
    ali_stimer_read: stimer is not ready.
    rtc_cmos 00:02: rtc core: registered rtc_cmos as rtc0
    rtc0: alarms up to one month, y3k
    ali_stimer_read: stimer is not ready.
    input: PC Speaker as /class/input/input5
    usbcore: registered new interface driver hiddev
    input: Logitech USB-PS/2 Optical Mouse as /class/input/input6
    input: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:0b.1-2
    usbcore: registered new interface driver usbhid
    drivers/usb/input/hid-core.c: v2.6:USB HID core driver
    parport: PnPBIOS parport detected.
    parport0: PC-style at 0x378 (0x778), irq 7, dma 0 [PCSPP,TRISTATE,COMPAT,ECP,DMA]
    Synaptics Touchpad, model: 1, fw: 5.9, id: 0x236eb3, caps: 0x904713/0x10008
    input: SynPS/2 Synaptics TouchPad as /class/input/input7
    atkbd.c: Unknown key pressed (translated set 2, code 0xee on isa0060/serio0).
    atkbd.c: Use 'setkeycodes e06e <keycode>' to make it known.
    atkbd.c: Unknown key released (translated set 2, code 0xee on isa0060/serio0).
    atkbd.c: Use 'setkeycodes e06e <keycode>' to make it known.
    AC'97 1 does not respond - RESET
    AC'97 1 access is not valid [0xffffffff], removing mixer.
    ali mixer 1 creating error.
    Yenta: CardBus bridge found at 0000:00:0a.0 [0000:0000]
    Yenta: Using CSCINT to route CSC interrupts to PCI
    Yenta: Routing CardBus interrupts to PCI
    Yenta TI: socket 0000:00:0a.0, mfunc 0x01111112, devctl 0x64
    Yenta: ISA IRQ mask 0x0058, PCI irq 11
    Socket status: 30000006
    Device driver pcmcia_socket0 lacks bus and class support for being resumed.
    PCI driver parport_pc lacks driver specific resume support.
    ali15x3_smbus 0000:00:11.0: ALI15X3_smb region uninitialized - upgrade BIOS or use force_addr=0xaddr
    ali15x3_smbus 0000:00:11.0: ALI15X3 not detected, module not inserted.
    PCI driver ali15x3_smbus lacks driver specific resume support.
    PCI driver shpchp lacks driver specific resume support.
    shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
    Device driver i2c-0 lacks bus and class support for being resumed.
    PCI driver ali1535_smbus lacks driver specific resume support.
    lp0: using parport0 (interrupt-driven).
    cs: IO port probe 0x100-0x3af: excluding 0x200-0x207 0x220-0x22f 0x330-0x337 0x388-0x38f
    cs: IO port probe 0x3e0-0x4ff: clean.
    cs: IO port probe 0x820-0x8ff: clean.
    cs: IO port probe 0xc00-0xcf7: clean.
    cs: IO port probe 0xa00-0xaff: clean.
    ppdev: user-space parallel port driver
    ReiserFS: hda4: found reiserfs format "3.6" with standard journal
    ReiserFS: hda4: using ordered data mode
    ReiserFS: hda4: journal params: device hda4, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
    ReiserFS: hda4: checking transaction log (hda4)
    ReiserFS: hda4: Using r5 hash to sort names
    Adding 262576k swap on /dev/hda2. Priority:-1 extents:1 across:262576k
    NET: Registered protocol family 10
    lo: Disabled Privacy Extensions
    Mobile IPv6
    [drm] Initialized drm 1.1.0 20060810
    ACPI: PCI Interrupt Link [LNK0] enabled at IRQ 10
    ACPI: PCI Interrupt 0000:01:05.0[A] -> Link [LNK0] -> GSI 10 (level, low) -> IRQ 10
    [drm] Initialized radeon 1.25.0 20060524 on minor 0
    agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
    agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
    agpgart: Putting AGP V2 device at 0000:01:05.0 into 4x mode
    [drm] Setting GART location based on old memory map
    [drm] writeback test succeeded in 1 usecs
    ieee80211_crypt: registered algorithm 'NULL'
    ieee80211: 802.11 data/management/control stack, git-1.1.13
    ieee80211: Copyright (C) 2004-2005 Intel Corporation <[email protected]>
    bcm43xx driver
    ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
    pcmcia: Detected deprecated PCMCIA ioctl usage from process: lshwd.
    pcmcia: This interface will soon be removed from the kernel; please expect breakage unless you upgrade to new tools.
    pcmcia: see http://www.kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html for details.
    wlan0: no IPv6 routers present
    BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000
    printing eip:
    dca85843
    *pde = 00000000
    Oops: 0000 [#1]
    PREEMPT SMP
    Modules linked in: ohci_hcd bcm43xx ieee80211softmac ieee80211 ieee80211_crypt radeon drm ipv6 ext2 mbcache ppdev lp pcmcia i2c_ali1535 joydev rtc_sysfs snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device rtc_proc rtc_dev snd_pcm_oss snd_mixer_oss parport_pc usbhid hid pcspkr parport ff_memless rtc_cmos rtc_core rtc_lib yenta_socket psmouse serio_raw rsrc_nonstatic pcmcia_core shpchp i2c_ali15x3 i2c_core pci_hotplug snd_ali5451 snd_ac97_codec ac97_bus snd_pcm snd_timer snd soundcore snd_page_alloc tsdev ati_agp agpgart evdev thermal processor fan button battery ac ndiswrapper natsemi reiserfs ide_cd cdrom ide_disk uhci_hcd ehci_hcd usbcore generic alim15x3 ide_core
    CPU: 0
    EIP: 0060:[<dca85843>] Tainted: P VLI
    EFLAGS: 00010046 (2.6.21-suspend2 #1)
    EIP is at snd_ali_playback_prepare+0x193/0x200 [snd_ali5451]
    eax: 00002000 ebx: 00000000 ecx: 000010a0 edx: 000010f8
    esi: 0000000f edi: dac6506c ebp: dab482c0 esp: d3e0bd54
    ds: 007b es: 007b fs: 00d8 gs: 0033 ss: 0068
    Process artsd (pid: 4379, ti=d3e0a000 task=db7c2030 task.ti=d3e0a000)
    Stack: 00000000 00003fff 00000eb3 00000000 00000001 00000000 00000000 0000f000
    00000000 00000001 c0135c95 c03eebac 00000000 00000000 dac654f8 0000ac44
    dac65000 00000000 1a5f0000 00000eb3 dab482c0 00000002 dcaaa34c dab482c0
    Call Trace:
    [<c0135c95>] notifier_call_chain+0x25/0x30
    [<dca9bca9>] snd_pcm_do_prepare+0x9/0x20 [snd_pcm]
    [<dca9b90b>] snd_pcm_action_single+0x2b/0x60 [snd_pcm]
    [<dca9cb9b>] snd_pcm_action_nonatomic+0x6b/0x70 [snd_pcm]
    [<dca9f4fd>] snd_pcm_common_ioctl1+0x42d/0xf80 [snd_pcm]
    [<dca9f36e>] snd_pcm_common_ioctl1+0x29e/0xf80 [snd_pcm]
    [<c0106dc0>] do_IRQ+0x40/0x70
    [<dcaa2adc>] snd_pcm_hw_rule_add+0x8c/0x110 [snd_pcm]
    [<c0141a3a>] clocksource_get_next+0x3a/0x40
    [<c0131a79>] do_timer+0x239/0x810
    [<c013ccda>] remove_wait_queue+0x1a/0x50
    [<dcaa04b9>] snd_pcm_playback_ioctl1+0x39/0x430 [snd_pcm]
    [<dcaa0973>] snd_pcm_playback_ioctl+0x43/0x50 [snd_pcm]
    [<dcaa0930>] snd_pcm_playback_ioctl+0x0/0x50 [snd_pcm]
    [<c018e8fb>] do_ioctl+0x2b/0x90
    [<c018e9bc>] vfs_ioctl+0x5c/0x2a0
    [<c018ec72>] sys_ioctl+0x72/0x90
    [<c0104232>] sysenter_past_esp+0x5f/0x85
    =======================
    Code: 10 0f b7 c0 66 ef c7 44 24 4c 00 10 00 00 e9 f5 fe ff ff 90 8d 74 26 00 8b 44 24 40 89 da e8 05 e8 ff ff e9 e0 fe ff ff 8b 47 18 <8b> 15 00 00 00 00 a3 18 00 00 00 01 c0 a3 14 00 00 00 8b 4c 24
    EIP: [<dca85843>] snd_ali_playback_prepare+0x193/0x200 [snd_ali5451] SS:ESP 0068:d3e0bd54
    note: artsd[4379] exited with preempt_count 1
    BUG: scheduling while atomic: artsd/0x00000001/4379
    [<c0352823>] __sched_text_start+0x503/0x950
    [<c012dc39>] tasklet_action+0x49/0xc0
    [<c012d8a2>] __do_softirq+0x72/0xe0
    [<c012db8b>] irq_exit+0x5b/0x90
    [<c02cbfb1>] skb_dequeue+0x41/0x60
    [<c0353dbd>] __mutex_lock_slowpath+0x9d/0x280
    [<dca9ccba>] snd_pcm_drop+0x5a/0xe0 [snd_pcm]
    [<dca9cf0f>] snd_pcm_release_substream+0x1f/0x70 [snd_pcm]
    [<dca9cfaf>] snd_pcm_release+0x4f/0xb0 [snd_pcm]
    [<c01839b9>] __fput+0x99/0x170
    [<c0180d87>] filp_close+0x47/0x80
    [<c012a72f>] put_files_struct+0x8f/0xb0
    [<c012b8dd>] do_exit+0x11d/0x7d0
    [<c0120bf8>] __wake_up+0x38/0x50
    [<c01058e0>] do_trap+0x0/0xf0
    [<c011f4e4>] do_page_fault+0x2e4/0x630
    [<c011f200>] do_page_fault+0x0/0x630
    [<c03552ac>] error_code+0x7c/0x84
    [<dca85843>] snd_ali_playback_prepare+0x193/0x200 [snd_ali5451]
    [<c0135c95>] notifier_call_chain+0x25/0x30
    [<dca9bca9>] snd_pcm_do_prepare+0x9/0x20 [snd_pcm]
    [<dca9b90b>] snd_pcm_action_single+0x2b/0x60 [snd_pcm]
    [<dca9cb9b>] snd_pcm_action_nonatomic+0x6b/0x70 [snd_pcm]
    [<dca9f4fd>] snd_pcm_common_ioctl1+0x42d/0xf80 [snd_pcm]
    [<dca9f36e>] snd_pcm_common_ioctl1+0x29e/0xf80 [snd_pcm]
    [<c0106dc0>] do_IRQ+0x40/0x70
    [<dcaa2adc>] snd_pcm_hw_rule_add+0x8c/0x110 [snd_pcm]
    [<c0141a3a>] clocksource_get_next+0x3a/0x40
    [<c0131a79>] do_timer+0x239/0x810
    [<c013ccda>] remove_wait_queue+0x1a/0x50
    [<dcaa04b9>] snd_pcm_playback_ioctl1+0x39/0x430 [snd_pcm]
    [<dcaa0973>] snd_pcm_playback_ioctl+0x43/0x50 [snd_pcm]
    [<dcaa0930>] snd_pcm_playback_ioctl+0x0/0x50 [snd_pcm]
    [<c018e8fb>] do_ioctl+0x2b/0x90
    [<c018e9bc>] vfs_ioctl+0x5c/0x2a0
    [<c018ec72>] sys_ioctl+0x72/0x90
    [<c0104232>] sysenter_past_esp+0x5f/0x85
    =======================
    hwdetect --show-modules:
    AGP : agpgart ati-agp
    PATA : pata_ali ata_generic
    SCSI : st
    USB : usbcore ehci-hcd uhci-hcd
    NET : natsemi ieee80211 ieee80211_crypt ieee80211softmac bcm43xx
    INPUT : evdev ff-memless joydev pcspkr psmouse serio_raw tsdev usbhid
    PCMCIA : pcmcia_core rsrc_nonstatic yenta_socket
    SOUND : ac97_bus snd-mixer-oss snd-pcm-oss snd-page-alloc snd-pcm snd-timer snd snd-ac97-codec snd-ali5451 soundcore
    VIDEO : radeonfb fb_ddc
    OTHER : cdrom lp ppdev hid i2c-algo-bit i2c-ali1535 i2c-ali15x3 i2c-core parport parport_pc pci_hotplug shpchp rtc-cmos rtc-core rtc-dev rtc-lib rtc-proc rtc-sysfs
    Any help will be greatly appreciated.  Thanks in advance.
    Last edited by coolpyrofreak (2007-05-09 15:33:35)

    I seem to have the same problem. The sound would play in some programs, would not in others, and in all of them when I stop playing, it would repeat the last half second endlessly. Could anybody shed some light on this problem?
    in dmesg:
    AC'97 1 does not respond - RESET
    AC'97 1 access is not valid [0xffffffff], removing mixer.
    ali mixer 1 creating error.
    and in errors.log:
    May 13 09:14:22 aconarch ali15x3_smbus 0000:00:06.0: ALI15X3_smb region uninitialized - upgrade BIOS or use force_addr=0xaddr
    May 13 09:14:22 aconarch ali15x3_smbus 0000:00:06.0: ALI15X3 not detected, module not inserted.
    May 13 09:14:22 aconarch AC'97 1 access is not valid [0xffffffff], removing mixer.
    May 13 09:14:22 aconarch ali mixer 1 creating error.
    EDIT: 'lsmod | grep snd'
    snd_seq_oss 29056 0
    snd_seq_midi_event 6528 1 snd_seq_oss
    snd_seq 46800 4 snd_seq_oss,snd_seq_midi_event
    snd_seq_device 6796 2 snd_seq_oss,snd_seq
    snd_pcm_oss 38816 0
    snd_mixer_oss 14336 1 snd_pcm_oss
    snd_ali5451 19212 1
    snd_ac97_codec 95396 1 snd_ali5451
    ac97_bus 2432 1 snd_ac97_codec
    snd_pcm 68484 3 snd_pcm_oss,snd_ali5451,snd_ac97_codec
    snd_timer 19076 2 snd_seq,snd_pcm
    snd 44388 11 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_ali5451,snd_ac97_codec,snd_pcm,snd_timer
    soundcore 6496 1 snd
    snd_page_alloc 7816 1 snd_pcm
    Last edited by bender02 (2007-05-13 15:41:04)

  • Two problems with recent kernels - KMS resolution and fan speed

    Two issues have arisen since kernel26-2.6.32-6.  One is that that the boot process and all consoles only use approx. two-thirds of the screen, with the correct console font - as if the resolution is being detected as 800x600 rather than 1440x900.  The other, which may or may not be connected but also cropped up in that upgrade, is that my main laptop fan jumps to 100% speed near the start of booting, and stays there.  Downgrading to 2.6.32-5 solves both problems, which persist through to 2.6.32-9.  (That I normally boot into a custom kernel which I haven't bothered upgrading is why I've not tried to pin down the problem(s) until now.)  Any ideas of what might be going on?  I've got an Aspire 7730 with an Intel Mobile 4 chipset, using i915.

    Returning after another gap, still relying on a now-fairly-old kernel...
    eldragon wrote:
    chech if the svideo or tvout is being enabled.
    if there are more than one display enabled, the console will take the space of the smallest..
    This seems plausible - unfortunately, I don't have access to any external device to check directly what's happening - where should I look in logs or the file system to see what's happening?
    under i915, you have to pass to the kernel: video=VGA-1:off
    or whatever the display is.
    This, and VGA-0 or 2, make no difference.
    about the fan thing, if you can bisect that and report the commit that actually breaks your fan, they will probably fix it for future versions
    I've tried and failed, and so have resorted to posting a rather unhelpful bug report - http://bugs.archlinux.org/task/19017

  • Problems with New Kernel regarding mouse and random shutdowns etc

    After upgrading to kernel 3.2.1-2, my computer has shutdown a couple times. They "normal" shutdowns as in I will press the shutdown button in my de and computer actually shuts down. Also a couple times when turning my computer off i will have to reboot because my laptop touchpad is not working. going into a tty i do rmmod psmouse and it will say the module is not loaded, loading the module makes no difference. The last few updates I have also had regressions with my wireless. By default arch blocks my wireless and in rc.local I have rfkill unblock all, but this lately does not always work. I have been manually loading the ath9k driver. My laptop is a gateway nv79c, intel i5, onboard graphics, 4 gb of ram. My wireless card is an atheros ar928x. To be clear, the mouse problem and shutting down has started since updating to 3.2.1-2. Yes I know the kernel was just updated today but I have been using my laptop a lot today.
    Last edited by quasifilmie (2012-01-24 03:21:25)

    I seem to have the same problem. The sound would play in some programs, would not in others, and in all of them when I stop playing, it would repeat the last half second endlessly. Could anybody shed some light on this problem?
    in dmesg:
    AC'97 1 does not respond - RESET
    AC'97 1 access is not valid [0xffffffff], removing mixer.
    ali mixer 1 creating error.
    and in errors.log:
    May 13 09:14:22 aconarch ali15x3_smbus 0000:00:06.0: ALI15X3_smb region uninitialized - upgrade BIOS or use force_addr=0xaddr
    May 13 09:14:22 aconarch ali15x3_smbus 0000:00:06.0: ALI15X3 not detected, module not inserted.
    May 13 09:14:22 aconarch AC'97 1 access is not valid [0xffffffff], removing mixer.
    May 13 09:14:22 aconarch ali mixer 1 creating error.
    EDIT: 'lsmod | grep snd'
    snd_seq_oss 29056 0
    snd_seq_midi_event 6528 1 snd_seq_oss
    snd_seq 46800 4 snd_seq_oss,snd_seq_midi_event
    snd_seq_device 6796 2 snd_seq_oss,snd_seq
    snd_pcm_oss 38816 0
    snd_mixer_oss 14336 1 snd_pcm_oss
    snd_ali5451 19212 1
    snd_ac97_codec 95396 1 snd_ali5451
    ac97_bus 2432 1 snd_ac97_codec
    snd_pcm 68484 3 snd_pcm_oss,snd_ali5451,snd_ac97_codec
    snd_timer 19076 2 snd_seq,snd_pcm
    snd 44388 11 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_ali5451,snd_ac97_codec,snd_pcm,snd_timer
    soundcore 6496 1 snd
    snd_page_alloc 7816 1 snd_pcm
    Last edited by bender02 (2007-05-13 15:41:04)

  • Suspend to RAM with KMS enabled and ATI Radeon XPRESS 200M

    Per this thread, I added the file to /etc/X11/xorg.conf.d to disable glx in order to continue booting with 'nomodeset' to disable KMS after today's updates.  I've always had to boot with 'nomodeset' so that suspend/resume will work properly (I get a black screen/freeze on resume from suspend to ram). However, with this fix, my screen redraws are happening MUCH slower than before the update. Anyone have KMS enabled AND suspend/resume working with an:  ATI Technologies Inc Radeon XPRESS 200M 5955 (PCIE)?
    Thanks,
    Scott
    Last edited by firecat53 (2010-11-26 18:40:22)

    Ok, sorry for a delay -- long weekend...
    Suspend + KMS have been working starting sometimes in the 2.6.35 series.
    My guess as to why you can't suspend, is your BIOS/motherboard, nothing else.
    Anyway, here is the info:
    ~$ /usr/sbin/lspci
    00:00.0 Host bridge: ATI Technologies Inc RS480 Host Bridge (rev 01)
    00:01.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge
    00:13.0 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller
    00:13.1 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller
    00:13.2 USB Controller: ATI Technologies Inc IXP SB400 USB2 Host Controller
    00:14.0 SMBus: ATI Technologies Inc IXP SB400 SMBus Controller (rev 11)
    00:14.1 IDE interface: ATI Technologies Inc IXP SB400 IDE Controller
    00:14.3 ISA bridge: ATI Technologies Inc IXP SB400 PCI-ISA Bridge
    00:14.4 PCI bridge: ATI Technologies Inc IXP SB400 PCI-PCI Bridge
    00:14.5 Multimedia audio controller: ATI Technologies Inc IXP SB400 AC'97 Audio Controller (rev 02)
    00:14.6 Modem: ATI Technologies Inc SB400 AC'97 Modem Controller (rev 02)
    00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
    00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
    00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
    00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
    01:05.0 VGA compatible controller: ATI Technologies Inc Radeon XPRESS 200M 5955 (PCIE)
    05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
    05:02.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller (rev 02)
    05:09.0 CardBus bridge: Texas Instruments PCIxx21/x515 Cardbus Controller
    ~$ head /var/log/pm-suspend.log
    Initial commandline parameters: --quirk-dpms-suspend
    --quirk-dpms-on
    --quirk-vbestate-restore
    --quirk-vbemode-restore
    --quirk-vga-mode3
    --quirk-vbe-post
    Tue Nov 30 19:58:21 EST 2010: Running hooks for suspend.
    Running hook /usr/lib/pm-utils/sleep.d/00logging suspend suspend:
    Linux bluemoon 2.6.36-ARCH #1 SMP PREEMPT Wed Nov 24 06:44:11 UTC 2010 i686 Mobile AMD Sempron(tm) Processor 3000+ AuthenticAMD GNU/Linux
    /usr/lib/pm-utils/sleep.d/00logging suspend suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/00powersave suspend suspend:
    /usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/01grub suspend suspend:
    /usr/lib/pm-utils/sleep.d/01grub suspend suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/11netcfg suspend suspend:
    :: wlan_wpa_supplicant down [BUSY] [DONE]
    /usr/lib/pm-utils/sleep.d/11netcfg suspend suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend:
    /usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/75modules suspend suspend:
    Unloading kernel module b43...Done.
    /usr/lib/pm-utils/sleep.d/75modules suspend suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/90clock suspend suspend:
    /usr/lib/pm-utils/sleep.d/90clock suspend suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend:
    /usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/95led suspend suspend:
    /usr/lib/pm-utils/sleep.d/95led suspend suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend:
    Kernel modesetting video driver detected, not using quirks.
    /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/99video suspend suspend:
    kernel.acpi_video_flags = 0
    /usr/lib/pm-utils/sleep.d/99video suspend suspend: success.
    Tue Nov 30 19:58:24 EST 2010: performing suspend
    Tue Nov 30 20:57:03 EST 2010: Awake.
    Tue Nov 30 20:57:03 EST 2010: Running hooks for resume
    Running hook /usr/lib/pm-utils/sleep.d/99video resume suspend:
    /usr/lib/pm-utils/sleep.d/99video resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler resume suspend:
    /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/95led resume suspend:
    /usr/lib/pm-utils/sleep.d/95led resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/94cpufreq resume suspend:
    /usr/lib/pm-utils/sleep.d/94cpufreq resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/90clock resume suspend:
    /usr/lib/pm-utils/sleep.d/90clock resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/75modules resume suspend:
    Reloaded unloaded modules.
    /usr/lib/pm-utils/sleep.d/75modules resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/49bluetooth resume suspend:
    /usr/lib/pm-utils/sleep.d/49bluetooth resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/11netcfg resume suspend:
    :: wlan_wpa_supplicant up [BUSY] [DONE]
    /usr/lib/pm-utils/sleep.d/11netcfg resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/01grub resume suspend:
    /usr/lib/pm-utils/sleep.d/01grub resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/00powersave resume suspend:
    /usr/lib/pm-utils/sleep.d/00powersave resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/00logging resume suspend:
    /usr/lib/pm-utils/sleep.d/00logging resume suspend: success.
    Tue Nov 30 20:57:20 EST 2010: Finished.
    Kernel command line: root=/dev/disk/by-uuid/8d834d14-8413-481a-9f69-3fd20dc25773 ro radeon.modeset=1
    ~$ pacman -Q xf86-video-ati
    xf86-video-ati 6.13.2-2
    ~$ cat /etc/X11/xorg.conf
    Section "ServerLayout"
    Identifier "X.org Configured"
    Screen 0 "Screen0" 0 0
    EndSection
    Section "ServerFlags"
    Option "DontZap" "on"
    EndSection
    Section "Monitor"
    Identifier "LCD Panel"
    EndSection
    Section "Device"
    Identifier "Radeon XPress 200M"
    Driver "radeon"
    Option "EnablePageFlip" "on"
    Option "EXAPixmaps" "on"
    EndSection
    Section "Screen"
    Identifier "Screen0"
    Device "Radeon XPress 200M"
    Monitor "LCD Panel"
    EndSection

  • Am I the only one having a problem with the latest network manager?

    I mean, it's working, but once in a while it slows down heavily after a longer suspend-resume cycle. As in, it takes about half a minute before it even starts scanning. It started after the update yesterday or the day before. The systemd journal doesn't list any problems. I know how to setup wpa_supplicant manually and have used that kind of setup for a long time, I'm just wondering if this is a bug that needs tracking down.

    I have no issues with suspend-resume cycle with networkmanager.

  • Sound problems with lion

    I just installed Lion on my macbook pro core 2 due and my Headphones jack does not work! also my F11 and F12 keys (sound control keys) are disabled! I have tried changing Audio Midi format to 2ch-32bit but this does not work! when i restart it goes back on 2ch-24 bit.

    I tried the trick of plugging and unplugging the headphone, doesn't make any difference.
    I have been looking around and apparently there is a problem with the kernel!
    apparently apple is planning to release osx 10.7.2 skipping 10.7.1.
    if you are registered as a developer u can download the developer version. its around 92 mb. i have downloaded it and i will install it as soon as i am finished reading the code.
    I also hope they will sort out these problems asap.

  • Am I the only one with a problem with iMovie since the Mavericks update for Mac???

    My iMovie keeps freezing, causing my whole computer to freeze and all I can do is shut it down and then the whole project is gone when I open the computer again. It will say that I have 1 project or 2 projects or whatever but no projects show up? And if I create a new movie with the same name as the previous ones, it will say that the project already exists? This is the third time within 30 minutes I have to start all over with a project cause it just keeps freezing and I have to shut the whole thing down by pressing down the on/off button, cause its the only thing that does not freeze. It's frustrating, please help, anyone?

    I have no issues with suspend-resume cycle with networkmanager.

  • [Solved]no sound after suspend/resume after kernel 3.9.2 upgrade

    I don't know  what to provide to help solve this problem. Leave me messages.Thank you!
    Last edited by chu887 (2013-06-06 08:54:16)

    johni wrote:
    I got mine working!
    First I commented out the module parameter from my /etc/modprobe.d//intel-hda-audio.conf:
    #options snd-hda-intel model=dell-eq
    Since it works without that now, I will probably remove the file.
    Next, I went into alsamixer, and noticed a couple items not there before, turned down low:
    "Speaker", and two "HeadPhone" mixers, both turned down almost off.  I turned up the volume on the speaker, and was able to get sound from the speakers.   The same worked for the headphone entries (I have two headphone jacks).
    After I did this, it works better than before because I used to only have one working headphone jack.
    Also, I confirmed sound is still working after suspend/resume for me.
    Hopefully this will help one of you.
    Thanks,the problem has been resolved by downgrade.
    Sound is absolutely normal before I suspend/resume my system,  volume is normal, not too large,not too little. But there's no sound at all after resume it .  I guess it's probably to have something to do with our audio card - HDA intel,  my computer is also a dell laptop( dell 1420 , 2007/2008, really old ).
    My advice is : don't upgrade to kernel 3.9.2 ,it's an odd version( odd version is not stable).

  • Suspend to ram resume issue with Asrock Q1900-ITX

    Hi,
    I encountered a strange issue with suspend to ram while setting up a new small home server with an Asrock Q1900-ITX board. If I suspend the system and wake it within a few seconds everything works fine. However, if I wait a couple of minutes or even more, instead of resuming the system it takes a few seconds to think and then it reboots instead. It doesn't matter whether I resume via the power switch or with wake on lan. I tried several bios settings, the stock kernel as well as LTS and I even used an Ubuntu Live CD to check whether this is an arch issue. However, with the latter the system does not reboot it simply gets stuck. Power is on but nothing happens.
    What is strange though that it works on all these platforms if there are only a few seconds between suspend and resume. Any ideas?
    Best regards,
    Karsten

    I just bought an Asrock Q1900-ITX last month. It seems to have issues when rebooting that may be part of your problem.
    Overall the motherboard specs seem pretty good. It has 2x sata3, 2x rear usb3 ports, and an on board usb3 connector. The processor is an integrated quad core Celeron CPU  J1900  @ 1.99GHz. I have added a 4G stick of memory, a 10/100 usb2 Ethernet adapter, and a 64 G usb3 thumb drive. It runs a headless setup of Arch's Simple stateful firewall; replacing my ancient WRT54GL Linksys router/firewall. I power it using an old 20 pin picoPSU plugged into the 24 pin power connector. It only draws 10 watts of power at the wall outlet.
    There are a number of posts I found on the booting issue, including patches in the kernel mailing list, so hopefully better support will come soon. For me booting is at least consistent. I use the efi boot with csm bios option enabled. If I do a systemctl reboot the computer hangs after the grub loading kernel, initrd messages. Press the reset button and booting is successful. If I do a
    systemctl poweroff followed by a wake-on-lan the computer will boot normally.
    I thought at first the booting issue was because I had /boot/efi/EFI/boot/bootx64.efi and /boot/efi/EFI/arch_grub/archx64.efi files and the bios couldn't deal with that configuration; the bios would loose the 1st boot drive setting. I just went with only the /boot/efi/EFI/boot/bootx64.efi but still have the booting problem.
    To get the wol function working I think I had to change the legacy options in the bios. Sorry, I can't remember exactly what they were. After getting the wol working I tested the suspend to ram which worked fine. I am not sure is these legacy options would fix your suspend problems but maybe.  Could you check what journalctl -b -1 shows after you try to suspend to ram. Also do you run the nfs client? I had a problem with suspend on another computer that editing the nfsmount.conf file fixed.

  • Laptop mode tools problem with kernel 3.0

    today I just updated the system and my laptop runs dramatically hotter after that. I read the archwiki, it does talk about the laptop mode tools problem with kernel 3.0 but when I opened the file /usr/sbin/laptop_mode, the lines which the wiki mentions are not there. Does anyone here have the same problem and can you offer the solution?
    Here is my /usr/sbin/laptop_mode
    #! /bin/sh
    # Script to start or stop laptop_mode, and to control various settings of the
    # kernel, hardware etc. that influence power consumption.
    # This script is a part of Laptop Mode Tools. If you are running a supported
    # power management daemon, this script will be automatically called on power
    # state change.
    # Configure laptop mode tools in /etc/laptop-mode/laptop-mode.conf, and in
    # the broken-out config files in /etc/laptop-mode/conf.d.
    # Please consult the manual pages laptop-mode.conf(8) and laptop_mode(8) for
    # additional information.
    # Maintainer: Ritesh Raj Sarraf ([email protected])
    # Original Author: Bart Samwel ([email protected])
    # Project home page: http://samwel.tk/laptop_mode
    # Contributors to this script: Bart Samwel
    # Kiko Piris
    # Micha Feigin
    # Andrew Morton
    # Herve Eychenne
    # Dax Kelson
    # Jan Polacek
    # ... and many others that I've stopped
    # keeping track of.
    # Based on a script for Linux 2.4 written by Jens Axboe.
    set -a
    # The laptop mode tools version number. Extracted by the installer makefile
    # as well, so don't change the format!
    LMTVERSION=1.59
    # This script is loaded from multiple scripts to set the config defaults
    # and to read the configuration on top of those. Only when the command is
    # recognized does this script do anything else.
    VERBOSE_OUTPUT=0
    ENABLE_LAPTOP_MODE_ON_BATTERY=1
    ENABLE_LAPTOP_MODE_ON_AC=0
    ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=0
    PARTITIONS="auto /dev/mapper/*"
    LM_BATT_MAX_LOST_WORK_SECONDS=600
    LM_AC_MAX_LOST_WORK_SECONDS=360
    DEF_MAX_AGE=30
    LM_READAHEAD=3072
    NOLM_READAHEAD=128
    CONTROL_READAHEAD=1
    CONTROL_NOATIME=0
    USE_RELATIME=1
    CONTROL_HD_IDLE_TIMEOUT=1
    LM_AC_HD_IDLE_TIMEOUT=4 # 20 seconds
    LM_BATT_HD_IDLE_TIMEOUT=4 # 20 seconds
    NOLM_HD_IDLE_TIMEOUT=244 # 2 hours
    DEF_UPDATE=5
    DEF_XFS_AGE_BUFFER=15
    DEF_XFS_SYNC_INTERVAL=30
    DEF_XFS_BUFD_INTERVAL=1
    XFS_HZ=100
    CONTROL_MOUNT_OPTIONS=1
    BATT_HD_POWERMGMT=1
    LM_AC_HD_POWERMGMT=254
    NOLM_AC_HD_POWERMGMT=254
    CONTROL_HD_POWERMGMT=0
    CONTROL_HD_WRITECACHE=0
    NOLM_AC_HD_WRITECACHE=1
    NOLM_BATT_HD_WRITECACHE=0
    LM_HD_WRITECACHE=0
    LM_DIRTY_RATIO=60
    LM_DIRTY_BACKGROUND_RATIO=1
    NOLM_DIRTY_BACKGROUND_RATIO=10
    NOLM_DIRTY_RATIO=40
    LM_SECONDS_BEFORE_SYNC=2
    BATT_CPU_MAXFREQ=medium
    BATT_CPU_MINFREQ=slowest
    BATT_CPU_GOVERNOR=ondemand
    BATT_CPU_IGNORE_NICE_LOAD=1
    LM_AC_CPU_MAXFREQ=fastest
    LM_AC_CPU_MINFREQ=slowest
    LM_AC_CPU_GOVERNOR=ondemand
    LM_AC_CPU_IGNORE_NICE_LOAD=1
    NOLM_AC_CPU_MAXFREQ=fastest
    NOLM_AC_CPU_MINFREQ=slowest
    NOLM_AC_CPU_GOVERNOR=ondemand
    NOLM_AC_CPU_IGNORE_NICE_LOAD=0
    CONTROL_CPU_FREQUENCY=0
    HD="/dev/[hs]d[abcdefgh]"
    CONTROL_SYSLOG_CONF=0
    LM_AC_SYSLOG_CONF=/etc/syslog-on-ac-with-lm.conf
    NOLM_AC_SYSLOG_CONF=/etc/syslog-on-ac-without-lm.conf
    BATT_SYSLOG_CONF=/etc/syslog-on-battery.conf
    SYSLOG_CONF_SIGNAL_PROGRAM=syslogd
    SYSLOG_CONF=/etc/syslog.conf
    CONTROL_DPMS_STANDBY=0
    BATT_DPMS_STANDBY=300
    LM_AC_DPMS_STANDBY=1200
    NOLM_AC_DPMS_STANDBY=1200
    CONTROL_CPU_THROTTLING=0
    BATT_CPU_THROTTLING=medium
    LM_AC_CPU_THROTTLING=minimum
    NOLM_AC_CPU_THROTTLING=minimum
    CONTROL_START_STOP=1
    CONTROL_TERMINAL=0
    TERMINALS="/dev/vc/1 /dev/vcs1"
    BATT_TERMINAL_BLANK_MINUTES=1
    BATT_TERMINAL_POWERDOWN_MINUTES=2
    LM_AC_TERMINAL_BLANK_MINUTES=10
    LM_AC_TERMINAL_POWERDOWN_MINUTES=10
    NOLM_AC_TERMINAL_BLANK_MINUTES=10
    NOLM_AC_TERMINAL_POWERDOWN_MINUTES=50
    ENABLE_AUTO_HIBERNATION=0
    HIBERNATE_COMMAND=/usr/sbin/hibernate
    AUTO_HIBERNATION_ON_CRITICAL_BATTERY_LEVEL=1
    DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL=1
    AUTO_HIBERNATION_BATTERY_CHARGE_MAH=0
    AUTO_HIBERNATION_BATTERY_CHARGE_MWH=0
    MINIMUM_BATTERY_CHARGE_MAH=0
    MINIMUM_BATTERY_CHARGE_MWH=0
    ASSUME_SCSI_IS_SATA=1
    CONTROL_BRIGHTNESS=0
    BATT_BRIGHTNESS_COMMAND=false
    LM_AC_BRIGHTNESS_COMMAND=false
    NOLM_AC_BRIGHTNESS_COMMAND=false
    LOG_TO_SYSLOG=1
    DEBUG=0
    ENABLE_LAPTOP_MODE_TOOLS=1
    # Initialize the PATH Variable
    export PATH="${PATH}":/bin:/sbin:/usr/bin:/usr/sbin
    # This is a 2 phase locking approach. LMT_REQ_LOCK is the outer lock and LMT_INVOC_LOCK is the inner lock
    # We take this approach to ensure the scenario that, "At any point when an event occurs (AC/BATT), the
    # kernel can generate multiple events spanning over a couple of events. The first event is honored and
    # lmt executes. If the last event triggered at the 9th second, there is a fair chance that a good amount
    # of state change would have occured in the OS, to honor that state, we keep an outer lock (LMT_REQ_LOCK)
    # handy, so that those changes can also be applied and not forgotten.
    # Workflow:
    # Event-1 is generated and lmt executes (lmt runtime could span 5-10 seconds)
    # At seventh second, 4 events generate. But Event-1 is still running.
    # We don't want to discard all the remaining 4 events, but at least honor 1 so that we can act to the changes
    # that occured in the last 7 seconds.
    # So, Event-2 acquire LMT_REQ_LOCK and waits to acquire LMT_INVOC_LOCK (which is acquire by Event-1)
    LMT_REQ_LOCK="/var/lock/lmt-req.lock"
    LMT_INVOC_LOCK="/var/lock/lmt-invoc.lock"
    FLOCK=`which flock`
    checkint ()
    # $1 arg should be the string/integer
    # that you want to check for as an integer.
    echo $1 | grep "[^0-9]" > /dev/null 2>&1
    return $?;
    # Returns 1 if it is an integer
    # Function to handle logging
    LOGGER=`which logger`;
    log ()
    # $1 should be msg type
    # $2 should be the real msg
    if [ x$LOG_TO_SYSLOG = x1 ]; then
    # NOTE: Add the check on $2 being empty, once you are confident
    # that there aren't any bugs in logging. And no bugs in executing
    # modules and logging
    if [ -x $LOGGER -a "$1" != "STATUS" ]; then
    #if [ -z $2 ]; then
    # continue
    #elif [ "$1" = "MSG" ]; then
    if [ "$1" = "MSG" ]; then
    logger -p daemon.info -t laptop-mode "$2";
    elif [ "$1" = "ERR" ]; then
    logger -p daemon.err -t laptop-mode "$2";
    elif [ "$1" = "VERBOSE" ]; then
    if [ x$VERBOSE_OUTPUT = x1 ]; then
    logger -p daemon.debug -t laptop-mode "$2";
    fi
    else
    logger -p daemon.notice -t laptop-mode "$2";
    fi
    fi
    fi
    if [ "$1" = "VERBOSE" ]; then
    $LM_VERBOSE && echo "$2" >/dev/fd/2;
    elif [ "$1" = "ERR" ]; then
    echo "$2" >/dev/fd/2;
    else
    # Message of type MSG and STATUS can go to stdout.
    echo "$2" >/dev/fd/1;
    fi
    enableDebug ()
    # Check if debug is enabled
    if [ x$(($(basename $1 | cut -d . -f1 | tr "[:lower:]" "[:upper:]" | sed 's/-/_/g')_DEBUG)) = x1 ]; then
    set -vx
    fi
    disableDebug ()
    # Check if debug is enabled
    if [ x$(($(basename $1 | cut -d . -f1 | tr "[:lower:]" "[:upper:]" | sed 's/-/_/g')_DEBUG)) = x1 ]; then
    set +vx
    fi
    # No default on these ones -- we need to detect if they have been set, for
    # backward compatibility with MINIMUM_BATTERY_MINUTES etc.
    AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT=
    MINIMUM_BATTERY_CHARGE_PERCENT=
    # Backward compatibility variable that is sometimes
    # set externally (Debian init system)
    unset VERBOSE
    lmt_load_config ()
    # Source config. Some config settings have been moved from the main config file
    # to modular configuration files, and to support existing laptop-mode.conf
    # files from earlier versions, we source the modular configuration files FIRST.
    if [ -d /etc/laptop-mode/conf.d ] ; then
    for CONF in /etc/laptop-mode/conf.d/*.conf ; do
    if [ -r "$CONF" ] ; then
    . "$CONF"
    #Handle individual module debug settings
    if [ "$DEBUG" -eq 1 ]; then
    export $(basename $CONF | cut -d . -f1 | tr "[:lower:]" "[:upper:]" | sed 's/-/_/g')_DEBUG=1
    log "VERBOSE" "Enabling debug mode for module $CONF"
    fi
    DEBUG=0
    else
    log "MSG" "Warning: Configuration file $CONF is not readable, skipping."
    fi
    done
    fi
    if [ -r /etc/laptop-mode/laptop-mode.conf ] ; then
    . /etc/laptop-mode/laptop-mode.conf
    else
    log "ERR" "$0: Configuration file /etc/laptop-mode/laptop-mode.conf not present or not readable."
    exit 1
    fi
    if [ x$ENABLE_LAPTOP_MODE_TOOLS = x0 ]; then
    log "MSG" "laptop-mode-tools is disabled in config file. Exiting"
    exit 0;
    fi
    # Add a simple bash debug mode switch
    if [ "$DEBUG" -eq 1 ]; then
    set -vx;
    fi
    # Support for old config settings
    if [ "$AC_HD" != "" ] ; then
    AC_HD_WITHOUT_LM="$AC_HD"
    AC_HD_WITH_LM="$AC_HD"
    fi
    if [ "$VERBOSE" != "" ] ; then
    VERBOSE_OUTPUT="$VERBOSE"
    fi
    if [ "$CPU_MAXFREQ" != "" ] ; then
    BATT_CPU_MAXFREQ="$CPU_MAXFREQ"
    fi
    if [ "$MAX_AGE" != "" ] ; then
    LM_BATT_MAX_LOST_WORK_SECONDS="$MAX_AGE"
    LM_AC_MAX_LOST_WORK_SECONDS="$MAX_AGE"
    fi
    if [ "$DEF_AGE" != "" ] ; then
    DEF_MAX_AGE="$DEF_AGE"
    fi
    if [ "$LAPTOP_MODE_ALWAYS_ON" != "" ] ; then
    ENABLE_LAPTOP_MODE_ALWAYS="$LAPTOP_MODE_ALWAYS_ON"
    fi
    if [ "$LM_WHEN_LID_CLOSED" != "" ] ; then
    ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED="$LM_WHEN_LID_CLOSED"
    fi
    if [ "$REMOUNT_PARTITIONS" != "" ] ; then
    PARTITIONS="$REMOUNT_PARTITIONS"
    fi
    if [ "$READAHEAD" != "" ] ; then
    LM_READAHEAD="$READAHEAD"
    fi
    if [ "$DO_REMOUNT_NOATIME" != "" ] ; then
    CONTROL_NOATIME="$DO_REMOUNT_NOATIME"
    fi
    if [ "$DO_HD" != "" ] ; then
    CONTROL_HD_IDLE_TIMEOUT="$DO_HD"
    fi
    if [ "$AC_HD_WITH_LM" != "" ] ; then
    LM_AC_HD_IDLE_TIMEOUT="$AC_HD_WITH_LM"
    fi
    if [ "$AC_HD_WITHOUT_LM" != "" ] ; then
    NOLM_HD_IDLE_TIMEOUT="$AC_HD_WITHOUT_LM"
    fi
    if [ "$BATT_HD" != "" ] ; then
    LM_BATT_HD_IDLE_TIMEOUT="$BATT_HD"
    fi
    if [ "$DO_REMOUNTS" != "" ] ; then
    CONTROL_MOUNT_OPTIONS="$DO_REMOUNTS"
    fi
    if [ "$DO_HD_POWERMGMT" != "" ] ; then
    CONTROL_HD_POWERMGMT="$DO_HD_POWERMGMT"
    fi
    if [ "$AC_HDPARM_POWERMGMT_WITH_LM" != "" ] ; then
    LM_AC_HD_POWERMGMT="$AC_HDPARM_POWERMGMT_WITH_LM"
    fi
    if [ "$AC_HDPARM_POWERMGMT_WITHOUT_LM" != "" ] ; then
    NOLM_AC_HD_POWERMGMT="$AC_HDPARM_POWERMGMT_WITHOUT_LM"
    fi
    if [ "$BATT_HDPARM_POWERMGMT" != "" ] ; then
    BATT_HD_POWERMGMT="$BATT_HDPARM_POWERMGMT"
    fi
    if [ "$DO_WRITECACHE" != "" ] ; then
    CONTROL_HD_WRITECACHE="$DO_WRITECACHE"
    fi
    if [ "$AC_WRITECACHE_WITHOUT_LM" != "" ] ; then
    NOLM_AC_HD_WRITECACHE="$AC_WRITECACHE_WITHOUT_LM"
    fi
    if [ "$BATT_WRITECACHE" != "" ] ; then
    LM_HD_WRITECACHE="$BATT_WRITECACHE"
    fi
    if [ "$DIRTY_RATIO" != "" ]; then
    LM_DIRTY_RATIO="$DIRTY_RATIO"
    fi
    if [ "$DIRTY_BACKGROUND_RATIO" != "" ] ; then
    LM_DIRTY_BACKGROUND_RATIO="$DIRTY_BACKGROUND_RATIO"
    fi
    if [ "$DEF_DIRTY_RATIO" != "" ]; then
    NOLM_DIRTY_RATIO="$DEF_DIRTY_RATIO"
    fi
    if [ "$DEF_DIRTY_BACKGROUND_RATIO" != "" ] ; then
    NOLM_DIRTY_BACKGROUND_RATIO="$DEF_DIRTY_BACKGROUND_RATIO"
    fi
    if [ "$DO_CPU" != "" ] ; then
    CONTROL_CPU_FREQUENCY="$DO_CPU"
    fi
    if [ "$CONTROL_CPU_MAXFREQ" != "" ] ; then
    CONTROL_CPU_FREQUENCY="$CONTROL_CPU_MAXFREQ"
    fi
    if [ "$AC_CPU_MAXFREQ_WITH_LM" != "" ] ; then
    LM_AC_CPU_MAXFREQ="$AC_CPU_MAXFREQ_WITH_LM"
    fi
    if [ "$AC_CPU_MAXFREQ_WITHOUT_LM" != "" ] ; then
    NOLM_AC_CPU_MAXFREQ="$AC_CPU_MAXFREQ_WITHOUT_LM"
    fi
    if [ "$DO_SYSLOG" != "" ] ; then
    CONTROL_SYSLOG_CONF="$DO_SYSLOG"
    fi
    if [ "$SYSLOG_SIGNAL_PROGRAM" != "" ] ;then
    SYSLOG_CONF_SIGNAL_PROGRAM="$SYSLOG_SIGNAL_PROGRAM"
    fi
    if [ "$AC_SYSLOG_WITH_LM" != "" ] ; then
    LM_AC_SYSLOG_CONF="$AC_SYSLOG_WITH_LM"
    fi
    if [ "$AC_SYSLOG_WITHOUT_LM" != "" ] ; then
    NOLM_AC_SYSLOG_CONF="$AC_SYSLOG_WITHOUT_LM"
    fi
    if [ "$BATT_SYSLOG" != "" ] ; then
    BATT_SYSLOG_CONF="$BATT_SYSLOG"
    fi
    if [ "$ENABLE_LAPTOP_MODE_ALWAYS" != "" ] ; then
    ENABLE_LAPTOP_MODE_ON_AC="$ENABLE_LAPTOP_MODE_ALWAYS"
    fi
    if [ "$MINIMUM_BATTERY_MINUTES" != "" -a "$MINIMUM_BATTERY_CHARGE_PERCENT" = "" ] ; then
    # Use a very conservative estimate (1% = 1 battery minute, 100 minutes in a battery)
    # for backward compatibility.
    MINIMUM_BATTERY_CHARGE_PERCENT="$MINIMUM_BATTERY_MINUTES"
    fi
    if [ -z "$MINIMUM_BATTERY_CHARGE_PERCENT" ] ; then
    # Apply the default, now that we've determined that this is the minimum.
    MINIMUM_BATTERY_CHARGE_PERCENT=3
    fi
    if [ "$AUTO_HIBERNATION_BATTERY_MINUTES" != "" -a "$AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT" = "" ] ; then
    # Use a very conservative estimate (1% = 1 battery minute, 100 minutes in a battery)
    # for backward compatibility.
    AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT="$AUTO_HIBERNATION_BATTERY_MINUTES"
    fi
    if [ -z "$AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT" ] ; then
    # Apply the default, now that we've determined that this is the minimum.
    AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT=2
    fi
    # Postprocessing
    if [ "$VERBOSE_OUTPUT" -ne 0 ] ; then
    OUTPUT="/dev/stdout"
    LM_VERBOSE="[ 1 = 1 ]"
    else
    OUTPUT="/dev/null"
    LM_VERBOSE="[ 1 = 0 ]"
    fi
    if [ "$PARTITIONS" = "" ] ; then
    PARTITIONS="auto /dev/mapper/*"
    fi
    # Expand shell wild cards immediately.
    PARTITIONS=$( echo $PARTITIONS )
    TERMINALS=$( echo $TERMINALS )
    # Convert seconds to hdparm -S format
    # Everything over 20 minutes is interpreted as 2 hours.
    seconds_to_hdparm_S() {
    if [ "$1" -eq 0 ] ; then
    # disable.
    echo 0
    elif [ "$1" -gt 0 -a "$1" -lt 5 ] ; then
    # 5 seconds minimum
    echo 1
    elif [ "$1" -le $((240*5)) ] ; then
    # Values between 1 and 240 signify increments of 5 seconds
    echo $(($1 / 5))
    elif [ "$1" -lt $((30*60)) ] ; then
    # Values between 20 and 30 minutes are rounded up to 30 minutes.
    echo 241
    elif [ "$1" -lt $((12*30*60)) ] ; then
    # Values between 30 minutes and 6 hours (exclusive) yield values between
    # 241 and 251, in 30-minute increments.
    echo $(( 240 + ($1 / (30*60)) ))
    else
    # Larger values effectively indicate no timeout at all.
    echo 0
    fi
    # Convert configured idle timeouts to hdparm -S format.
    if [ "$LM_AC_HD_IDLE_TIMEOUT_SECONDS" != "" ] ; then
    LM_AC_HD_IDLE_TIMEOUT=$(seconds_to_hdparm_S $LM_AC_HD_IDLE_TIMEOUT_SECONDS)
    fi
    if [ "$LM_BATT_HD_IDLE_TIMEOUT_SECONDS" != "" ] ; then
    LM_BATT_HD_IDLE_TIMEOUT=$(seconds_to_hdparm_S $LM_BATT_HD_IDLE_TIMEOUT_SECONDS)
    fi
    if [ "$NOLM_HD_IDLE_TIMEOUT_SECONDS" != "" ] ; then
    NOLM_HD_IDLE_TIMEOUT=$(seconds_to_hdparm_S $NOLM_HD_IDLE_TIMEOUT_SECONDS)
    fi
    # The main workhorse.
    lmt_main_function ()
    if [ "$1" = "status" ] ; then
    # Display a status report.
    log "STATUS" "Mounts:"
    mount | sed "s/^/ /"
    log "STATUS" " "
    log "STATUS" "Drive power status:"
    for disk in $HD; do
    if [ -r $disk ]; then
    hdparm -C $disk 2>/dev/null | sed "s/^/ /"
    else
    log "STATUS" " Cannot read $disk, permission denied - $0 needs to be run as root"
    fi
    done
    log "STATUS" " "
    log "STATUS" "(NOTE: drive settings affected by Laptop Mode cannot be retrieved.)"
    log "STATUS" " "
    log "STATUS" "Readahead states:"
    cat /etc/mtab | while read DEV MP FST OPTS DUMP PASS ; do
    # skip funny stuff
    case "$FST" in
    rootfs|unionfs|tmpfs|squashfs|sysfs|usbfs|proc|devpts) continue
    esac
    if [ -b $DEV ] ; then
    if [ -r $DEV ] ; then
    log "STATUS" " $DEV: $((`blockdev --getra $DEV` / 2)) kB"
    else
    log "STATUS" " Cannot read $DEV, permission denied - $0 needs to be run as root"
    fi
    fi
    done
    log "STATUS" " "
    if [ -e /var/run/laptop-mode-tools/enabled ] ; then
    log "STATUS" "Laptop Mode Tools is allowed to run: /var/run/laptop-mode-tools/enabled exists."
    else
    log "STATUS" "Laptop Mode Tools is NOT allowed to run: /var/run/laptop-mode-tools/enabled does not exist."
    fi
    log "STATUS" " "
    STATFILES="/proc/sys/vm/laptop_mode /proc/apm /proc/pmu/info /proc/sys/vm/bdflush /proc/sys/vm/dirty_ratio /proc/sys/fs/xfs/age_buffer /proc/sys/fs/xfs/sync_interval /proc/sys/fs/xfs/lm_age_buffer /proc/sys/fs/xfs/lm_sync_interval /proc/sys/vm/pagebuf/lm_flush_age /proc/sys/fs/xfs/xfsbufd_centisecs /proc/sys/fs/xfs/xfssyncd_centisecs /proc/sys/vm/dirty_background_ratio /proc/sys/vm/dirty_expire_centisecs /proc/sys/fs/xfs/age_buffer/centisecs /proc/sys/vm/dirty_writeback_centisecs /sys/devices/system/cpu/*/cpufreq/cpuinfo_*_freq /sys/devices/system/cpu/*/cpufreq/scaling_governor /proc/acpi/button/lid/*/state /proc/acpi/ac_adapter/*/state /proc/acpi/battery/*/state /sys/class/power_supply/*/online /sys/class/power_supply/*/state"
    for THISFILE in $STATFILES ; do
    if [ -e "$THISFILE" ] ; then
    log "STATUS" "$THISFILE:"
    if [ -r "$THISFILE" ] ; then
    cat "$THISFILE" | sed "s/^/ /"
    else
    log "STATUS" " Not accessible, permission denied - $0 needs to be run as root."
    fi
    log "STATUS" " "
    fi
    done
    elif [ "$1" != "readconfig" -a "$1" != "defaults" ] ; then
    KLEVEL="$(uname -r |
    IFS='.-' read a b c
    echo $a.$b
    KMINOR="$(uname -r |
    IFS='.-' read a b c d
    # Strip any stuff from the end -- only the initial digits are part of the KMINOR.
    echo $c | sed -e 's/\([[:digit:]]*\).*/\1/'
    # Stop exporting everything -- what we do from here is private.
    set +a
    if [ "$1" = "--version" ] ; then
    log "MSG" "Laptop Mode Tools $LMTVERSION"
    exit 0
    fi
    if [ ! -e /proc/sys/vm/laptop_mode ] ; then
    log "ERR" "Kernel does not have support for laptop mode. Please apply the laptop mode"
    log "ERR" "patch or install a newer kernel."
    exit 1
    fi
    if [ ! -w /proc/sys/vm/laptop_mode ] ; then
    log "ERR" "You do not have enough privileges to enable laptop_mode."
    exit 1
    fi
    INIT=0 # Display info in init script format?
    FORCE=0 # Force reapplying the current state?
    while [ "$1" != "" ] ; do
    case "$1" in
    init) INIT=1 ;;
    force) FORCE=1 ;;
    # Old options. We always do "auto" for any option now, but
    # we still have to accept the options.
    start) ;;
    stop) ;;
    auto) ;;
    modules=*)
    MODULES=$1
    MODULES=${MODULES#"modules="}
    devices=*)
    DEVICES=$1
    DEVICES=${DEVICES#"devices="}
    *) log "ERR" "Unrecognized option $1."
    exit 1 ;;
    esac
    shift
    done
    mkdir -p /var/run/laptop-mode-tools
    # Used to display laptop mode state later on. This is the enabled/disabled
    # state for laptop mode processing, it tells us nothing about whether laptop
    # mode is actually _active_.
    STATE=enabled
    if [ "$ENABLE_LAPTOP_MODE_ON_BATTERY" -eq 0 -a "$ENABLE_LAPTOP_MODE_ON_AC" -eq 0 -a "$ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED" -eq 0 ] ; then
    STATE=disabled
    fi
    # Determine the power state.
    # First try /sys/class/power_supply/*
    FOUND_SYS_CLASS_POWER_SUPPLY_AC=0
    ON_AC=0
    for POWER_SUPPLY in /sys/class/power_supply/* ; do
    if [ -f $POWER_SUPPLY/type ] ; then
    if [ "$(cat $POWER_SUPPLY/type)" = "Mains" ] ;then
    log "VERBOSE" "Determining power state from $POWER_SUPPLY/online."
    FOUND_SYS_CLASS_POWER_SUPPLY_AC=1
    if [ "$(cat $POWER_SUPPLY/online)" = 1 ] ; then
    ON_AC=1
    fi
    fi
    fi
    done
    if [ $FOUND_SYS_CLASS_POWER_SUPPLY_AC = 1 ] ; then
    # Already found it!
    log "VERBOSE" "Not trying other options, already found a power supply."
    elif [ -d /proc/acpi/ac_adapter ] ; then
    log "VERBOSE" "Determining power state from /proc/acpi/ac_adapter."
    ADAPTERS_FOUND=0
    ON_AC=0
    for ADAPTER in /proc/acpi/ac_adapter/* ; do
    if [ -f $ADAPTER/state ] ; then
    ADAPTERS_FOUND=1
    STATUS=`awk '/^state: / { print $2 }' $ADAPTER/state`
    if [ "$STATUS" = "on-line" ] ; then
    ON_AC=1
    fi
    fi
    done
    if [ "$ADAPTERS_FOUND" -eq 0 ] ; then
    ON_AC=1
    fi
    elif [ -f /proc/pmu/info ] ; then
    log "VERBOSE" "Determining power state from /proc/pmu/info."
    if ( grep -q "^AC Power.*0$" /proc/pmu/info ) ; then
    log "VERBOSE" "/proc/pmu/info indicates absence of AC power."
    ON_AC=0
    else
    # It is possible that there is no AC Power = 1 in the file,
    # but we always assume AC power when we're not sure.
    ON_AC=1
    log "VERBOSE" "/proc/pmu/info indicates presence of AC power."
    fi
    elif [ -f /proc/apm ] ; then
    log "VERBOSE" "Determining power state from /proc/apm."
    read D1 D2 D3 APM_AC_STATE D0 </proc/apm
    if [ "$APM_AC_STATE" = "0x00" ] ; then
    ON_AC=0
    else
    ON_AC=1
    fi
    else
    log "VERBOSE" "No /sys/class/power_supply, ACPI, APM or PMU power management information found -- assuming AC power is present."
    ON_AC=1
    fi
    # Determine whether to activate or deactivate laptop mode.
    ACTIVATE=0
    if [ "$ON_AC" -eq 1 ] ; then
    if [ "$ENABLE_LAPTOP_MODE_ON_AC" -ne 0 ] ; then
    log "VERBOSE" "On AC power: Activating, because ENABLE_LAPTOP_MODE_ON_AC is set."
    ACTIVATE=1
    else
    log "VERBOSE" "On AC power: Deactivating, because ENABLE_LAPTOP_MODE_ON_AC is not set."
    ACTIVATE=0
    fi
    else
    if [ "$ENABLE_LAPTOP_MODE_ON_BATTERY" -ne 0 ] ; then
    log "VERBOSE" "On battery power: Activating, because ENABLE_LAPTOP_MODE_ON_BATTERY is set."
    ACTIVATE=1
    else
    log "VERBOSE" "On battery power: Deactivating, because ENABLE_LAPTOP_MODE_ON_BATTERY is not set."
    ACTIVATE=0
    fi
    fi
    if [ "$ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED" -ne 0 -a "$ACTIVATE" -eq 0 ] ; then
    if [ -x "`which hal-find-by-property`" ] ; then
    HAL_LID_BUTTON=$(hal-find-by-property --key "button.type" --string "lid")
    fi
    if [ "$HAL_LID_BUTTON" != "" ] ; then
    HAL_LID_BUTTON_STATE=$(hal-get-property --udi $(hal-find-by-property --key "button.type" --string "lid") --key "button.state.value")
    if [ "$HAL_LID_BUTTON_STATE" = "true" ] ; then
    log "VERBOSE" "Setting action to \"start\" because the lid is closed (says HAL)."
    ACTIVATE=1
    fi
    elif [ -f /proc/acpi/button/lid/*/state ] ; then
    if ( grep -q "closed" /proc/acpi/button/lid/*/state ) ; then
    log "VERBOSE" 'Setting action to "start" because the lid is closed (says /proc/acpi/button/lid/*/state).'
    ACTIVATE=1
    fi
    else
    log "MSG" "Warning: ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED is set, but there is no file"
    log "MSG" "/proc/acpi/button/lid/.../state, and hal information is not available either!"
    fi
    fi
    # If the init script has not been run or has been run with the "stop"
    # argument, then we should never start laptop mode.
    if [ ! -f /var/run/laptop-mode-tools/enabled ] ; then
    log "VERBOSE" "Laptop mode disabled because /var/run/laptop-mode-tools/enabled is missing."
    STATE=disabled
    fi
    if [ "$ACTIVATE" -eq 1 -a -f /etc/default/laptop-mode ] ; then
    . /etc/default/laptop-mode
    if ! ( echo "$ENABLE_LAPTOP_MODE" |grep y ) ; then
    log "VERBOSE" "Not starting laptop mode because it is disabled in /etc/default/laptop-mode."
    STATE=disabled
    fi
    fi
    if [ "$STATE" = "disabled" ] ; then
    ACTIVATE=0
    fi
    # Check whether we are allowed to activate the data-loss-sensitive stuff.
    # If the battery charge is too low, we want to disable this, but not the
    # other power-saving stuff.
    if [ "$ACTIVATE" -eq 0 ] ; then
    ACTIVATE_WITH_POSSIBLE_DATA_LOSS=0
    elif [ "$ON_AC" = 1 ] ; then
    log "VERBOSE" "On AC, not checking minimum battery charge."
    ACTIVATE_WITH_POSSIBLE_DATA_LOSS=1
    else
    ACTIVATE_WITH_POSSIBLE_DATA_LOSS=1
    ENOUGH_CHARGE=0
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=0
    # Weird way of checking that /sys/class/power_supply is not empty -- but it works.
    if [ "$(echo /sys/class/power_supply/*)" != '/sys/class/power_supply/*' ] ; then
    log "VERBOSE" "Not on AC and we have battery information in /sys/class/power_supply/BAT* -- checking minimum battery charge."
    for BATT in /sys/class/power_supply/* ; do
    BATT_TYPE=$(cat $BATT/type)
    log "VERBOSE" "$BATT is of type $BATT_TYPE."
    if [ "$BATT_TYPE" != "Battery" ] ; then
    log "VERBOSE" "Not of type \"Battery\", skipping."
    else
    PREV_ENOUGH_CHARGE=$ENOUGH_CHARGE
    PREV_ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=$ENOUGH_CHARGE_TO_PREVENT_HIBERNATION
    log "VERBOSE" "Checking levels for $BATT."
    PRESENT=$(cat $BATT/present)
    log "VERBOSE" "Present: $PRESENT."
    # Only do if the battery is present
    if [ "$PRESENT" -eq 1 ] ; then
    FOUND_AN_ENABLED_CHECK=0
    FOUND_AN_ENABLED_HIBERNATION_CHECK=0
    # Get the remaining capacity.
    IN_UAH=0
    IN_UWH=0
    if [ -f $BATT/charge_now ] ; then
    REMAINING=$(cat $BATT/charge_now)
    IN_UAH=1 # charge_* is in microAmpere-hours
    elif [ -f $BATT/energy_now ] ; then
    REMAINING=$(cat $BATT/energy_now)
    IN_UWH=1 # energy_* is in microWatt-hours
    else
    REMAINING=0
    fi
    if [ -z "$REMAINING" -o "$REMAINING" -eq 0 ] ; then
    log "VERBOSE" "Battery does not report remaining charge. Perhaps it is not present?"
    REMAINING=0
    fi
    log "VERBOSE" "Remaining charge: $REMAINING"
    if [ -f $BATT/charge_full_design ] ; then
    CAPACITY=$(cat $BATT/charge_full_design)
    elif [ -f $BATT/energy_full_design ] ; then
    CAPACITY=$(cat $BATT/energy_full_design)
    else
    CAPACITY=0
    fi
    if [ -z "$CAPACITY" -o "$CAPACITY" -eq 0 ] ; then
    log "VERBOSE" "Battery does not report design full charge, using non-design full charge."
    if [ -f $BATT/charge_full ] ; then
    CAPACITY=$(cat $BATT/charge_full)
    elif [ -f $BATT/energy_full_design ] ; then
    CAPACITY=$(cat $BATT/energy_full)
    else
    CAPACITY=0
    fi
    if [ -z "$CAPACITY" -o "$CAPACITY" -eq 0 ] ; then
    log "VERBOSE" "Battery does not report non-design full charge."
    CAPACITY=0
    fi
    fi
    log "VERBOSE" "Full capacity: $CAPACITY"
    # Check the charge percentage
    if [ "$MINIMUM_BATTERY_CHARGE_PERCENT" -ne 0 ] ; then
    FOUND_AN_ENABLED_CHECK=1
    if [ "$CAPACITY" -eq 0 ] ; then
    log "MSG" "WARNING: Battery does not report a capacity. Minimum battery"
    log "MSG" "charge checking does not work without a design capacity."
    ENOUGH_CHARGE=1
    elif [ "$(($REMAINING * 100 / $CAPACITY))" -ge "$MINIMUM_BATTERY_CHARGE_PERCENT" ] ; then
    ENOUGH_CHARGE=1
    fi
    fi
    if [ "$AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT" -ne 0 ] ; then
    FOUND_AN_ENABLED_HIBERNATION_CHECK=1
    if [ "$CAPACITY" -eq 0 ] ; then
    log "MSG" "WARNING: Battery does not report a design capacity. Auto hibernation"
    log "MSG" "does not work without a design capacity."
    ENOUGH_CHARGE=1
    elif [ "$(($REMAINING * 100 / $CAPACITY))" -ge "$AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT" ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    fi
    fi
    # $BATT/alarm is the design_capacity_warning of a battery.
    ALARM_LEVEL=$(cat $BATT/alarm)
    if [ "$ALARM_LEVEL" -ne 0 ] ; then
    if [ "$REMAINING" -le "$ALARM_LEVEL" ] ; then
    # Restore the state we had before checking this battery, so that
    # this battery does not count as having enough charge.
    ENOUGH_CHARGE=$PREV_ENOUGH_CHARGE
    elif [ "$FOUND_AN_ENABLED_CHECK" -eq 0 ] ; then
    # This is the only check that is enabled. In that case a non-critical
    # battery level counts as "enough". (If we would count non-critical
    # battery levels as enough *always*, then the other settings would
    # have no effect; this is only a final fallback.)
    ENOUGH_CHARGE=1
    fi
    fi
    if [ "$AUTO_HIBERNATION_ON_CRITICAL_BATTERY_LEVEL" -ne 0 ] ; then
    if [ "$REMAINING" -le "$ALARM_LEVEL" ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=$PREV_ENOUGH_CHARGE_TO_PREVENT_HIBERNATION
    elif [ "$FOUND_AN_ENABLED_HIBERNATION_CHECK" -eq 0 ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    fi
    fi
    # Fallback: hard values
    if [ "$IN_UAH" -ne 0 ] ; then
    if [ "$MINIMUM_BATTERY_CHARGE_MAH" -ne 0 ] ; then
    FOUND_AN_ENABLED_CHECK=1
    if [ "$REMAINING" -ge $((1000*"$MINIMUM_BATTERY_CHARGE_MAH")) ] ; then
    ENOUGH_CHARGE=1
    fi
    fi
    if [ "$AUTO_HIBERNATION_BATTERY_CHARGE_MAH" -ne 0 ] ; then
    FOUND_AN_ENABLED_HIBERNATION_CHECK=1
    if [ "$REMAINING" -ge $((1000*"$AUTO_HIBERNATION_BATTERY_CHARGE_MAH")) ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    fi
    fi
    elif [ "$IN_UWH" -ne 0 ] ; then
    if [ "$MINIMUM_BATTERY_CHARGE_MWH" -ne 0 ] ; then
    FOUND_AN_ENABLED_CHECK=1
    if [ "$REMAINING" -ge $((1000*"$MINIMUM_BATTERY_CHARGE_MWH")) ] ; then
    ENOUGH_CHARGE=1
    fi
    fi
    if [ "$AUTO_HIBERNATION_BATTERY_CHARGE_MWH" -ne 0 ] ; then
    FOUND_AN_ENABLED_HIBERNATION_CHECK=1
    if [ "$REMAINING" -ge $((1000*"$AUTO_HIBERNATION_BATTERY_CHARGE_MWH")) ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    fi
    fi
    else
    log "ERR" "Failed to determine battery charge. Battery charge units are not in"
    log "ERR" "mWh, uWh, mAh or uAh."
    fi
    else
    log "VERBOSE" "Battery is not present."
    fi
    fi
    done
    elif [ "$(echo /proc/acpi/battery/*)" != '/proc/acpi/battery/*' ] ; then
    log "VERBOSE" "Not on AC and we have batteries in /proc/acpi/battery -- checking minimum battery charge."
    for BATT in /proc/acpi/battery/* ; do
    PREV_ENOUGH_CHARGE=$ENOUGH_CHARGE
    PREV_ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=$ENOUGH_CHARGE_TO_PREVENT_HIBERNATION
    BATT_STATE=$BATT/state
    BATT_INFO=$BATT/info
    log "VERBOSE" "Checking info and state for $BATT."
    # Only do if the battery is present
    if ( grep -q 'present:.*yes' $BATT_INFO ) ; then
    FOUND_AN_ENABLED_CHECK=0
    FOUND_AN_ENABLED_HIBERNATION_CHECK=0
    # Get the remaining capacity.
    REMAINING=`grep "remaining capacity:" $BATT_STATE | sed "s/.* \([0-9][0-9]* \).*/\1/" `
    if [ -z "$REMAINING" ] ; then
    log "VERBOSE" "Battery does not report remaining charte. Perhaps it is not present?"
    REMAINING=0
    fi
    log "VERBOSE" "Remaining charge: $REMAINING"
    CAPACITY=`grep "design capacity:" $BATT_INFO | sed "s/.* \([0-9][0-9]* \).*/\1/" `
    if [ -z "$CAPACITY" ] ; then
    log "VERBOSE" "Battery does not report capacity. Perhaps it is not present?"
    CAPACITY=0
    fi
    log "VERBOSE" "Design capacity: $CAPACITY"
    # Check the charge percentage
    if [ "$MINIMUM_BATTERY_CHARGE_PERCENT" -ne 0 ] ; then
    FOUND_AN_ENABLED_CHECK=1
    if [ "$CAPACITY" -eq 0 ] ; then
    log "MSG" "WARNING: Battery does not report a design capacity. Minimum battery"
    log "MSG" "charge checking does not work without a design capacity."
    ENOUGH_CHARGE=1
    elif [ "$(($REMAINING * 100 / $CAPACITY))" -ge "$MINIMUM_BATTERY_CHARGE_PERCENT" ] ; then
    ENOUGH_CHARGE=1
    fi
    fi
    if [ "$AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT" -ne 0 ] ; then
    FOUND_AN_ENABLED_HIBERNATION_CHECK=1
    if [ "$CAPACITY" -eq 0 ] ; then
    log "MSG" "WARNING: Battery does not report a design capacity. Auto hibernation"
    log "MSG" "does not work without a design capacity."
    ENOUGH_CHARGE=1
    elif [ "$(($REMAINING * 100 / $CAPACITY))" -ge "$AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT" ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    fi
    fi
    # Fallback: hard values.
    # Determine the reporting unit.
    IN_MAH=0
    IN_MWH=0
    if ( grep -q mWh $BATT_INFO ) ; then
    IN_MWH=1
    elif ( grep -q mAh $BATT_INFO ) ; then
    IN_MAH=1
    fi
    if [ "$IN_MAH" -ne 0 ] ; then
    if [ "$MINIMUM_BATTERY_CHARGE_MAH" -ne 0 ] ; then
    FOUND_AN_ENABLED_CHECK=1
    if [ "$REMAINING" -ge "$MINIMUM_BATTERY_CHARGE_MAH" ] ; then
    ENOUGH_CHARGE=1
    fi
    fi
    if [ "$AUTO_HIBERNATION_BATTERY_CHARGE_MAH" -ne 0 ] ; then
    FOUND_AN_ENABLED_HIBERNATION_CHECK=1
    if [ "$REMAINING" -ge "$AUTO_HIBERNATION_BATTERY_CHARGE_MAH" ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    fi
    fi
    elif [ "$IN_MWH" -ne 0 ] ; then
    if [ "$MINIMUM_BATTERY_CHARGE_MWH" -ne 0 ] ; then
    FOUND_AN_ENABLED_CHECK=1
    if [ "$REMAINING" -ge "$MINIMUM_BATTERY_CHARGE_MWH" ] ; then
    ENOUGH_CHARGE=1
    fi
    fi
    if [ "$AUTO_HIBERNATION_BATTERY_CHARGE_MWH" -ne 0 ] ; then
    FOUND_AN_ENABLED_HIBERNATION_CHECK=1
    if [ "$REMAINING" -ge "$AUTO_HIBERNATION_BATTERY_CHARGE_MWH" ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    fi
    fi
    else
    log "ERR" "Failed to determine battery charge. Battery charge units are not in"
    log "ERR" "mWh or mAh."
    fi
    CAP_STATE=`sed -r 's/^capacity state:\s*(.*)\s*$/\1/;t;d' "$BATT_STATE"`
    if [ "$DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL" -ne 0 ] ; then
    if [ "$CAP_STATE" = "critical" ] ; then
    # Restore the state we had before checking this battery, so that
    # this battery does not count as having enough charge.
    ENOUGH_CHARGE=$PREV_ENOUGH_CHARGE
    elif [ "$FOUND_AN_ENABLED_CHECK" -eq 0 ] ; then
    # This is the only check that is enabled. In that case a non-critical
    # battery level counts as "enough". (If we would count non-critical
    # battery levels as enough *always*, then the other settings would
    # have no effect; this is only a final fallback.)
    ENOUGH_CHARGE=1
    fi
    fi
    if [ "$AUTO_HIBERNATION_ON_CRITICAL_BATTERY_LEVEL" -ne 0 ] ; then
    if [ "$CAP_STATE" = "critical" ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=$PREV_ENOUGH_CHARGE_TO_PREVENT_HIBERNATION
    elif [ "$FOUND_AN_ENABLED_HIBERNATION_CHECK" -eq 0 ] ; then
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    fi
    fi
    else
    log "VERBOSE" "Battery is not present."
    fi
    done
    else
    ENOUGH_CHARGE=1
    ENOUGH_CHARGE_TO_PREVENT_HIBERNATION=1
    log "VERBOSE" "Not on AC and could not check battery state -- data loss sensitive features stay enabled and auto-hibernation will not work."
    fi
    if [ "$ENABLE_AUTO_HIBERNATION" -ne 0 -a "$ENOUGH_CHARGE_TO_PREVENT_HIBERNATION" -eq 0 ] ; then
    log "VERBOSE" "None of the batteries have a charge above the auto-hibernation level."
    log "VERBOSE" "Starting hibernation."
    if [ -x $HIBERNATE_COMMAND ]; then
    $HIBERNATE_COMMAND
    elif [ -f /sys/power/state ]; then
    grep -q disk /sys/power/state && echo disk > /sys/power/state
    fi
    # Don't continue -- if things are configured correctly, then we
    # will be called on resume.
    exit 0
    fi
    if [ "$ENOUGH_CHARGE" -eq 0 ] ; then
    log "VERBOSE" "None of the batteries have a charge above the minimum level."
    log "VERBOSE" "Deactivating data loss sensitive features."
    ACTIVATE_WITH_POSSIBLE_DATA_LOSS=0
    fi
    fi
    if [ "$INIT" -eq 0 ] ; then
    log "MSG" "Laptop mode "
    fi
    # WAS_ACTIVE is used later on. If there is no /var/run/laptop-mode-tools/state, then
    # we know that laptop mode wasn't active before.
    WAS_ACTIVE=0
    log "VERBOSE" "Checking if desired state is different from current state."
    if [ -f /var/run/laptop-mode-tools/state ] ; then
    read WAS_ACTIVE WAS_ON_AC WAS_ACTIVATE_WITH_POSSIBLE_DATA_LOSS WAS_STATE < /var/run/laptop-mode-tools/state
    if [ "$WAS_STATE" != "" ] ; then
    if [ "$WAS_ACTIVE" -eq "$ACTIVATE" -a "$WAS_ON_AC" -eq "$ON_AC" -a "$WAS_ACTIVATE_WITH_POSSIBLE_DATA_LOSS" -eq "$ACTIVATE_WITH_POSSIBLE_DATA_LOSS" -a "$WAS_STATE" = "$STATE" -a "$FORCE" -eq 0 ] ; then
    log "MSG" "$STATE, "
    if [ "$WAS_ACTIVE" -eq 1 ] ; then
    log "MSG" "active [unchanged]"
    if [ "$ACTIVATE_WITH_POSSIBLE_DATA_LOSS" -eq 0 ] ; then
    log "MSG" " (Data-loss sensitive features disabled.)"
    fi
    else
    log "MSG" "not active [unchanged]"
    fi
    exit 0
    fi
    fi
    else
    log "VERBOSE" "/var/run/laptop-mode-tools/state does not exist, no previous state."
    fi
    echo "$ACTIVATE $ON_AC $ACTIVATE_WITH_POSSIBLE_DATA_LOSS $STATE" > /var/run/laptop-mode-tools/state
    if [ "$ACTIVATE" -eq 1 ] ; then
    log "MSG" "$STATE, active"
    if [ "$ACTIVATE_WITH_POSSIBLE_DATA_LOSS" -eq 0 ] ; then
    log "MSG" " (Data-loss sensitive features disabled.)"
    fi
    else
    log "MSG" "$STATE, not active"
    fi
    # Finally, call laptop-mode-tools modules. The modules can use the settings
    # from the config files, but they may NOT assume the settings actually exist,
    # as no defaults have been given for them.
    # Note that the /usr/local/lib path is deprecated.
    export FORCE STATE ON_AC ACTIVATE ACTIVATE_WITH_POSSIBLE_DATA_LOSS KLEVEL KMINOR WAS_ACTIVE LM_VERBOSE DEVICES
    for SCRIPT in /usr/share/laptop-mode-tools/modules/* /usr/local/lib/laptop-mode-tools/modules/* /usr/local/share/laptop-mode-tools/modules/* /etc/laptop-mode/modules/* ; do
    if [ -z "$MODULES" ] ; then
    # If a module list has not been provided, execute all modules
    EXECUTE_SCRIPT=1
    else
    # If a module list has been provided, execute only the listed
    # modules.
    EXECUTE_SCRIPT=0
    for MODULE in $MODULES; do
    # Attempt to remove the module name from the end of the
    # full script path. If the module name matches the
    # script, the name will be removed from the end of the
    # full file path, leaving the path to the script. If
    # there was not a match made, the module name would not
    # be removed from the path, and $PATH_TO_SCRIPT would
    # be the same as $SCRIPT.
    PATH_TO_SCRIPT=${SCRIPT%%$MODULE}
    # Execute the script if a match was found (module name
    # was removed from the script path, making it shorter.
    if [ $PATH_TO_SCRIPT != $SCRIPT ] ; then
    EXECUTE_SCRIPT=1
    fi
    done
    fi
    if [ -x "$SCRIPT" -a $EXECUTE_SCRIPT -eq 1 ] ; then
    log "VERBOSE" "Invoking module $SCRIPT."
    SCRIPT_DEBUG=$SCRIPT; # We do this because in start-stop-programs module a $SCRIPT variable is used. That
    # changes the whole meaning when passed to disableDebug ()
    enableDebug $SCRIPT_DEBUG;
    . $SCRIPT
    disableDebug $SCRIPT_DEBUG;
    else
    log "VERBOSE" "Module $SCRIPT is not executable or is to be skipped."
    fi
    done
    exit 0
    # This fi closes the if for "readconfig". If I would have indented this one
    # I would have indented the whole file. :)
    fi
    lmt_load_config
    lock_retry ()
    ( $FLOCK -n -x -w 1 8 || exit 0;
    i=10;
    while [ $i -ge 1 ]
    do
    log "ERR" "Couldn't acquire lock. Retrying.... PID is $$\n"
    $FLOCK -x -w 1 9 && lmt_main_function "$@" && break;
    i=$(( $i - 1 ))
    done
    ) 8>$LMT_REQ_LOCK
    # Check and acquire locks and then exec.
    ( $FLOCK -n -x -w 1 8; ) 8>$LMT_REQ_LOCK
    ($FLOCK -n -x -w 1 9 && lmt_main_function "$@";) || lock_retry "$@"
    ) 9<>$LMT_INVOC_LOCK
    # We do a special run of battery polling daemon here so that it does not get
    # plagued by the lock. We need the polling daemon to be independent of any locks
    if [ x$ENABLE_BATTERY_LEVEL_POLLING = x1 ] && [ x$BLACKLIST_IN_FLOCK = x1 ]; then
    log "VERBOSE" "Battery level polling is enabled."
    if [ x$ON_AC = x1 ] ; then
    log "VERBOSE" "On AC, stopping the polling daemon."
    # In AC mode we disable the polling daemon.
    killall -q lm-polling-daemon
    else
    if ! pidof -x lm-polling-daemon ; then
    log "VERBOSE" "On battery and there was no polling daemon yet, starting the polling daemon."
    # If there is no polling daemon, we start one.
    /usr/share/laptop-mode-tools/module-helpers/lm-polling-daemon < /dev/null > /dev/null 2> /dev/null &
    fi
    fi
    else
    log "VERBOSE" "Battery level polling is disabled."
    fi
    exit 0;
    and here is the lines which archwiki mentions
    case "$KLEVEL" in
    "2.4" ) ;;
    "2.6" ) ;;
    log "ERR" "Unhandled kernel version: $KLEVEL ('uname -r' = '$(uname -r)')" >&2
    exit 1
    esac

    I had the problem but edited the line in /usr/sbin/laptop_mode and it worked. But thoes lines are not there anymore. I guess they changed it at the recent update of laptop-mode-tools.
    Regarding your heat problem; is there any other thing you use to cut down power usage (from AUR  maybe)? I use acpi_call from AUR had to edit lines there aswell, but it should be updated by now.

  • K8t Neo2 problem with resume from standby after BIOS flash

    Previously while using the 3.2 BIOS and a Winchester 3200+, Both Standby and hibernation worked perfectly almost without fail.  Since I flashed the BIOS to 9.3 and installed an X2 4200+ I have had a problem with resume from standby.  The machine starts up OK but the 2nd processor core (cpu1) is almost maxed out and stays that way.  Task manager shows total cpu load as about 45-50% (all on cpu1) but shows no running process using any cpu load, just the usual System Idle process at about 99%.  The only way to get it back down to normal again seems to be to reboot.  By Contrast Hibernation works fine, with no increase in cpu load after resume.  I have all the latest MS patch's installed (I think!) the AMD dual core driver and the MS and AMD dual core optimizers.  Any ideas what is going on?

    Noticed last night that S! standby seems to work OK.  Also was experimenting with a fresh windows install on a spare hard drive (checking on another problem).  The fresh windows install appeared to work with S4 hibernation, so it looks like that is the answer to that problem.  However the problem with high cpu load on the second core after resume from S3 suspend to RAM standby was still present.  This problem is so specific and so repeatable (it does it every time without fail), that I feel there must be some very well defined reason for it.  Unfortunately I have no ideas what could be wrong. Have now tried Windows re-install, latest cpu drivers, AMD dual core optimizer, MS dual core optimizer, Cool'n'quite disabled/enabled, and various others and suspend to RAM still gives the same behaviour

Maybe you are looking for

  • HR-ABAP

    Hi I have done HR  reports,but i didnt use logical databases. I used HR tables,results table,technical wage types and displayed output. Is it mandatory to use Logical databases?what is PNP and PNCP? where do we use these PNP and PNCP?in se37?or in pr

  • Is there any function module which gives open invoices &open amount?

    Hello All, I want to use function module which gives open invoices with open amount. I know 'CUSTOMER_OPEN_ITEMS'  'BAPI_AR_ACC_GETOPENITEMS' function which gives open invoices but does not give open amount. Can anyone help me to find such function?

  • Trying to do an Insert but ADF framework is tryng to do Update

    I have JSF create screen where the user wants to either fill out all the fields on the page and then save them, or select a record from a select list and have all the fields from the selected record copied into the create screens fields. When the use

  • Problem in Direct Deposit Delete Screen

    Hi , We are using ECC 6.0 Ehp 3 version of the ESS. We are using the standard Direct Deposit iView to facilidate the end users to enter their banking information. When we want delete the Other Bank account Information, in the review screen Account Ty

  • JSP-BPM Process-Web Service interaction

    Hi all I am new to Oracle bpm studio. I am having one very important question. I want to understand the JSP-BPM-Webservice interaction in Oracle BPM studio BPM Process, as we have an enterprise application having servlets, ejbs, etc, for these servle