The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Asus N10 Key Bind Tweak

    Discussion in 'Linux Compatibility and Software' started by pgatz11, Apr 10, 2011.

  1. pgatz11

    pgatz11 Notebook Consultant

    Reputations:
    84
    Messages:
    169
    Likes Received:
    0
    Trophy Points:
    30
    Hi,
    In another thread, a tweak was offered to bind two keys on the Asus N10 notebook (a Power Mode button and a Magnify button) to custom functions like NEXTSONG and PLAYPAUSE that would work for various ubuntu software.

    The specific tweak, written in late 2008, can be found here:
    Linux HOWTO - N10 Wiki

    The first step is to copy a compiled asus_laptop module (then modify it later):
    Code:
    cp /usr/src/linux-`uname -r`/drivers/platform/x86/asus-laptop.c /usr/src/linux-`uname -r`/drivers/platform/x86/asus-laptop.c.orig
    My problem: The asus-laptop.c file does not exist, nor does the directory.
    Code:
    patrick@pztn10:~$ cp /usr/src/linux-`uname -r`/drivers/platform/x86/asus-laptop.c /usr/src/linux-`uname -r`/drivers/platform/x86/asus-laptop.c.orig
    cp: cannot stat `/usr/src/linux-2.6.35-22-generic/drivers/platform/x86/asus-laptop.c': No such file or directory
    
    ...
    
    patrick@pztn10:/usr/src$ ls
    linux-headers-2.6.35-22
    linux-headers-2.6.35-22-generic
    nvidia-current-260.19.06
    Did the directory move elsewhere? Where else can I find the asus_laptop.c module to proceed with the rest of the tweak? (I tried using find function but didn't turn anything up - I'm new at linux)

    TIA,
    patrick

    p.s. Running Ubuntu 10.10, laptop ASUS N10J

    p.s.s. rest of tweak follows (which I haven't gotten to yet)
    Code:
    sed 's/SCREENLOCK/NEXTSONG/' /usr/src/linux-`uname -r`/drivers/platform/x86/asus-laptop.c.orig | sed 's/{KE_END, 0},/{KE_KEY, 0xba, KEY_PLAYPAUSE},\n\t{KE_END, 0},/' > /usr/src/linux-`uname -r`/drivers/platform/x86/asus-laptop.c
    cd /usr/src/linux-`uname -r`
    make drivers/platform/x86/asus-laptop.ko
    sudo cp drivers/platform/x86/asus-laptop.ko /lib/modules/`uname -r`/kernel/drivers/platform/x86/
    sudo modprobe -r asus_laptop
    sudo modprobe asus_laptop
     
  2. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Hi, it looks like you need to install your kernel source package, in this case, linux-source-2.6.35
     
  3. pgatz11

    pgatz11 Notebook Consultant

    Reputations:
    84
    Messages:
    169
    Likes Received:
    0
    Trophy Points:
    30
    Thanks - I hadn't compiled my own kernel.

    I followed instructions at: http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html
    ... to recompile my kernel and then was able to follow the button tweak instructions perfectly.

    patrick
     
  4. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Cool, glad it worked out. :)

    Cheers! :D