LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-03-2012, 07:53 AM   #1
transitive
LQ Newbie
 
Registered: May 2012
Posts: 12

Rep: Reputation: Disabled
[Solved] The dreaded RAT7 Cyborg Mouse


I thought I would post this here as I have spent quite a while getting this to sit nicely with Slackware.

Background: I have the Cyborg RAT7 mouse. I had it working a treat with Ubuntu. I turned my back on Ubuntu and installed Slackware 13.37. I forgot every step I took getting the mouse working, so I researched it from scratch.

Fresh install of Slackware 13.37. XFCE Desktop is running.

I chased this one all over last night. But this morning I sorted my last issue and I have been using it all day error free.

Open a terminal!
1- Run: 'xinput -list' (minus the ' ') to id the mouse.

2- run: 'xinput test [number]' [number] is the id number from xinput -list. On my system I would type: 'xinput test 16'.

When you do this you get an output scrolling up the terminal window. Press buttons, note down the numbers.

Why? The RAT7 is a fiend with the button registered as 13, 14, 15. Avoid pushing it. It's the 'mode' button near the left button (usually number 1)

3- open your /etc/X11/xorg.conf in your favourite editor.

4- Find the mouse section, the bit before the monitor section. Add this:
Section "InputClass"
Identifier "R.A.T."
MatchProduct "R.A.T.7|R.A.T.9"
MatchDevicePath "/dev/input/event*"
Option "Buttons" "17"
Option "ButtonMapping" "1 2 3 4 5 0 0 8 9 7 6 12 0 0 0 16 17"
Option "AutoReleaseButtons" "13 14 15"
Option "ZAxisMapping" "4 5 6 7"
EndSection


That long list for Option 'buttonmapping' with the zeros in it tells your system to ignore 13,14,15. Looking at mine, I seem to be ignoring 6 and 7 too. Mind you, they didn't register as anything so I'm leaving mine like that.

5- Save the file.

Now, most other places I have seen tell you to restart X and do a lap of honour. But I still had problems.

It seems that GPM does not play well with this little mousey. So, if you did your mouseconfig on the install and said yes to GPM, turn it off.

6- Turn off GPM (either type: '/etc/rc.d/rc.gpm stop' in a terminal (as root), or chmod the script and reboot, or something.) Just stop it running.

7- So, you've edited xorg.conf, turned off GPM. Plug in the mouse. Restart X (or reboot).

8- My god it might just work! if it is flying across the screen as it is too fast, type this:

'xinput --set-prop "Saitek Cyborg R.A.T.7 Mouse" "Device Accel Constant Deceleration" 3'

'3' can be changed to suit your speed tastes. Other solutions tell you to put this in a script and run it on user log in. Me? I have it lurking in my bash history because I am lazy.

After all that you might want to use the buttons for something. On Ubuntu I used 'Btnx' and 'Btnx-config'. But it looks like a simpler solution is to use 'xbindkeys'. There's a Slackpack for that, apparently!

If anything I hope this brainfart of an explanation helps. I tried using edev modules, different settings, all kinds of things.

The above is what I ended up doing.

Oh, and 'xinput test 16'? All those button numbers you wrote down can be fed into btnx, or xbindkeys. Handy because you have them written down already (in theory!).
 
Old 05-03-2012, 09:32 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Thanks for posting this.
 
Old 05-03-2012, 06:41 PM   #3
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Rep: Reputation: 20
I also appreciate this. The mouse generally worked fine for me if I killed X after first starting it and restarting X, but that wasn't anywhere near ideal.
 
Old 05-03-2012, 07:31 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Awesome guide...thanks. BTW, you may want to consider posting this (or having it moved) under General->Success Stories. Either way, I'm glad someone else documents things!
 
Old 05-04-2012, 02:26 AM   #5
transitive
LQ Newbie
 
Registered: May 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
No problems!

Slight issue still to resolve though. Like many other users, I am having to log out and back in to get the mouse to behave. On the second go, everything is fine. But it is Friday and my debug head is not on (kids coming round, man the battle stations!).

I am tempted to write up how I got SLack 13.37 rolled out on my Macbook. Soon perhaps.

[EDIT]
Can someone with superpowers move this thread?

Last edited by transitive; 05-04-2012 at 02:30 AM. Reason: ask the admin a nice request
 
Old 05-08-2012, 02:54 AM   #6
transitive
LQ Newbie
 
Registered: May 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
Final update for this thread.

Still no solution for the need to restart X, but BTNX is up and running.

How to get BTNX to map buttons and events to your RAT7

1 go and get the slackpack of BTNX, BTNX-config and Libdaemon.

I am using 'btnx-0.4.11-i486-3ng' for Slackware 13.0. It works on 13.37.

2 Install said Slackpacks. I will not try and teach old dogs news tricks here, you all have your methods.

3 Log out of user.

4 Log into an X session as Root.

5 Open terminal and run btnx-config.

6 Follow instructions for assigning buttons in btnx (remember those buttons you noted from xinput test? Yep, use those again!). DON'T PRESS OR USE THAT DAMN MODE BUTTON THOUGH!

7 After using btnx-config, run btnx.

8 Test your new button config on a few windows and webpages (you may encounter a Google-Chrome bug that assigns the two buttons by your thumb to 'page forward' and 'page back' in browser history. I am looking into solving this damn issue.

9 Open /etc/rc.d/rc.local in your favourite editor.Add:
#btnx for mouse buttons
/usr/local/bin/btnx &

to the file.I didn't put it at the bottom. You might.

10 Reboot or run /etc/rc.d/rc.local again.

11 Jump up and down like a happy idiot when the mouse works as expected (after restarting X11 obviously).
 
1 members found this post helpful.
Old 05-08-2012, 05:38 PM   #7
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Nice and informative post and research
 
Old 05-09-2012, 05:50 AM   #8
transitive
LQ Newbie
 
Registered: May 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
It is not 100% sorted (restart X issue), but it is manageable. Are there specific logs I can have a look through when X starts and then terminates? Perhaps there is something there that jumps out?

EDIT: off to look at /var/log/Xorg.0.log and others.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cyborg RAT7 Gaming Mouse on Linux spudgunner Linux - Hardware 3 08-14-2013 09:43 AM
[SOLVED] Saitek Cyborg mouse constantly disconnects from udev molafish Linux - Hardware 1 02-11-2011 01:14 PM
The dreaded mouse over bug in WoW ... please help dirtynerf Linux - Games 1 01-24-2007 09:48 PM
Erratic mouse SOLVED flashingcurser Slackware 0 10-17-2003 07:43 PM
optical mouse sluggishness problem solved ahmetaa LinuxQuestions.org Member Success Stories 0 07-17-2003 11:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration