2

I need to fix this problem i have with my mouse when playing games and i don't know how to apply this patch. http://cgit.freedesktop.org/xorg/xserver/commit/?id=2d4fda4b09e67e47d3e6fc4743fc6e81bfe40f28

Any help would be nice. Thanks.

2 Answers 2

2

You could try out this PPA, which provides you with cutting-edge Xorg builds and related packages. To add:

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get dist-upgrade

Also make sure you install this tool, which will allow you to revert the changes made by the PPA:

sudo apt-get install ppa-purge

Then reboot your computer.

Note that this PPA has a profound impact on vital system components. If something goes wrong, you might end up in graphical safe mode, or even worse, in a recovery console.

To undo the changes, run:

sudo ppa-purge xorg-edgers
2

To apply a patch you will need a version control system to obtain the original source code, then you will need to find the branch with the changed source code and you will have to merge them. You can also merge them by hand (direct copy-paste of code segments in your copy of the whole source code). This would be easier for you to do.

After that you will have to install a compiler (in your case) and build x11. Then you will need to reinstall it using the newly generated binary. As you see, this is a complex procedure that will also need to be redone once the main source tree gets updated (if you want updates ofcourse).

All in all, either try the unstable PPA suggested above, or downgrade to ubuntu 11.10 Your problem showed in Ubuntu 12.04's version of X11 (more specifically XInput) X11 is a very important component for your OS and medling with it is not a good idea. You have been warned. If you really need to do that read on.

These are the steps (in commands) needed to patch something. They are not direct one to one answer to your question.

Let's say X11 uses the git VCS First we need to install git

sudo apt-get install git git-core

Then we need to install the compiler

sudo apt-get install build-essential

Then we need to obtain the source tree (supposing git.freedesktop.x11.git exists)

git clone git.freedesktop.x11.git

This might take a while so play some non wine games until it finishes Once it finishes goto x11 directory

cd x11

Run :

./configure

This script will complain if something is missing. Install that package / those packages using synaptic or sudo apt-get package-name Now run (numberOfCores is the number of cores in your processor):

make -j(numberOfCores * 2)

This might also take a while. Once it finishes run :

sudo make install

Now you have a custom build of x11 installed. Now that we are sure that everything wen fine we can patch it. There are a few ways to do that: First : git pull guyWhoFixed11 x11fixed && git merge x11fixed master && make && sudo make install Second : Find the file that needs fixing (X11Mouse.c for example) and replace the grab_mouse function contents with contents from your link. Then : make && sudo make install

As I said,this is just a general procedure for patching and does not apply 100% directly to your question.

git am --signoff < x11fixed.patch 

might also work for the patching part.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .