From owner-freebsd-mobile@FreeBSD.ORG Wed Oct 30 17:29:31 2013 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 47CAB929 for ; Wed, 30 Oct 2013 17:29:31 +0000 (UTC) (envelope-from ooomka@yandex.ru) Received: from forward6l.mail.yandex.net (forward6l.mail.yandex.net [IPv6:2a02:6b8:0:1819::6]) by mx1.freebsd.org (Postfix) with ESMTP id 03A88245C for ; Wed, 30 Oct 2013 17:29:31 +0000 (UTC) Received: from smtp13.mail.yandex.net (smtp13.mail.yandex.net [95.108.130.68]) by forward6l.mail.yandex.net (Yandex) with ESMTP id C08FE14E0CD0; Wed, 30 Oct 2013 21:29:28 +0400 (MSK) Received: from smtp13.mail.yandex.net (localhost [127.0.0.1]) by smtp13.mail.yandex.net (Yandex) with ESMTP id 6D660E40794; Wed, 30 Oct 2013 21:29:28 +0400 (MSK) Received: from ip-230-38-120-176.corp.langate.ua (ip-230-38-120-176.corp.langate.ua [176.120.38.230]) by smtp13.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 7UJGCCYORG-TR7053ko; Wed, 30 Oct 2013 21:29:28 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1383154168; bh=bBDZpRP3zB0zqDhubJpEpVY+HO5o/xbFC6T40a3p3bU=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=vCBJgvce2He2RGRyfFUn9C8mMqwI/s5DthHsihO86HruFOJHwWTkvFz8duDk4pg2Y nAnz6gkDCSC/hSM/aJqWfK7eD3FWyeQLpW5Nu+0pl17gOToAjwcmE79dHBaZebz89f qERSIbcIh6i7lmktWYiv5WisheN9ZDOTcEQCu41Y= Authentication-Results: smtp13.mail.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <527141F2.4010402@yandex.ru> Date: Wed, 30 Oct 2013 19:29:22 +0200 From: Sergiy Mikhailushko User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Henry Hu Subject: Re: ASUS U46E laptop brightness References: <524C3747.6060900@yandex.ru> <527121F5.7030705@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Oct 2013 17:29:31 -0000 On 10/30/2013 17:41, Henry Hu wrote: > > > On Wed, Oct 30, 2013 at 11:12 AM, Sergiy Mikhailushko > wrote: > > I'm using ASUS UX51VZ and I can use this to adjust the brightness: > > acpi_call -p "\_SB.ATKD.SPLV" -i $2 > acpi_call -p "\ISMI" -i 154 > > I found these statements in acpidump, so you may find similar statements. > Hooray! Your method works, you saved my eyes. I can change brightness level with "acpi_call -p "\_SB.ATKD.SPLV" -i $[1-10]. Thanks a lot! I've made keyboard shortcuts for brightness control. Maybe someone may need it -- here I leave the recipe: 1) Granted access to acpi to anybody from wheel group by adding the following to /etc/devfs.conf (don't forget to restart devfs service after changing the file): perm acpi 0660 2) Created two tiny scripts in ~/bin: brup.sh... #!/bin/sh if [ ! -f /tmp/brightlvl ]; then echo 1 > /tmp/brightlvl fi lvl=`cat /tmp/brightlvl` if [ $lvl -gt 9 ]; then exit 0 fi lvl=`expr $lvl + 1` echo $lvl > /tmp/brightlvl echo $lvl exit 0 ...and brdown.sh #!/bin/sh if [ ! -f /tmp/brightlvl ]; then echo 10 > /tmp/brightlvl fi lvl=`cat /tmp/brightlvl` if [ $lvl -lt 2 ]; then exit 0 fi lvl=`expr $lvl - 1` echo $lvl > /tmp/brightlvl echo $lvl exit 0 2) Added the following to ~/.fluxbox/keys (if you use another WM/DE then you'll have another way to bind hotkeys): Control Right :Exec acpi_call -p "\_SB.ATKD.SPLV" -i `brup.sh` Control Left :Exec acpi_call -p "\_SB.ATKD.SPLV" -i `brdown.sh` Now I can adjust brightness by pressing Ctrl+Left/Ctrl+Right. Somewhat more convenient then typing the command in the terminal.