From owner-freebsd-acpi@FreeBSD.ORG Wed Jun 24 06:09:13 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03C311065690 for ; Wed, 24 Jun 2009 06:09:13 +0000 (UTC) (envelope-from freebsdusb@bindone.de) Received: from mail.bindone.de (mail.bindone.de [80.190.134.51]) by mx1.freebsd.org (Postfix) with SMTP id 71BDB8FC1E for ; Wed, 24 Jun 2009 06:09:12 +0000 (UTC) (envelope-from freebsdusb@bindone.de) Received: (qmail 89080 invoked by uid 89); 24 Jun 2009 06:09:11 -0000 Received: from unknown (HELO ufo.bindone.de) (mg@bindone.de@87.152.167.13) by mail.bindone.de with ESMTPA; 24 Jun 2009 06:09:11 -0000 Message-ID: <4A41C2CF.4020205@bindone.de> Date: Wed, 24 Jun 2009 08:08:15 +0200 From: Michael User-Agent: Thunderbird 2.0.0.17pre (X11/20090202) MIME-Version: 1.0 To: "Paul B. Mahol" References: <4A3E1784.2050406@bindone.de> <3a142e750906232257y4b1e255en9374c05079f04520@mail.gmail.com> In-Reply-To: <3a142e750906232257y4b1e255en9374c05079f04520@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: Two new acpi modules, acpi_wmi and acpi_hp X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2009 06:09:13 -0000 Paul B. Mahol wrote: > On 6/21/09, Michael wrote: >> Hello, >> >> I wrote two new acpi modules last year and finally found the time to fix >> them, add some missing features and write man pages. >> >> This is the first time I'm writing kernel code for FreeBSD, so please >> excuse me if I failed to apply to all style conventions (I tried to >> follow style(9) as closely as possible). >> >> acpi_wmi is an ACPI to WMI mapping driver (this is used by HP and Acer >> notebooks and potentially others), so this could also be used to >> implement additional drivers on (see for more details on WMI and ACPI: >> http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx). >> It provides /dev/wmistat, example output: >> cat /dev/wmistat >> GUID INST EXPE METH STR EVENT OID >> {5FB7F034-2C63-45E9-BE91-3D44E2C707E4} 1 NO WMAA NO NO AA >> {95F24279-4D7B-4334-9387-ACCDC67EF61C} 1 NO NO NO 0x80+ - >> {2B814318-4BE8-4707-9D84-A190A859B5D0} 1 NO NO NO 0xA0 - >> {05901221-D566-11D1-B2F0-00A0C9062910} 1 NO NO NO NO AB >> {1F4C91EB-DC5C-460B-951D-C7CB9B4B8D5E} 1 NO WMBA NO NO BA >> {2D114B49-2DFB-4130-B8FE-4A3C09E75133} 57 NO NO NO NO BC >> {988D08E3-68F4-4C35-AF3E-6A1B8106F83C} 20 NO NO NO NO BD >> {14EA9746-CE1F-4098-A0E0-7045CB4DA745} 1 NO NO NO NO BE >> {322F2028-0F84-4901-988E-015176049E2D} 2 NO NO NO NO BF >> {8232DE3D-663D-4327-A8F4-E293ADB9BF05} 0 NO NO NO NO BG >> {8F1F6436-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BH >> {8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI >> >> acpi_hp is a driver that uses acpi_wmi to provide HP specific features. >> These include: >> - Activate/deactivate WLAN >> - Activate/deactivate WWAN >> - Activate/deactivate Bluetooth >> - Auto activate/deactiavte based on hw radio status >> - Devd notifications >> - On air status for different >> - Controls ambient light sensor >> - Get docking status >> - Read BIOS settings through /dev/hpcmi, example output: >> Flash Media Reader Disable >> USB Ports including Express Card slot Enable >> 1394 Port Enable >> Cardbus Slot Disable >> Express Card Slot Disable >> F9, F10 and F12 Delay(Sec) 0 >> USB Device Detection Delay (Sec) 0 >> Multiboot Enable >> Express Boot Popup Delay(Sec) 0 >> CD-ROM Boot Enable >> Floppy Boot Disable >> Internal Network Adapter Boot Disable >> Internal Network Adapter Boot Mode PXE >> Swap Fn/Ctrl Key Disable >> USB Legacy Support Disable >> Parallel Port Mode ECP >> ... >> >> The man pages included in the patch (man acpi_hp / man acpi_wmi) give >> you detailed information about all sysctls and devices. >> >> The patch attached (acpi_wmi_and_acpi_hp.patch) has been tested against >> 7.2-RELEASE and everything compiles cleanly, although my tests have been >> on 8-CURRENT (but the snapshot is older than 7.2), so I expect this to >> work ok on 7.2. The patch might fail against CURRENT though, this is why >> I also attached patches.tgz, which contains individual patches per file. >> I only tested this on i386 and the patch only changes i386 specific >> things (I have no idea if this could possibly work on amd64, especially >> because all the other acpi_support modules seem to be i386 only). Also >> note, that I could only test this on my own machine (HP Compaq 8510p), >> which features WLAN/BT/WLAN, so I don't know if the readings will be >> sane if your machine doesn't feature a WWAN chip. In theory this should >> work for many different HP models. >> >> Installation instructions (replace MYKERNEL with your kernel name): >> >> mkdir /usr/src/sys/modules/acpi/acpi_wmi >> mkdir /usr/src/sys/modules/acpi/acpi_hp >> patch -d /usr/src < acpi_wmi_and_acpi_hp.patch >> cd /usr/src/share/man/man4/man4.i386 >> make all && make install >> cd /usr/src/sys/i386/conf >> config MYKERNEL >> cd ../compile/MYKERNEL >> make cleandepend && make depend >> make all >> make install >> reboot >> . >> . >> . >> kldload acpi_hp >> cat /dev/wmistat >> sysctl -a | grep acpi_hp.0 >> sysctl dev.acpi_hp.0.als = 0 >> cat /dev/hpcmi >> sysctl dev.acpi_hp.0.cmi_detail=7 >> cat /dev/hpcmi >> >> It would be nice to get some feedback on this and maybe someone else can >> implement vendor specific ACPI modules for other WMI based laptops now. > > I tested committed version on 8.0. > What about making following verbose device_printfs optional: > Wireless status is 0xXXXX , (new_wlan_status is 0xXXXX), > (new_wwan_status is 0xXXXX) > > > # cat /dev/hpcmi > > doesn't show Enabled/Disabled/Values. > What does cat /dev/hpcmi show on your system? Did you try modifying dev.acpi_hp.0.cmi_detail (see man acpi_hp(4))? What is in /var/log/messages when loading the driver?