summaryrefslogtreecommitdiff
path: root/Evemu.mdwn
blob: dbd7e376f9f6afa9911598b9b2980ca0e817b98e (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


# evemu

evemu records and replays device descriptions and events, making it possible to emulate input devices through the kernel's input system. Emulated devices are for most practical purposes indistinguishable from real devices. 

**Note:** evemu cannot record events while another process has an EVIOCGRAB on the device. This is the case for the X.Org synaptics and wacom drivers, you must disable the devices or VT-switch away before running evemu-record to see events. 


## Getting evemu

Check your distribution's package list for the evemu package. If it is not present, you can get the source from 


[[!format txt """
        $> git clone git://git.freedesktop.org/git/evemu
        $> cd evemu
        $> ./autogen --prefix=/usr
        $> make && sudo make install
"""]]
For Red Hat Enterprise Linux 6 and compatible distributions, a [[yum repository|http://people.redhat.com/~phuttere/rpms/evemu/evemu.repo]] and [[the packages|http://people.redhat.com/~phuttere/rpms/evemu/]] are available. 


## Running evemu

evemu provides multiple binaries for recording and replaying devices: 
evemu-describe /dev/input/event0 > mydevice.desc
: Prints a description of the device specified into mydevice.desc. 

evemu-record /dev/input/event0 > mydevice.events
: Prints the list of events from the device into mydevice.events until terminated by Ctrl + C 

evemu-device mydevice.desc
: Creates a virtual input device based on the description created by evemu-describe and prints the device node. 

evemu-play /dev/input/event12 < mydevice.events
: Sends the events in mydevice.events through the given device node, thus replaying them. mydevice.events must be generated by evemu-record 



## Grabbed devices

evemu-record cannot see events while another process has an EVIOCGRAB on the device. This is the case for the X.Org synaptics and wacom drivers, you must disable the devices or VT-switch away before running evtest to see events. Devices can be disabled with 

                                 * xinput set-prop "my device name" "Device Enabled" 0 
If you need the device enabled to verify that the bug is indeed triggered, use the following xorg.conf.d snippet: 
[[!format txt """
$> cat /etc/X11/xorg.conf.d/99-synaptics-dontgrab.conf
Section "InputClass"
        Identifier "Don't grab synaptics"
        MatchDriver "synaptics"
        Option "GrabEventDevice" "off"
EndSection
"""]]
Once saved, restart your server and evemu can now record while the synaptics is running. 


## Submitting useful evemu recordings

* Find out the right device file by checking /proc/bus/input/devices. The HANDLERS line tells you which event device to record. e.g. H: Handlers=kbd event2 means you need to record /dev/input/event2. 
* Pipe the evemu-describe and evemu-record information into a file. 
* Verify that both files contain data, a 0-byte file usually indicates the device is grabbed. 
* When reproducing the event sequence that triggered the bug, try to reproduce only the event sequence that triggered the bug, no unrelated events. Keep in mind that event sequences are are raw device data. If specific pointer positioning on the target host is required, this must be noted separately in the bug report. 
* Attach both files separately, do not zip them as a tarball 
[[https://wiki.ubuntu.com/Multitouch/Testing/Evemu|https://wiki.ubuntu.com/Multitouch/Testing/Evemu]] has further information and instructions on how to use evemu.  


# Reporting bugs

File a bug in the freedesktop bugzilla at [[https://bugs.freedesktop.org/enter_bug.cgi?product=evemu|https://bugs.freedesktop.org/enter_bug.cgi?product=evemu]]