ubuntu 11.04 / laptop sony vaio vpcy11S1E: wireless

Posted by perkins on 28 May 2011 in IT | Short Link
  1. Wireless doesn’t work from the start. Here is the solution, which is that:
    gksudo gedit /etc/modprobe.d/acer-wmi
    options acer-wmi wireless=1
    sudo modprobe acer-wmi
  2. The control buttons for brightness of the display [Fn - F5, F6] do not work. The solution remains the same (i’ve lost the source, from where I did steal this): two files shall be created in /etc/acpi/ directory:
    /etc/acpi/sony_brightness_up.sh:

    #!/bin/bashCONST_ADD=32
    
    #get current value and convert it from hex to decimal
    BRIGHT_VAL=$((0x$(setpci -s 00:02.0 F4.B)))
    
    #increase it
    BRIGHT_VAL=$(( $BRIGHT_VAL + $CONST_ADD ));
    
    if test "$BRIGHT_VAL" -gt 255 ;
    then BRIGHT_VAL=255
    fi
    
    #convert in hex
    HEX_VAL=$(dc -e "$BRIGHT_VAL 16 o p")
    
    #set new val
    #echo $HEX_VAL
    setpci -s 00:02.0 F4.B=$HEX_VAL

    … and /etc/acpi/sony_brightness_down.sh:

    #!/bin/sh
    
    CONST_ADD=32
    
    #get current value and convert it from hex to decimal
    BRIGHT_VAL=$((0x$(setpci -s 00:02.0 F4.B)))
    
    if test "$BRIGHT_VAL" -le "$CONST_ADD" ;
    then BRIGHT_VAL=$(( $CONST_ADD + 1 ))
    fi
    
    #decrease it
    BRIGHT_VAL=$(( $BRIGHT_VAL - $CONST_ADD ));
    
    #convert in hex
    HEX_VAL=$(dc -e "$BRIGHT_VAL 16 o p")
    
    #set new val
    setpci -s 00:02.0 F4.B=$HEX_VAL

    … and two files in /etc/acpi/events directory:
    /etc/acpi/events/sony-brightness-down:

    # /etc/acpi/events/sony-volume-down
    
    event=sony/hotkey SNC 00000001 00000010
    action=/etc/acpi/sony_brightness_down.sh

    … and /etc/acpi/events/sony-brightness-up:

    b/s/README  ~/b/s/e/sony-brightness-up                                          X
    # /etc/acpi/events/sony-volume-down
    
    event=sony/hotkey SNC 00000001 00000011
    action=/etc/acpi/sony_brightness_up.sh

    … then restart.

Tags: , , ,

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © 2006-2012 dimonf All rights reserved.
The Shades theme, version 1.8, is a BuyNowShop.com creation.