Lid switch don't work on hp NC6000 laptop

Bug #321153 reported by bellanano73
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
acpi (Ubuntu)
New
Undecided
Unassigned

Bug Description

Regardless of whether my laptop lid is open or closed, I always get this:

root@peace:/etc/acpi# cat /proc/acpi/button/lid/*/state
state: open

This is the reason why when i close lid, my lcd monitor is still live.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 8.10
LsUsb:
 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 002 Device 003: ID 093a:2510 Pixart Imaging, Inc.
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Package: linux-image-2.6.27-11-generic 2.6.27-11.24
ProcCmdLine: root=UUID=8d02540e-976c-4b5d-971a-5d0c42d138df ro splash
ProcEnviron:
 PATH=/home/username/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=it_IT.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.27-11.24-generic
SourcePackage: linux
UnreportableReason: Questo non è un pacchetto Ubuntu genuino

Tags: apport-bug
Revision history for this message
bellanano73 (martino-ronchi) wrote :
Revision history for this message
Summer Sun (sunnycamel) wrote :

I think this issue is cause by some bug in the BIOS of HP laptop.
The OS control the hardware by running some AML(ACPI machine language) code in the BIOS, but some bug prevent the lid switch from working properly.
To solve this issue we have 3 choice:
1. Block the video.ko by adding a line in the /etc/modprobe.d/blacklist as below:
    blacklist video
   The drawback of this method is that you will lose some function provide by the acpi/video, such like the notification of display switch, brightness change etc.
2. modify the kernel code and re-compile it:
    find the video.c in the drivers/acpi directory in the kernel source tree, open it. Find the code as below:
                static int acpi_video_bus_start_devices(struct acpi_video_bus *video)
               {
                         return acpi_video_bus_DOS(video, 0, 0);
                }
   change it to :
            static int acpi_video_bus_start_devices(struct acpi_video_bus *video)
            {
                         return acpi_video_bus_DOS(video, 1, 0);
             }
    Then re-compile and install the modified kernel and modules, after rebooting you will find that the lid switch works.
3. Export the DSDT of the laptop, modify it and override it in the kernell:
     I don't think this is a good method. The DSDT is different from computer to computer, so maybe my hack to the DSDT is not suitble for you.

Revision history for this message
Summer Sun (sunnycamel) wrote :

Don't forget to comment out the lines below in the /etc/init.d/hotkey-setup
do_video () {
    VIDEO=`xorg_driver`
    case $VIDEO in
        intel|ati|radeon)
            for x in /proc/acpi/video/*/DOS; do
                if [ -e "$x" ]; then
                    echo -n 7 >$x;
                fi
            done
        ;;
    esac
}

The DOS valude can be 0-7, but in my hp laptop only 0 and 1 can work. With DOS = 1 the BIOS will do every thing and no notification to the OS. With DOS = 0 the BIOS will alway notify the OS, but do nothing himself. If we set the DOS to 0 then we need some write some script in the /etc/acpi to handle the video switch event.

Revision history for this message
Mark (mark-ale8) wrote :

I have an HP NC4400 which is basically the 12.1" screen version of the NC6000 running kubuntu. I found that doing "echo 0 > /proc/acpi/video/C085/DOS" fixes my issue with the lid switch not responding. Ideally there should be a better fix than this though. I'd be glad to assist with any help needed. I have past experience working on ACPI/DSDT on other laptops. This bug is affecting many many many people as this line of notebooks is very popular.

Revision history for this message
MNLipp (mnl) wrote :

I can confirm the problem for nc6000 and ubuntu 10.04.

It helps to put

echo 0 > /proc/acpi/video/C0D1/DOS

into rc.local. (Found this in the net, haven't got the slightest idea what it does.)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.