aboutsummaryrefslogtreecommitdiff
path: root/README
blob: 948ed377aba3e59debc1327ba6ca7057795b00c3 (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
Marson MT-601 USBLinux Daemon
=============================

What is it?
-----------

marsond is a daemon for Linux that fixes an issue with a particular
model of PS/2 => USB keyboard adaptor. The symptom: in games and
emulators, the Enter key only works sometimes. This is caused by the
firmware in the adaptor sending the keypress and release events only 8
milliseconds apart, which is about 10x as fast as a human could press
and release a key.

The specific hardware that has the Enter key problem for me is USB
vendor ID 04b4, product ID 0101, "Marson Keyboard and Mouse Link
Ver:ps2120L". It has a label on the front that says "USBLink", and on
the back, the model number is "MT606-1".

marsond uses the Linux uinput layer, so it's not portable to other
operating systems. If you're looking for a non-Linux solution, see:

https://slackware.uk/~urchlay/sdl-usblink-hack/


Prerequisites
-------------

- Recent-ish Linux kernel. Anything from 4.x up should be fine.
- Kernel headers.
- uinput support in the kernel. Most distros should have this.
- gcc or clang.
- make.
- perl.
- The usual Linux development stuff (shell, coreutils, etc).


Building
--------

The usual "make" and "make install". See the Makefile for variables
you can adjust.

If you want to build a static binary, you can't do it with glibc,
due to it needing libnss_compat at runtime (for the getpwnam() and
getgrnam() calls). You'll have to use something like musl-libc.


Running the daemon
------------------

Everyone seems to use a different init system these days. I only
provide an rc.marsond script for Slackware's SysV init. Basically, you
want to start up the daemon at boot, using whatever facility your OS
provides (systemd, s6, openrc, etc). It must be started as root, and
it will drop privileges after initialization and run as the 'nobody'
user by default. See the man page for other options you might want
to use.