summaryrefslogtreecommitdiffstats
path: root/README
blob: c779957b720b269dcde4c5c7c3067d478a2bff2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
******************************************
*  Razer device configuration tool       *
* Copyright (c) 2007-2009 Michael Buesch *
******************************************

This is a configuration utility for Razer devices on Linux systems.


DEPENDENCIES
============

 * python 2.x
   http://www.python.org/
   Debian Linux:
	apt-get install python

 * libusb
   http://libusb.sourceforge.net/
   Debian Linux:
	apt-get install libusb-dev

 * QT4 python bindings (for the graphical qrazercfg tool only)
   http://www.trollech.com/
   Debian Linux:
	apt-get install python-qt4

 * cmake (for building only)
   http://www.cmake.org/
   Debian Linux:
	apt-get install cmake

Note that almost all distributions ship prebuilt packages of the
above dependencies.


BUILDING
========

First invoke "cmake" to build the makefiles.
Then invoke "make" to build the binaries.

  cmake .
  make

(Note the required space and dot after the cmake command)


INSTALLING
==========

First you need to install the tool libraries and binaries. Do this by typing
in the following commands:

  sudo -i	# become root
  make install
  ldconfig

To automatically start the required system daemon "razerd" at system bootup time,
you need to install the init-script. This software package includes a generic
example script, that should work out-of-the-box on many Linux distributions.
To install it, invoke the following commands:

  sudo -i	# become root
  cp ./razerd.initscript /etc/init.d/razerd
  ln -s /etc/init.d/razerd /etc/rc2.d/S99razerd
  ln -s /etc/init.d/razerd /etc/rc5.d/S99razerd
  ln -s /etc/init.d/razerd /etc/rc0.d/K01razerd
  ln -s /etc/init.d/razerd /etc/rc6.d/K01razerd


UDEV notification:

The  make install  step did already install the UDEV script automatically.
It installed the script to
  /etc/udev/rules.d/01-razer-udev.rules
This should work on most distributions.

Please reboot the machine or enter the following command to activate the
udev notification:

  udevadm control --reload_rules


X11-WINDOW (X.ORG) CONFIGURATION
================================

The X-server must _not_ be configured to a specific mouse device like /dev/input/mouse0,
because on configuration events razerd has to temporarly unregister the mouse from the
system. This will confuse the X-server, if it's configured to a specific device.
Configure it to the generic /dev/input/mice device instead. This will enable the X-server
to pick up the mouse again after a configuration event from razerd.

Example xorg.conf snippet:
...
  Section "InputDevice"
    Identifier	"Mouse"
    Driver	"mouse"
    Option	"Device" "/dev/input/mice"
  EndSection
...

Alternatively do not specify a "Device" at all. The X-server will autodetect
the device then:
...
  Section "InputDevice"
    Identifier	"Mouse"
    Driver	"mouse"
  EndSection
...

In any case, do _NOT_ use:
    Option	"Device" "/dev/input/mouseX"


USING THE TOOLS
===============

To use the tools, the "razerd" daemon needs to be started as root, first.
Without the background daemon, nothing will work. The daemon is responsible
for doing the lowlevel hardware accesses and for tracking the current state
of the device.
While the daemon is running, the user interfaces "razercfg" (commandline) and
"qrazercfg" (graphical user interface) can be used.


ARCHITECTURE
============

The architecture layout of the razer tools looks like this:


 -------------------
| hardware driver 0 |--v
 -------------------   |
                       |    ----------
 -------------------   |   | lowlevel |     --------      ---------
| hardware driver 1 |--x---| librazer |----| razerd |----| pyrazer |
 -------------------   |    ----------      --------      ---------
                       |                        |           ^ ^ ^
 -------------------   |                   -----------      | | |
| hardware driver n |--^                  | librazerd |     | | |
 -------------------                       -----------      | | |
                                              ^ ^ ^         | | |
                                              | | |         | | |
                           ---------------    | | |         | | |
                          | Application 0 |---^ | |         | | |
                           ---------------      | |         | | |
                                                | |         | | |
                           ---------------      | |         | | |
                          | Application 1 |-----^ |         | | |
                           ---------------        |         | | |
                                                  |         | | |
                           ---------------        |         | | |
                          | Application n |-------^         | | |
                           ---------------                  | | |
                                                            | | |
                           ----------                       | | |
                          | razercfg |----------------------^ | |
                           ----------                         | |
                                                              | |
                           -----------                        | |
                          | qrazercfg |-----------------------^ |
                           -----------                          |
                                                                |
                            --------------------------          |
                          | Other Python applications |---------^
                           ---------------------------

So in general, your application wants to access the razer devices through
pyrazer or (if it's not a python app) through librazerd.
(Note that librazerd is not written, yet. So currently the only way to
access the devices is through pyrazer).
Applications should never poke with lowlevel librazer directly, because there
will be no instance that keeps track of the device state and permissions and
concurrency.
bues.ch cgit interface