Results 1 to 10 of 481

Thread: Asus K52 / Asus A52

Threaded View

  1. #1
    Join Date
    Nov 2008
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Asus K52 / Asus A52

    UPDATE: Ubuntu Precise Pangolin 12.04

    Everything works out of the box except suspend and toggling wireless led. You can install this pacakge to solve them: http://dl.dropbox.com/u/62752658/asu....0_precise.deb

    Or if you prefer, you can solve things manually:


    - SUSPEND: you need to create a new file with these commands:

    sudo gedit /etc/pm/sleep.d/20_custom-asus-k52
    Code:
    #!/bin/sh
    
    case "${1}" in
            hibernate|suspend)
                  # Switch USB buses off
                   echo -n "0000:00:1a.0" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
                   echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
                  # Switch wireless off
                  nmcli nm sleep true
                  rmmod ath9k
                  echo 0 > /sys/devices/platform/asus_laptop/wlan
            ;;
            resume|thaw)
                  # Switch USB buses on
                  echo -n "0000:00:1a.0" | tee /sys/bus/pci/drivers/ehci_hcd/bind
                  echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci_hcd/bind
                  # Switch wireless on
                  modprobe ath9k
                  nmcli nm sleep false
                  echo 1 > /sys/devices/platform/asus_laptop/wlan
            ;;
    esac
    sudo chmod +x /etc/pm/sleep.d/20_custom-asus-k52



    - WIRELESS LED: you need to create two new files with these commands:

    sudo gedit /etc/acpi/asus-k52-wireless-led.sh

    Code:
    #!/bin/sh
    # Toggle Wireless LED on Asus K52 laptops
    
    WLANSTATUS=`cat /sys/class/ieee80211/phy*/rfkill*/state`
    
    test -z $WLANSTATUS && exit 1
    
    if [ $WLANSTATUS = 0 ]; then
    echo 0 > /sys/devices/platform/asus_laptop/wlan
    
    elif [ $WLANSTATUS = 1 ]; then
    echo 1 > /sys/devices/platform/asus_laptop/wlan
    fi
    sudo chmod +x /etc/acpi/asus-k52-wireless-led.sh


    sudo gedit /etc/acpi/events/asus-k52-wireless-switch

    Code:
    # /etc/acpi/events/asus-k52-wireless-switch
    # This is called when the user presses the wireless button (Fn+F2) on the ASUS K52
    # and calls /etc/acpi/asus-k52-wireless-led.sh for further processing.
    
    event=hotkey (ATKD|HOTK) 0000005d
    action=/etc/acpi/asus-k52-wireless-led.sh


    If you are using the 64bit version, the webcam will be upside down in 32bit applications (like Skype). To fix that you need to install a new package with this command:

    sudo apt-get install libv4l-0:i386

    And then run Skype with this command:

    LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype


    ************************************************** ************************************************** ***


    Ubuntu Oneiric Ocelot 11.10

    Almost the same issues as in Ubuntu Natty. I created a package to solve them which you can download here:

    http://ubuntuone.com/0q8b4sJUu0geFIgu8x3WOH

    If you prefer to solve things manually, follow the instructions from Ubuntu Natty. Wireless will also be disabled after suspend, you can solve it reading this post:

    http://ubuntuforums.org/showpost.php...&postcount=399

    To get the touchpad hotkey working (Fn + F9) you have to open System Settings > Keyboard > Shortcuts and create a custom shortcut pointing to the touchpad script /etc/acpi/asus-k52-touchpad.sh

    There is a bug which doesn't allow the use of three finger tap on the touchpad, hope there is a fix soon. On the other hand, palm detection is finally working.

    For now we can solve the three finger tap issue with the instructions here:

    http://ubuntuforums.org/showthread.php?t=1615564

    ************************************************** ************************************************** ***

    Ubuntu Natty 11.04

    Almost everything is working out of the box. To solve issues with suspend to ram and wireless led check the solutions for Ubuntu Lucid. To use the touchpad key (fn+f9), save the touchpad script in the solutions for Ubuntu Lucid and map it to the key.

    I created a package which automatically solves issues with suspend and wireless led. It also contains the touchpad script, you can use gnome-binding-properties to create a new combination which executes /etc/acpi/asus-k52-touchpad.sh

    Package: http://ubuntuone.com/p/puF/


    For the webcam I didn't have to do anything, it's working ok. The only thing is that I'm using Ubuntu 64bit, and for 32bit applications that use the webcam (example: skype) the image is upside down. To solve it I run it like this:

    LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype

    There is a nice utility in the official repositories called 'guvcview' which lets you configure some settings of the webcam (you can invert or mirror the image, for example). I recommend it.


    If wifi slows down after disconnecting AC cable, run this command:

    echo "options ath9k nohwcrypt=1" | sudo tee -a /etc/modprobe.d/ath9k.conf

    ************************************************** ************************************************** ***

    Ubuntu Maverick 10.10

    - To solve the problems relative to sound, run this on a terminal:

    sudo add-apt-repository ppa:ubuntu-audio-dev/ppa; sudo apt-get update; sudo apt-get install linux-alsa-driver-modules-$(uname -r)


    Then reboot your laptop. If still have any problems, check page 34 ( http://ubuntuforums.org/showthread.p...460790&page=34 )


    - To solve the webcam upside down problem, run this on a terminal:

    sudo add-apt-repository ppa:libv4l/ppa && sudo apt-get update && sudo apt-get upgrade


    - To solve the suspend and wireless-led problem, check the following solutions for Ubuntu Lucid 10.04.

    ************************************************** ************************************************** ***

    Ubuntu Lucid 10.04

    I own an Asus A52F, twin brother of the Asus K52F. Here is a list of the problems you might find when installing Ubuntu Lucid, and their respective solutions.

    LIST OF PROBLEMS:

    1) SOUND: speakers do not mute when headphones are plugged in. (SOLVED)

    2) SOUND: hdmi sound out not working. (SOLVED)

    3) SOUND: external microphone not working. (SOLVED)

    4) SUSPEND: suspend to ram freezes my laptop. (SOLVED)

    5) WEBCAM: image upside down. (SOLVED)

    6) Wireless LED: the led doesn't turn off when I press Fn+F2, but wireless is disabled. (SOLVED)

    7) Available RESOLUTIONS: I get the maximum resolution for my screen, 1366x768, but I am missing other resolutions available in Windows. (IMPROVED)

    8 ) TOUCHPAD: not detected as a touchpad, detected as "ImPS/2 Logitech Wheel Mouse". Touchpad tab missing in System>Preferences>Mouse and syndaemon is not working. The key to disable touchpad Fn+F9 is not working. (SOLVED)

    Palm proof technology not working.

    9 ) Calculator button (Fn + KP_Enter) not working. (SOLVED)



    LIST OF SOLUTIONS:

    1,2,3) SOUND: paste these commands on a terminal.

    wget www.linuxant.com/alsa-driver/archive/alsa-driver-linuxant-1.0.23.0/alsa-driver-linuxant_1.0.23.0_all.deb.zip
    unzip alsa-driver-linuxant_1.0.23.0_all.deb.zip
    gdebi-gtk alsa-driver-linuxant_1.0.23.0_all.deb

    Install the package and reboot. Now speakers should mute when headphones are connected, HDMI and microphones (internal & external) should be working. Open alsamixer and unmute S/PDIF (you can do that pressing "m"). Choose HDMI output from the pulseaudio volume applet (hardware tab) when needed.

    ***Note: I am using Alsa 1.0.23 and Linux Kernel 2.6.34.


    4) SUSPEND: you need to create a new file with this commands:

    sudo gedit /etc/pm/sleep.d/20_custom-ehci_hcd

    Code:
    #!/bin/sh
    # File: "/etc/pm/sleep.d/20_custom-ehci_hcd".
    case "${1}" in
            hibernate|suspend)
                  # Unbind ehci_hcd for first device 0000:00:1a.0:
                   echo -n "0000:00:1a.0" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
                  # Unbind ehci_hcd for second device 0000:00:1d.0:
                   echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
            ;;
            resume|thaw)
                  # Bind ehci_hcd for first device 0000:00:1a.0:
                  echo -n "0000:00:1a.0" | tee /sys/bus/pci/drivers/ehci_hcd/bind
                  # Bind ehci_hcd for second device 0000:00:1d.0:
                  echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci_hcd/bind
            ;;
    esac
    sudo chmod +x /etc/pm/sleep.d/20_custom-ehci_hcd


    5) WEBCAM: to solve the image upside-down problem, we have to run this command:

    sudo add-apt-repository ppa:libv4l/ppa && sudo apt-get update && sudo apt-get upgrade

    There is a nice utility to adjust the settings of our webcam (whitebalance, light, ...) called gtk-v4l.


    6) Wireless LED: you need to create two files and restart acpi. Follow this commands:

    sudo gedit /etc/acpi/events/asus-wireless-switch
    Code:
    event=hotkey ATKD 0000005d
    action=/etc/acpi/asus-wireless-switch.sh
    sudo gedit /etc/acpi/asus-wireless-switch.sh

    Code:
    #!/bin/sh
    # Toggle wireless device on Asus K52 laptops
    
    WLANSTATUS=`cat /sys/class/ieee80211/phy*/rfkill*/state`
    
    test -z $WLANSTATUS && exit 1
    
    if [ $WLANSTATUS = 0 ]; then
    echo 0 > /sys/devices/platform/asus_laptop/wlan    
    elif [ $WLANSTATUS = 1 ]; then
    echo 1 > /sys/devices/platform/asus_laptop/wlan
    fi
    sudo chmod +x /etc/acpi/asus-wireless-switch.sh
    sudo service acpid restart
    sudo /etc/init.d/acpi-support restart


    7) Available RESOLUTIONS: you can get 1024x768 by adding to your repositories ppa:ubuntu-x-swat/x-updates (more stable than ppa xorg-edgers). Do this:

    sudo add-apt-repository ppa:ubuntu-x-swat/x-updates && sudo apt-get update && sudo apt-get upgrade

    Then reboot and that's it. THIS IS ONLY FOR INTEL GRAPHIC CARDS > Asus K52F & Asus A52F


    8 ) TOUCHPAD: I found a solution to get the Elantech touchpad detected as such (and not ImPS/2 Logitech Wheel Mouse). Follow the instructions on this post: http://ubuntuforums.org/showthread.p...01#post9175201

    EDIT: if you are running 2.6.34-rc7 or later you just need to run this two commands:
    echo "options psmouse force_elantech=1" | sudo tee -a /etc/modprobe.d/psmouse.conf
    sudo rmmod psmouse && sudo modprobe psmouse

    Then you can check your settings with "synclient -l" or with xinput list-props "ETPS/2 Elantech Touchpad"
    I made a startup script to keep two fingers tap as middle click, and three fingers tap as right click, with this command:
    xinput set-prop "ETPS/2 Elantech Touchpad" "Synaptics Tap Action" 0, 0, 0, 0, 1, 2, 3

    Edit this file to get the touchpad button working:

    sudo gedit /etc/acpi/asus-touchpad.sh

    Code:
    #!/bin/sh
    # Toggle Elantech touchpad device on Asus laptops
    
    [ -f /usr/share/acpi-support/power-funcs ] || exit 0
    
    . /usr/share/acpi-support/power-funcs
    
    getXconsole
    
    TPSTATUS=`xinput list-props "ETPS/2 Elantech Touchpad" | grep "Device Enabled" | awk '{ print $4 }'`
    
    test -z $TPSTATUS && exit 1
    
    if [ $TPSTATUS = 1 ]; then
    xinput set-prop "ETPS/2 Elantech Touchpad" "Device Enabled" 0
    notify-send -i /usr/share/icons/hicolor/scalable/actions/touchpad-enabled.svg -t 3000 "        TOUCHPAD OFF" "
         Press Fn+F9 to enable"
    elif [ $TPSTATUS = 0 ]; then
    xinput set-prop "ETPS/2 Elantech Touchpad" "Device Enabled" 1
    notify-send -i /usr/share/icons/hicolor/scalable/actions/touchpad-enabled.svg -t 3000 "        TOUCHPAD ON" "
         Press Fn+F9 to disable"
    xinput set-prop "ETPS/2 Elantech Touchpad" "Synaptics Tap Action" 0, 0, 0, 0, 1, 2, 3
    fi
    sudo service acpid restart
    sudo /etc/init.d/acpi-support restart

    EDIT: when pressing Fn+c (splendid button) this file is called "/etc/acpi/asus-f8sv-touchpad", and acts as Fn+F9. To solve it, uncomment that file or change it's action to something else that asus-touchpad.sh


    9 ) Create two files to get the calculator button working: (if using maverick, check posts 183 and 186)

    sudo gedit /etc/acpi/events/asus-calculator
    Code:
    event=hotkey (ATKD|HOTK) 000000b5
    action=/etc/acpi/asus-calculator.sh
    sudo gedit /etc/acpi/asus-calculator.sh

    Code:
    #!/bin/sh
    # Start calculator on Asus K52 laptops
    
    . /usr/share/acpi-support/power-funcs
    
    getXconsole
    
    gcalctool &
    sudo chmod +x /etc/acpi/asus-calculator.sh
    sudo service acpid restart
    sudo /etc/init.d/acpi-support restart
    Last edited by jsevi83; May 30th, 2012 at 11:17 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •