Ubuntu8.10 volume shortcut [Fn-KEY] Error Handling

Source: Internet
Author: User
Article Title: Ubuntu8.10 volume shortcut [Fn-KEY] error handling. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Some time ago, Ubuntu8.10 came out and I tested it. The dual script support is not very good, especially the Fn volume shortcut key problem. If you press it, The OSD will always be displayed and will not be returned. The volume will not be fully open, otherwise, it seems that I keep pressing the key. After testing, N laptops have this phenomenon. After searching all domestic BBS, after the technical support was fruitless, I had to analyze the system file and find out the cause on the BBS outside China. It is estimated that some of them were also used in the forum. If there were such problems, they could be completely solved.

The error is caused by the key-up signal required by the input device drive evdev of X, which is usually missing by the Fn key. Therefore, the OSD window of the volume cannot be terminated and enters an endless loop. The solution is to re-compile the evdev module.
Back up the evdev_drv.so file first. If an error occurs, run the console command to copy it back.
Cp/usr/lib/xorg/modules/input/evdev_drv.so ~ /
Method 1:
Step 1: Download the modified evdev source code:
Wget http://labs.ktemkin.com/ubuntu/evdev_fix_2.0.99.tar.gz
Tar-zxvf evdev_fix_2.0.99.tar.gz
Cd evdev_fix
For more information, see public operations.
Method 2:
Step 1: Download The evdev file in the Ubuntu source code ,:
Http://packages.ubuntu.com/source/intrepid/xserver-xorg-input-evdev
Step 2: Find the following code in the./src/evdev. c file in the unwrapped package:
/* Filter repeat events for chording keys */
If (value = 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? */
Return;
Step 3: Create a new line under the following code and enter 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 IC key-up
Xf86PostKeyboardEvent (pInfo-> dev, code, 1 );
Xf86PostKeyboardEvent (pInfo-> dev, code, 0 );
Return;
}
If there are other Fn function keys, you can manually check the key definition, such as the mute key.
/* Fix events for volume keys */
If (ev-> code = KEY_VOLUMEDOWN | ev-> code = KEY_VOLUMEUP | ev-> code = KEY_MUTE) // MODIFY THIS LINE
{
// Post a keydown and then a keyup, as media keys have no automatic IC key-up
Xf86PostKeyboardEvent (pInfo-> dev, code, 1 );
Xf86PostKeyboardEvent (pInfo-> dev, code, 0 );
Return;
}
After method 1 or method 2 is completed, execute the following compilation process:
Step 1: Install the compilation tool and environment:
Sudo apt-get install build-essential libtool automake gcc xorg-dev
Step 2: compile:
./Autogen. sh
Make
Sudo make install
Setp3: copy the driver to the correct position:
Sudo cp/usr/local/lib/xorg/modules/input/evdev_drv.so/usr/lib/xorg/modules/input/

After the command is executed, X is automatically restarted. If no automatic restart is enabled, it should be restarted manually. Normally, it will be OK. If X cannot be entered, Press ESC to enter safe mode at startup, recover the backup module File.
Sudo cp ~ /Evdev_drv.so/usr/lib/xorg/modules/input/
Sudo reboot

Reiterate that the operator must be required to understand basic compilation knowledge and black screen processing methods because it involves the basic input module of the system. Otherwise, the system will be responsible for the consequences of not entering X.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.