moused(8): Add support for evdev protocol
The new daemon have following properties as compared with previous
incarnation:
- evdev protocol support for mices and touchpads. Additionally to
relative PS/2 and USB devices it enables console support for I2C/USB
touchpads and bluetooth mices.
- Other aged protocols like COM, raw PS/2 and X10 are dropped with only
exception of sysmouse. For those who still use them there is an
utility called msconvd(8).
- single daemon per system where hotplug is processed via devd socket.
Per device mode still supported too.
- Configuration and quirks files in libinput-compatible format.
Actually, the new moused config parser is taken from libinput.
The moused(8) can work in 2 modes:
1. Evdev support mode. It enables all previously mentioned devices.
It is enabled by deault.
2. Sysmouse support mode. All should work as before.
No new devices supported. To enable it add following lines to
/etc/rc.conf:
moused_port="/dev/psm0"
moused_nondefault_enable="YES"
One may add hw.usb.usbhid.enable=0 to /boot/loader.conf to enable
ums(4) driver which supports sysmouse protocol.
Differential Revision: https://reviews.freebsd.org/D52164
This commit is contained in:
+6
-2
@@ -586,15 +586,19 @@ font8x14="NO" # font 8x14 from /usr/share/{syscons,vt}/fonts/* (or NO).
|
||||
font8x8="NO" # font 8x8 from /usr/share/{syscons,vt}/fonts/* (or NO).
|
||||
blanktime="300" # blank time (in seconds) or "NO" to turn it off.
|
||||
saver="NO" # screen saver: Uses /boot/kernel/${saver}_saver.ko
|
||||
moused_nondefault_enable="YES" # Treat non-default mice as enabled unless
|
||||
moused_nondefault_enable="NO" # Treat non-default mice as enabled unless
|
||||
# specifically overridden in rc.conf(5).
|
||||
moused_enable="NO" # Run the mouse daemon.
|
||||
moused_type="auto" # See man page for rc.conf(5) for available settings.
|
||||
moused_port="/dev/psm0" # Set to your mouse port.
|
||||
moused_port="auto" # Set to your mouse port.
|
||||
moused_flags="" # Any additional flags to moused.
|
||||
mousechar_start="NO" # if 0xd0-0xd3 default range is occupied in your
|
||||
# language code table, specify alternative range
|
||||
# start like mousechar_start=3, see vidcontrol(1)
|
||||
msconvd_enable="NO" # Run the mouse protocol conversion daemon.
|
||||
msconvd_type="auto" # See rc.conf(5) man page for available moused_type-s.
|
||||
msconvd_ports="" # List of msconvd ports.
|
||||
msconvd_flags="" # Any additional flags to msconvd.
|
||||
allscreens_flags="" # Set this vidcontrol mode for all virtual screens
|
||||
allscreens_kbdflags="" # Set this kbdcontrol mode for all virtual screens
|
||||
|
||||
|
||||
@@ -273,6 +273,7 @@ JAILPACKAGE= jail
|
||||
.if ${MK_LEGACY_CONSOLE} != "no"
|
||||
CONFGROUPS+= CONSOLE
|
||||
CONSOLE+= moused
|
||||
CONSOLE+= msconvd
|
||||
CONSOLE+= syscons
|
||||
CONSOLEPACKAGE= console-tools
|
||||
.endif
|
||||
|
||||
Executable
+61
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
#
|
||||
|
||||
# PROVIDE: msconvd
|
||||
# REQUIRE: DAEMON FILESYSTEMS
|
||||
# KEYWORD: nojail shutdown
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="msconvd"
|
||||
desc="Mouse protocol conversion daemon"
|
||||
command="/usr/sbin/${name}"
|
||||
start_cmd="msconvd_start"
|
||||
pidprefix="/var/run/msconvd"
|
||||
load_rc_config $name
|
||||
|
||||
: ${msconvd_enable="NO"}
|
||||
: ${msconvd_type="auto"}
|
||||
|
||||
# doesn't make sense to run in a svcj: nojail keyword
|
||||
# XXX: How does msconvd communiacte with the kernel?
|
||||
# XXX: Does the kernel prevent this communcation in jails?
|
||||
msconvd_svcj="NO"
|
||||
|
||||
# Set the pid file and variable name. The second argument, if it exists, is
|
||||
# expected to be the mouse device.
|
||||
#
|
||||
if [ -n "$2" ]; then
|
||||
eval msconvd_$2_enable=\${msconvd_$2_enable-${msconvd_enable}}
|
||||
rcvar="msconvd_$2_enable"
|
||||
pidfile="${pidprefix}.$2.pid"
|
||||
else
|
||||
for ms in ${msconvd_ports}; do
|
||||
/etc/rc.d/msconvd $1 ${ms}
|
||||
done
|
||||
exit 0
|
||||
fi
|
||||
|
||||
msconvd_start()
|
||||
{
|
||||
local ms myflags myport mytype
|
||||
|
||||
# Set the mouse device and get any related variables. If
|
||||
# a msconvd device has been specified on the commandline, then
|
||||
# rc.conf(5) variables defined for that device take precedence
|
||||
# over the generic msconvd_* variables. The only exception is
|
||||
# the msconvd_port variable, which if not defined sets it to
|
||||
# the passed in device name.
|
||||
#
|
||||
ms=$1
|
||||
eval myflags=\${msconvd_${ms}_flags-$msconvd_flags}
|
||||
eval myport=\${msconvd_${ms}_port-/dev/${ms}}
|
||||
eval mytype=\${msconvd_${ms}_type-$msconvd_type}
|
||||
|
||||
startmsg -n "Starting ${ms} ${name}"
|
||||
${command} ${myflags} -p ${myport} -t ${mytype} -I ${pidfile}
|
||||
startmsg '.'
|
||||
}
|
||||
|
||||
run_rc_command $*
|
||||
Reference in New Issue
Block a user