From owner-freebsd-current@FreeBSD.ORG Sat Jul 6 18:59:53 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 557FF95E for ; Sat, 6 Jul 2013 18:59:53 +0000 (UTC) (envelope-from matthias@d2ux.net) Received: from mail.s1.d2ux.org (static.209.96.9.5.clients.your-server.de [5.9.96.209]) by mx1.freebsd.org (Postfix) with ESMTP id D1C7A105C for ; Sat, 6 Jul 2013 18:59:52 +0000 (UTC) Received: from mail.s1.d2ux.org (mail [10.0.0.3]) by mail.s1.d2ux.org (Postfix) with ESMTP id 9775784F25D6 for ; Sat, 6 Jul 2013 20:59:50 +0200 (CEST) Received: from mail.s1.d2ux.org ([10.0.0.3]) by mail.s1.d2ux.org (mail.s1.d2ux.org [10.0.0.3]) (amavisd-new, port 10024) with ESMTP id 4uqMvRPqeLjL for ; Sat, 6 Jul 2013 20:59:48 +0200 (CEST) Received: from [192.168.2.112] (p5DDABB71.dip0.t-ipconnect.de [93.218.187.113]) by mail.s1.d2ux.org (Postfix) with ESMTPSA id 205DC84F25D4 for ; Sat, 6 Jul 2013 20:59:48 +0200 (CEST) Message-ID: <51D86927.5090907@d2ux.net> Date: Sat, 06 Jul 2013 20:59:51 +0200 From: Matthias Petermann User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: freebsd-current@freebsd.org Subject: ACPI Lenovo X121e (Model 3045-79G, i3, HD3000) Suspend and LCD Brightness Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2013 18:59:53 -0000 Hello, on a Lenovo X121e (Model 3045-79G, i3, HD3000) I try FreeBSD since 9.1. Wifi, LAN, Audio, USB peripherials and Video (with KMS patch) just working fine. Anyway, there are some open items: * LCD brightness control doesn't work * Suspend to RAM (S3) doesn't restore video after resume That's why I upgraded my system to 10.0-CURRENT and looked in more detail at it: root@thinkpad:/usr/home/mpeterma # uname -a FreeBSD thinkpad.local 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r252853: Sat Jul 6 02:01:48 CEST 2013 root@thinkpad.local:/usr/obj/usr/src/sys/GENERIC amd64 # LCD Brightness First, on LCD brightness: The X121e is expected to increase/decrease LCD brightness by Fn+F9/Fn+F8. This is not working right now. So I tried the following: ## Attempts ### acpi_video / sysctl hw.acpi.video.lcd0.brightness This is what is working on most of the other laptops I tried it. root@thinkpad:/usr/home/mpeterma # kldload acpi_video acpi_video0: on vgapci0 root@thinkpad:/usr/home/mpeterma # sysctl -a |grep bright hw.acpi.video.lcd0.brightness: 35 root@thinkpad:/usr/home/mpeterma # sysctl hw.acpi.video.lcd0.brightness=100 hw.acpi.video.lcd0.brightness: 35 -> 100 Result: LCD brightness doesn't change after sysctl call, Fn+F9/Fn+F8 not working. ### acpi_ibm / sysctl dev.acpi_ibm.0.lcd_brightness This is what worked on some older Thinkpads. root@thinkpad:/usr/home/mpeterma # kldload acpi_ibm acpi_ibm0: on acpi0 root@thinkpad:/usr/home/mpeterma # sysctl -a | grep bright hw.acpi.video.lcd0.brightness: 90 dev.acpi_ibm.0.lcd_brightness: 7 root@thinkpad:/usr/home/mpeterma # root@thinkpad:/usr/home/mpeterma # sysctl dev.acpi_ibm.0.lcd_brightness=1 dev.acpi_ibm.0.lcd_brightness: 7 -> 1 Result: LCD brightness doesn't change after sysctl, Fn+F9/Fn+F8 still not working. ### Activate sysctl dev.acpi_ibm.0.events root@thinkpad:/usr/home/mpeterma # sysctl -a | grep dev.acpi_ibm.0.availmask dev.acpi_ibm.0.availmask: 67733756 root@thinkpad:/usr/home/mpeterma # sysctl dev.acpi_ibm.0.events=1 dev.acpi_ibm.0.events: 0 -> 1 root@thinkpad:/usr/home/mpeterma # sysctl dev.acpi_ibm.0.handlerevents='0x03 0x04 0x10 0x11' Result: Fn+F9/Fn+F8 still not working. ### Direct ACPI calls with acpi_call root@thinkpad:/usr/home/mpeterma # cd /usr/ports/sysutils/acpi_call/ root@thinkpad:/usr/ports/sysutils/acpi_call # make install clean root@thinkpad:/usr/ports/sysutils/acpi_call # kldload acpi_call root@thinkpad:/usr/ports/sysutils/acpi_call # acpi_call -p '\VBRU' root@thinkpad:/usr/ports/sysutils/acpi_call # acpi_call -p '\VBRD' Result: on each acpi_call, \VBRU increases and \VBRD decreases LCD brightness by one step. Fn+F9/Fn+F8 still not working. ## Summary Direct ACPI calls are sufficient as workaround. I would like to support a real solution. What are the next steps to find out what is wrong here? I think a solution for this problem will help not just X121e users but any user of more recent thinkpads. I saw similiar postings for X230 and X220. # Suspend to RAM The following observations I made without the i915 KMS module loaded (in console mode). ## Attempts ### Supported Sleep states as reported by sysctl root@thinkpad:/usr/home/mpeterma # sysctl -a |grep supported hw.acpi.supported_sleep_state: S3 S4 S5 ### S3, hw.acpi.reset_video=0 root@thinkpad:/usr/home/mpeterma # sysctl hw.acpi.reset_video=0 hw.acpi.reset_video: 0 -> 0 root@thinkpad:/usr/home/mpeterma # acpiconf -s 3 Result: System suspends, no video after resume, black screen ### S3, hw.acpi.reset_video=1 root@thinkpad:/usr/home/mpeterma # sysctl hw.acpi.reset_video=1 hw.acpi.reset_video: 0 -> 1 root@thinkpad:/usr/home/mpeterma # acpiconf -s 3 Result: system reboots immediately ## Adding more debug output In ACPI Debugging guide it is recommended to recompile the ACPI module with additional debug mode. Anyway, when I try so, I get a warning: root@thinkpad:/home/mpeterma # cd /sys/modules/acpi/acpi root@thinkpad:/sys/modules/acpi/acpi # make clean make: "/usr/src/sys/modules/acpi/acpi/Makefile" line 4: "The ACPI module is deprecated, set FORCE_BUILD to force it" root@thinkpad:/sys/modules/acpi/acpi # Is this still the way to go, or doesn't the guide reflect the state of FreeBSD 10? # Detail information to X121e I uploaded the following details regarding the X121e: * dmesg * ACPI ASL * Sysctl ACPI keys to: *https://d2ux.org/owncloud/public.php?service=files&t=7022f90cea5e48da7fa65806c0d66091* Any help is welcome. Please let me know when I can provide more details / testing. Kind regards, Matthias