PDA

View Full Version : how to install synaptics driver, modify and recompile it?


ForLorn SouL
9th July 2010, 01:34 PM
hey guys

Im new to fedora :p
I've been using ubuntu for about two years

my inspiron laptop has a problem with the touchpad
if fails to regester some of the taps
this issue exists only in linux, in all distros
while in windows it works perfectly

on ubuntu I used to solve the problem by modifying and recompiling the synaptics driver
this how I fix it on ubuntu


1. apt-get source xserver-xorg-input-synaptics
2. sudo apt-get build-dep xserver-xorg-input-synaptics
3- modify the file in the home folder/xserver-xorg-input-synaptics-1.2.2/src/synaptics.c

4. save & close the file
5. sudo dpkg-buildpackage



I don't know how to do it in fedora :(
when I tried yum install xserver-xorg-input-synaptics
it says no package

if anyone can help me I would be thankfull :)

parish
9th July 2010, 02:22 PM
/...snip/

I don't know how to do it in fedora :(
when I tried yum install xserver-xorg-input-synaptics
it says no package

if anyone can help me I would be thankfull :)
On my F13 system the package is called xorg-x11-drv-synaptics; xorg-x11-drv-synaptics-1.2.2-6.fc13.i686 to be exact.

Dies
9th July 2010, 02:41 PM
Here's the quick and dirty way.

yumdownloader --source xorg-x11-drv-synaptics
su -c 'yum-builddep xorg*rpm'
rpm -ivh xorg*.src.rpm
cd ~/rpmbuild/SOURCES/
tar xvf xf*bz2
rm xf*bz2
vi xf86-input-synaptics-1.2.2/src/synaptics.c
tar cjvf xf86-input-synaptics-1.2.2.tar.bz2 xf86-input-synaptics-1.2.2/
rm -rf xf86-input-synaptics-1.2.2
cd ../SPECS/
rpmbuild -bb xorg-x11-drv-synaptics.spec

You'll find the resulting rpm packages in the ~/rpmbuild/RPMs directory.

By the way the only difference between this and the proper way is that you would not directly edit the files but instead generate a patch, then modify the spec file to apply your new patch.

ForLorn SouL
9th July 2010, 02:44 PM
yep buddy I got it

but now Im even more confused
this is the original bug in ubuntu
https://bugs.launchpad.net/debian/+source/xserver-xorg-input-synaptics/+bug/133060

the solution was to modify the driver
exactly doing this

The file to modify is in xserver-xorg-input-synaptics-1.2.2/src/synaptics.c just after the line 2518 where it says:

Bool inside_active_area;

/* update hardware state in shared memory */
if (shm)
{
shm->x = hw->x;
shm->y = hw->y;
shm->z = hw->z;
...

Now it should look like:

Bool inside_active_area;

if (hw->x == 1 && hw->y == 5855)
{
hw->numFingers = 0;
hw->fingerWidth = 0;
hw->z = 0;
hw->x = HIST(0).x;
hw->y = HIST(0).y;
}

/* update hardware state in shared memory */
if (shm)
{
shm->x = hw->x;
shm->y = hw->y;
shm->z = hw->z;


now in the F13 driver
there is no file such as "synaptics.c"
so I don't know what to modify :confused:

Dies
9th July 2010, 02:52 PM
Hmm... I'm not sure what you downloaded, but that file is definitely in the xorg-x11-drv-synaptics source rpm.

BUT it's only around 2400 lines so...

ForLorn SouL
9th July 2010, 03:27 PM
^^
I'm trying to find the correct line :)
sorry my reply above was to Parish
before I see ur solution
I'm working on it now

---------- Post added at 05:27 PM CDT ---------- Previous post was at 04:56 PM CDT ----------

Here's the quick and dirty way.

yumdownloader --source xorg-x11-drv-synaptics
su -c 'yum-builddep xorg*rpm'
rpm -ivh xorg*.src.rpm
cd ~/rpmbuild/SOURCES/
tar xvf xf*bz2
rm xf*bz2
vi xf86-input-synaptics-1.2.2/src/synaptics.c
tar cjvf xf86-input-synaptics-1.2.2.tar.bz2 xf86-input-synaptics-1.2.2/
rm -rf xf86-input-synaptics-1.2.2
cd ../SPECS/
rpmbuild -bb xorg-x11-drv-synaptics.spec

You'll find the resulting rpm packages in the ~/rpmbuild/RPMs directory.

By the way the only difference between this and the proper way is that you would not directly edit the files but instead generate a patch, then modify the spec file to apply your new patch.

AWEEEEEEEEEESOME :D

it works 100%
although I had to use natiuls to modify the file and save
because i didn't know how to save it using the terminal

otherwise everthing worked great

thaaaaaaanx alot :cool:

Hindoria Travel Photos on Instagram - Tanauan Instagram Photos - Viru