You are not logged in.

#1 2005-03-14 20:48:06

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

evdev + logitech mx510 + xorg patches

I've been trying to get my Logitech Mx510 mouse (10 buttons) working for 2 weeks, on and off, and finally realized today that I would have to patch and rebuild XOrg to make it work. sad

I know what's required, and I know how to do it, but the technical parts are over my head (patch files confuse me to no end).

Would someone else be willing to help me out with this? I think that several people (fellow gamers?  wink ) could benefit from having a fully working 7+ button mouse.

Anyways, using the default XOrg PKGBUILD + new patches should work fine, but the Gentoo patches have to be re-written to work with Arch.

Gentoo xorg-evdev patches:
http://dev.gentoo.org/~spyderous/xorg-x … e-v3.patch
http://dev.gentoo.org/~spyderous/xorg-x … d-v2.patch
http://dev.gentoo.org/~spyderous/xorg-x … ouse.patch

All of those need to be rewritten in minor ways to patch Arch's more vanilla sources properly. Like I said, patch files confuse the hell out of me, so someone a bit more intelligent than myself who's willing to help will be my personal hero.  8)

Almost forgot to add a link to the original article that inspired to start all this: Get  all mouse buttons working.

Thank you. smile


·¬»· i am shadowhand, powered by webfaction

Offline

#2 2005-03-15 00:35:46

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

Re: evdev + logitech mx510 + xorg patches

No one is interested? Should I move this to requested packages possibly?


·¬»· i am shadowhand, powered by webfaction

Offline

#3 2005-03-15 05:48:28

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

Re: evdev + logitech mx510 + xorg patches

Mmmmmk, could someone move this to Requested Packages?


·¬»· i am shadowhand, powered by webfaction

Offline

#4 2005-03-15 06:14:22

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Offline

#5 2005-03-15 11:45:12

Mythoz
Member
Registered: 2004-04-25
Posts: 58

Re: evdev + logitech mx510 + xorg patches

No need to rewrite the Gentoo patches. Just apply the following patch to the the original xorg PKGBUILD:

$ patch -p0 -i xorg-evdev-pkgbuild.patch

Edit the patched PKGBUILD and comment out this line if you don't have a modern CPU with SSE support.

echo $'#define HasKatmaiSupport YESn' >>config/cf/host.def

xorg-evdev-pkgbuild.patch:

--- PKGBUILD.org    2005-03-15 12:27:47.000000000 +0100
+++ PKGBUILD    2005-03-15 11:18:50.000000000 +0100
@@ -2,7 +2,7 @@
 # Maintainer: judd <jvinet@zeroflux.org>
 pkgname=xorg
 pkgver=11R6.8.2
-pkgrel=2
+pkgrel=2my
 pkgdesc="A fork of the XFree86 Project with a GPL-compatible license"
 url="http://www.x.org"
 depends=('glibc' 'freetype1' 'fontconfig' 'gcc' 'libpng')
@@ -13,11 +13,17 @@
 install=x.install
 source=(http://ftp.skynet.be/pub/ftp.x.org/pub/X${pkgver}/src-single/X${pkgver}-src.tar.bz2 
         http://www.joerg-pommnitz.de/TrueType/ttmkfdir.tar.gz xdm.pam 
-        libGL.la xorg.sh vm86-tls.patch)
+        libGL.la xorg.sh vm86-tls.patch 
+        http://dev.gentoo.org/~spyderous/xorg-x11/patchsets/6.8.2/patch/9000_all_6.7.99.2-lnx-evdev-core-v3.patch 
+        http://dev.gentoo.org/~spyderous/xorg-x11/patchsets/6.8.2/patch/9001_all_4.3.0-lnx-evdev-keyboard-v2.patch 
+        http://dev.gentoo.org/~spyderous/xorg-x11/patchsets/6.8.2/patch/9002_all_6.7.0-lnx-evdev-mouse.patch 
+        http://dev.gentoo.org/~spyderous/xorg-x11/patchsets/6.8.2/patch/9010_all_6.7.99.1-logitech-ps2-plusplus-v2.patch)
 md5sums=('8131cd7ea1e4566e6e05c438a93fcfe1' 'dcf6aa4d28f5c52acf2bb57f49f53089'
          '419d6289ba6f851135f5c70c0e3cbec4' '6b4052cf6d50cbd2854ebd3409f02695'
-         '4e052c5e16a17a99b02c6b64d10b1636' '0e34d03a727cd24519e0fc7f9374fa29')
-
+         '4e052c5e16a17a99b02c6b64d10b1636' '0e34d03a727cd24519e0fc7f9374fa29'
+         '3f6409aca9bda356b70f6d50d8dd5623' 'eaa2cfd047687ced295721982b81275e'
+         '3beb384ac87aeac0678a59fc49f2b520' '080a481ffc8ee6a327841e5679436c33')
+         
 build() {
   cd $startdir/src
   make FREETYPE_INCL=/usr/include/freetype || return 1
@@ -25,6 +31,11 @@
 
   cd $startdir/src/xc
   patch -Np0 -i ../vm86-tls.patch || return 1
+  patch -Np1 -i ../9000_all_6.7.99.2-lnx-evdev-core-v3.patch || return 1
+  patch -Np1 -i ../9001_all_4.3.0-lnx-evdev-keyboard-v2.patch || return 1
+  patch -Np1 -i ../9002_all_6.7.0-lnx-evdev-mouse.patch || return 1
+  patch -Np1 -i ../9010_all_6.7.99.1-logitech-ps2-plusplus-v2.patch || return 1
+  
   # build fixes
   sed -i 's|$(HARDCOPYDIR)||g' doc/Imakefile || return 1
   echo $"#define DefaultGcc2i386Opt $CFLAGS -fno-strength-reduce -fno-strict-aliasing" >config/cf/host.def
@@ -43,7 +54,7 @@
   echo $'#define HasMTRRSupport YESn' >>config/cf/host.def
   echo $'#define HasMMXSupport YESn' >>config/cf/host.def
   # Katmai: PIII SSE instructions;  3DNow: AMD instructions
-  #echo $'#define HasKatmaiSupport YESn' >>config/cf/host.def
+  echo $'#define HasKatmaiSupport YESn' >>config/cf/host.def
   #echo $'#define Has3DNowSupport YESn' >>config/cf/host.def
   make World || return 1
   make DESTDIR=$startdir/pkg install

Offline

#6 2005-03-15 20:54:47

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

Re: evdev + logitech mx510 + xorg patches

Well gee, I feel retarded now. Thanks for your help. It's working great.


·¬»· i am shadowhand, powered by webfaction

Offline

#7 2005-03-17 05:11:08

eedok
Member
From: Canada
Registered: 2004-07-03
Posts: 19
Website

Re: evdev + logitech mx510 + xorg patches

maybe you can post a step by step guide on how you got it working(or maybe put it on the wiki)?

Offline

#8 2005-03-17 09:47:06

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: evdev + logitech mx510 + xorg patches

If you could describe what it actually does and give a motivation why it should be in arch, post it as a feature request in the bugtracker for xorg.

Currently we have an Xft bug in xorg, so it would be nice to have the next fixed release of xorg with this in if it's useful for most archlinux users.

Offline

#9 2005-03-17 19:56:01

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

Re: evdev + logitech mx510 + xorg patches

eedok wrote:

maybe you can post a step by step guide on how you got it working(or maybe put it on the wiki)?

-------------------------------------------------------------------------------

(The following is all done from a command line, logged in as root)

#abs
#mkdir /var/abs/local
#cd /var/abs/local
#mkdir /var/abs/local/xorg-ev
#cd /var/abs/local/xorg-ev
#cp /var/abs/x11/xorg/PKGBUILD .

At this point, you are almost ready to begin, but you need the patch listed above. Copy and paste it into a text file and call it xorg-ev-pkgbuild.patch, and save it to /var/abs/local/xorg-ev/ .

#patch -p0 -i xorg-ev-pkgbuild.patch PKGBUILD
#makepkg
#pacman -U xorg-*.pkg.tar.gz

Restart X, then follow the tutorial at Linux Gamers to get the rest of your mouse buttons working.

-------------------------------------------------------------------------------

There you go. That should do it. It worked beautifully for me.


·¬»· i am shadowhand, powered by webfaction

Offline

#10 2005-04-16 02:39:57

rayzorblayde
Member
Registered: 2004-01-04
Posts: 67

Re: evdev + logitech mx510 + xorg patches

shadowhand wrote:
eedok wrote:

maybe you can post a step by step guide on how you got it working(or maybe put it on the wiki)?

-------------------------------------------------------------------------------

(The following is all done from a command line, logged in as root)

#abs
#mkdir /var/abs/local
#cd /var/abs/local
#mkdir /var/abs/local/xorg-ev
#cd /var/abs/local/xorg-ev
#cp /var/abs/x11/xorg/PKGBUILD .

At this point, you are almost ready to begin, but you need the patch listed above. Copy and paste it into a text file and call it xorg-ev-pkgbuild.patch, and save it to /var/abs/local/xorg-ev/ .

#patch -p0 -i xorg-ev-pkgbuild.patch PKGBUILD
#makepkg
#pacman -U xorg-*.pkg.tar.gz

Restart X, then follow the tutorial at Linux Gamers to get the rest of your mouse buttons working.

-------------------------------------------------------------------------------

There you go. That should do it. It worked beautifully for me.


THANKS!  except i noticed one problem with what you have... at least i had a problem.

the command:

#cp /var/abs/x11/xorg/PKGBUILD .

should in fact be:

#cp /var/abs/x11/xorg/* .


when doing the makepkg, it kept looking for files that were contained in the /var/abs/x11/xorg directory, that werent' in the current build directory.

other than that MINOR thing, it seems to be working just fine (still compiling X....)

thanks again!


loading.... please wait....

Offline

#11 2005-04-16 23:48:16

rayzorblayde
Member
Registered: 2004-01-04
Posts: 67

Re: evdev + logitech mx510 + xorg patches

This is great!

I hope all new Xorg package builds are made with evdev support wink

The only problem im' now having is that i cannot get the following command to take effect when X starts:

xmodmap -e "pointer = 1 2 3 6 7 8 9 10 4 5"

if i run that manually on the cli after i boot into KDE, everything works just fine.

Here's what i already tried (adding the line from the linux-gamers howto article):

1) editing ~/.Xmodmap
2) editing /usr/X11R6/bin/startx
3) editing /etc/X11/xinit/xinitrc
4) editing ~/.xinitrc


none of them work. even after a full reboot of the system. sad

where can i put the command so it loads after X is already initialized?
it seems like when it's in any of those files, it runs the command, but too quickly, such that X doesn't get a chance to fully initialize.

any help is appreciated.  thanks!


loading.... please wait....

Offline

#12 2005-04-18 13:01:30

Mythoz
Member
Registered: 2004-04-25
Posts: 58

Re: evdev + logitech mx510 + xorg patches

At first you must update your abs tree:

$ abs

Then

$ cd /var/abs/local || echo "error"

(create the 'local' directory if it does not exisits)

Now copy the entire xorg directory

$ cp -a /var/abs/x11/xorg xorg-ev && cd xorg-ev || echo "error"

Download the patched PKGBUILD (note: I adden one more patch: 9003_all_6.8.2-lnx-evdev-keyboard-dont-grab.patch) and overwrite the old one:

$ wget http://www.mythosgarden.de/archlinux/PKGBUILD.xorg-evdev -O PKGBUILD

Build the package and get some coffee

$ makepkg

If everything went without glitches, you should have a package now:

$ pacman -U xorg-11R6.8.2-2my.pkg.tar.gz

Note: Personally I use the original archlinux package without this patches, so I can't tell if everything plays nicely together.

Offline

#13 2005-04-19 22:20:07

rayzorblayde
Member
Registered: 2004-01-04
Posts: 67

Re: evdev + logitech mx510 + xorg patches

Cat wrote:

Ok, that worked.

Next problem is, that when I change the protocol in the xorg.conf to "evdev" I get the error message, that "evdev" is an unknown protocol.

But patching worked flawless...

did you add 'evdev' to the modules section in your rc.conf file?

MODULES=(evdev)

loading.... please wait....

Offline

#14 2005-04-19 22:22:08

rayzorblayde
Member
Registered: 2004-01-04
Posts: 67

Re: evdev + logitech mx510 + xorg patches

can anyone help me with my question posted above?  i can't get the xmodmap thing to work on startup.  i have to manually run the command (well, an executable text file)  sad


loading.... please wait....

Offline

#15 2005-04-19 23:31:19

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

Re: evdev + logitech mx510 + xorg patches

Run it in .xinitrc or in rc.local.


·¬»· i am shadowhand, powered by webfaction

Offline

#16 2005-04-20 13:34:00

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

Re: evdev + logitech mx510 + xorg patches

Try this as root:

strings /usr/X11R6/bin/X | grep evdev

If that doesn't return anything, evdev wasn't compiled into XOrg. Unless you followed the instructions in my post about recompiling XOrg with evdev support, it's not going to work.

Since you are using KDE, try running a script as an autostart program. Xmodmap has to be run after the XServer starts up.


·¬»· i am shadowhand, powered by webfaction

Offline

#17 2005-04-22 00:07:42

rayzorblayde
Member
Registered: 2004-01-04
Posts: 67

Re: evdev + logitech mx510 + xorg patches

shadowhand wrote:

Run it in .xinitrc or in rc.local.


neither works.  maybe i am putting the wrong thing in there?

~/.xinitrc - (I purposely put in both versions with exec and without just to see if there was a difference... nope)

#!/bin/sh

#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#

#exec wmaker
exec startkde
# exec icewm
# exec blackbox
# exec fluxbox

exec xmodmap -e "pointer = 1 2 3 6 7 8 9 10 4 5"
xmodmap -e "pointer = 1 2 3 6 7 8 9 10 4 5"

/etc/rc.local

#!/bin/sh
#
# /etc/rc.local: Local multi-user startup script.
#

xmodmap -e "pointer = 1 2 3 6 7 8 9 10 4 5"
exec xmodmap -e "pointer = 1 2 3 6 7 8 9 10 4 5"

# End of file

if i run that exact same command (with or without 'exec') after KDE is already loaded, then everything works as it should.

it seems like i'm just having trouble making sure that the xmodmap command is run after everything else is initialized... or at least until after whatever it requires is initialized.

sad

i will try to check some logs and see what's going on and post back a litlte later.


loading.... please wait....

Offline

#18 2005-04-22 03:58:13

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

Re: evdev + logitech mx510 + xorg patches

Don't put it in both, and don't duplicate the entry. roll

Once again, xmodmap isn't going to do anything for you unless you compiled XOrg with evdev support. Also, xmodmap has to be started AFTER the X server starts, and your .xinitrc is screwy.

This is what it should look like (note the & symbol after the xmodmap line, it lets startx know to keep reading the rest of the file):

#!/bin/sh
#
# ~/.xinitrc
#
####
#This maps your mouse out properly
####
exec xmodmap -e "pointer = 1 2 3 6 7 8 9 10 4 5" &

####
#This starts KDE
####
exec startkde

# End of file

·¬»· i am shadowhand, powered by webfaction

Offline

#19 2005-04-26 20:54:44

rayzorblayde
Member
Registered: 2004-01-04
Posts: 67

Re: evdev + logitech mx510 + xorg patches

shadowhand wrote:

Don't put it in both, and don't duplicate the entry. roll

Once again, xmodmap isn't going to do anything for you unless you compiled XOrg with evdev support. Also, xmodmap has to be started AFTER the X server starts, and your .xinitrc is screwy.

This is what it should look like (note the & symbol after the xmodmap line, it lets startx know to keep reading the rest of the file):

#!/bin/sh
#
# ~/.xinitrc
#
####
#This maps your mouse out properly
####
exec xmodmap -e "pointer = 1 2 3 6 7 8 9 10 4 5" &

####
#This starts KDE
####
exec startkde

# End of file


I did recompile xorg with evdev support.  like i said earlier, it works just fine when i run the `xmodmap -e "pointer = 1 2 3 6 7 8 9 10 4 5"` command after i am logged into kde and everything is already started.

I tried your & trick in my .xinitrc file and it didn't work.  i'm not sure what's going on.  I'm trying to figure out if I can use a sleep command in the xinitrc file to startkde and then wait for like 30 seconds or something.. then run the command.  do you think that's possible?

anyway, i will have to wait a while to try it again.  i am in germany (stuttgart/sindelfingen if anyone here is from around there) until the 13th of may on business.

thanks for any help that you may provide


loading.... please wait....

Offline

#20 2005-04-26 21:19:15

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

Re: evdev + logitech mx510 + xorg patches

Try it as a KDE autostart program. I can't give directions on how to do this because I don't use KDE, but I think you can add a script to ~/.kde/Autostart or something like that. I'm guessing that KDE sets the mouse stuff itself, so you have to rerun it after KDE is started. Maybe... lol


·¬»· i am shadowhand, powered by webfaction

Offline

#21 2005-05-02 21:04:15

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

Re: evdev + logitech mx510 + xorg patches

wgskol wrote:

Create a file /home/<username>/.kde/Autostart/mouse.sh with this inside it

That was the path I didn't know...

Thanks for adding that wgskol.


·¬»· i am shadowhand, powered by webfaction

Offline

#22 2005-05-13 19:12:46

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: evdev + logitech mx510 + xorg patches

anyone wrote a feature request?


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#23 2005-05-18 19:28:57

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

Re: evdev + logitech mx510 + xorg patches

XOrg evdev support has been bug reported. The devs told me that it would be looked at when XOrg was going to be packaged again, but they wouldn't repackage just for this because XOrg is so big. *shrug* Fine with me.


·¬»· i am shadowhand, powered by webfaction

Offline

Board footer

Powered by FluxBB