Page 6 of 8 FirstFirst ... 45678 LastLast
Results 51 to 60 of 75

Thread: [HOWTO] Fix for Stuck Volume/Multimedia Keys

  1. #51
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: [HOWTO] Fix for Stuck Volume/Multimedia Keys

    could you do that fix on karmic ??
    i tried to do that but the fix compile suusccfully but not working
    http://counter.li.org/cgi-bin/certificate.cgi/452351
    First they ignore you. Then they laugh at you. Then they fight you. Then you win. Gandhi

  2. #52
    Join Date
    Aug 2008
    Beans
    25

    Re: [HOWTO] Fix for Stuck Volume/Multimedia Keys

    I can confirm that it doesn't work for karmic. Very annoying because my keyboard worked fine with jaunty!
    I also tcompile d the jaunty versio and tried it but the result is not good : the key doesn't repeat itself anymore but it looks like it doesn't do anything
    Last edited by allaf; November 1st, 2009 at 09:22 PM.

  3. #53
    Join Date
    Dec 2006
    Beans
    13

    Re: [HOWTO] Fix for Stuck Volume/Multimedia Keys

    I also had problems fixing this bug under Karmic, but fixed the fix

    I did some testing and it turns out my volume/mute keys (now?) generate a value = 2 for all keypresses except the first one. That is why it works the first keypress. In the Karmic evdev.c now is a conditional statement after the 'if (value = 2)' code, which takes all kinds of dead keys into account (?), but only #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) <= 2. It turns out the the dead-key code isn't compiled in (GET_ABI_MAJOR(ABI_XINPUT_VERSION > 2?) so that for every volume key press except the first, the routine immediately returns, without generating any keypress nor release.

    The simplest fix for this is to insert the fix-code ABOVE the 'if (value = 2)' condition.
    I'm not sure WHY the conditional statement is there and what I'm going to break by putting the code above, but my volume keys work again

    Hope this helps.

  4. #54
    Join Date
    Jan 2007
    Beans
    Hidden!

    Thumbs down Final Fix For Karmic

    This is a rewrite of the fix


    1) Back up your current evdev driver, just in case. This line will back up to your home directory (~/), you can modify it if you want; just remember where you put it for later.


    cp /usr/lib/xorg/modules/input/evdev_drv.so ~/





    2) This will download the current evdev source for you:



    apt-get source xserver-xorg-input-evdev



    3) Inside the folder for the evdev version you just downloaded, you'll find a 'src' folder. Look for the block that contains:



    /* Filter all repeated events from device.
    We'll do softrepeat in the server, but only since 1.6 */
    if (value == 2
    #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) <= 2
    && (ev->code == KEY_LEFTCTRL || ev->code == KEY_RIGHTCTRL ||
    ev->code == KEY_LEFTSHIFT || ev->code == KEY_RIGHTSHIFT ||
    ev->code == KEY_LEFTALT || ev->code == KEY_RIGHTALT ||
    ev->code == KEY_LEFTMETA || ev->code == KEY_RIGHTMETA ||
    ev->code == KEY_CAPSLOCK || ev->code == KEY_NUMLOCK ||
    ev->code == KEY_SCROLLLOCK) /* XXX windows keys? */
    #endif
    )
    return;




    Above it, on a new line, copy and paste the following code:


    /* fix events for volume keys */
    if(ev->code == KEY_VOLUMEDOWN || ev->code == KEY_VOLUMEUP) //MODIFY THIS LINE
    {
    //post a keydown and then a keyup, as media keys have no automatic key-up
    xf86PostKeyboardEvent(pInfo->dev, code, 1);
    xf86PostKeyboardEvent(pInfo->dev, code, 0);
    return;
    }


    Then install the needed packages for compiling

    sudo apt-get install build-essential libtool automake gcc xorg-dev xutils-dev



    Compile. Firstly, we'll need to make sure you have everything set up to compile. Install anything this step requires, or just continue if it tells you you're 'already newest version'. You'll need to type in your password to give yourself installation rights.

    cd xserver-xorg-input-evdev-2.2.5
    chmod +x autogen.sh
    ./autogen.sh
    make
    sudo make install
    sudo cp /usr/local/lib/xorg/modules/input/evdev_drv.so /usr/lib/xorg/modules/input/

    Recovery

    If your keyboard/mouse stopped working, don't panic! Instead, switch to one of your virtual terminals by pressing CTRL+ALT+F2. Then, execute the following command:

    Code:

    sudo cp ~/evdev_drv.so /usr/lib/xorg/modules/input/
    That will restore your original driver. Then, restart the computer with the following commands.

    Code:

    sudo shutdown -r 0
    http://counter.li.org/cgi-bin/certificate.cgi/452351
    First they ignore you. Then they laugh at you. Then they fight you. Then you win. Gandhi

  5. #55
    Join Date
    Dec 2006
    Beans
    13

    Re: [HOWTO] Fix for Stuck Volume/Multimedia Keys

    Just a tiny nitpicky detail: you write about looking for code in the 'src' directory. It would be very helpful to hint that this code actually exists in evdev.c.

    And another thing: How am I going to press CTRL-ALT-F2 if my keyboard stopped responding?

  6. #56
    Join Date
    Oct 2008
    Beans
    8

    Re: [HOWTO] Fix for Stuck Volume/Multimedia Keys

    I haven't had a chance to upgrade to Karmic yet...I'm planning on trying 64-bit this time around, does anybody know if this fix is necessary on 64-bit, and if it is, is it the same as what is posted above?

  7. #57
    Join Date
    Aug 2008
    Beans
    25

    Re: [HOWTO] Fix for Stuck Volume/Multimedia Keys

    just to let you know my keyboard is working again, i didn't do anything except applying updates on karmic (64bit version).
    Last edited by allaf; November 18th, 2009 at 07:31 PM.

  8. #58
    Join Date
    Dec 2007
    Beans
    1

    Re: [HOWTO] Fix for Stuck Volume/Multimedia Keys

    how can it be, this _still_ has to be fixed by hand?!

  9. #59
    Join Date
    Sep 2009
    Beans
    1

    Re: Final Fix For Karmic

    thank you drvista !! your fix for karmic worked great on my HP zv6000 laptop

  10. #60
    Join Date
    Aug 2009
    Beans
    80

    Re: [HOWTO] Fix for Stuck Volume/Multimedia Keys

    Im using Karmic now... (actually Mint 8) and trying to implement this for my Dell 1558.
    When I do step 2 I get
    E: You must put some 'source' URIs in your sources.list
    Not sure what I need to add to my sources. Advice?

    Edit: added sources in the "software sources" tool, but now I get this...
    E: Unable to find a source package for xserver-xorg-input-evdev
    So I still don't have the right item there I guess?
    (This is probably because I'm in Mint and the Ubuntu "source code" repos. is not enabled by default. If someone can tell me what it is, I can add manually)

    Edit: I think I've got it. Do tell me if I'm wrong:
    deb-src http://us.archive.ubuntu.com/ubuntu/ karmic main restricted

    Seems to be working
    Last edited by aharown07; March 5th, 2010 at 04:29 AM. Reason: update

Page 6 of 8 FirstFirst ... 45678 LastLast

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
  •