From nobody Wed Jul 30 08:31:58 2025 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bsQSf1688z63Mjh for ; Wed, 30 Jul 2025 08:32:34 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bsQSf011Tz429f for ; Wed, 30 Jul 2025 08:32:34 +0000 (UTC) (envelope-from wulf@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753864354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sjIiKw8xoHF/+M5Z6DjJYWQGX8Oc8VUPVbWbgmLoS34=; b=ir7uxpOYxutpqMTbwcDzFoQBEr31hkuMyaxutGsgo+zD3ZuYwyOU/KQITbito9DDu8wS7l WHY0djWlYxM7xwSIVHqkFKSl2gHTGyNF8357U8x8XcekJq8gRaJmAcsCuF1gFg5CEf150w +CLrRwFeLXP/VU9ZXFb7SvyBCdnJjRHNf8qOCUwRI1t9ynIVnnaz3+ugR7kG01mdjJeg/h lhZCgBz4r2z14zZ5fVBSQPNoQXxJIYTFDi09aSdZIn3ZwOiXbTDPsfa6s3RzTlUBX6k31Z WQIaqEo0ZfgX4YgtFuFXlD+oAcxrC9fVRdfGFTQLUmnjH18VNkyS+TipUxC5Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753864354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sjIiKw8xoHF/+M5Z6DjJYWQGX8Oc8VUPVbWbgmLoS34=; b=v1f+8LfzEu6qqfVfGl5ltnhBXSBIIyP4UPgsqv1DgNZEfGmluFk9/ERLgaml+coD08Igsg BK69xiBsX+4Rt/mdkrIx4UtpPJ31sRkB+VLI3neq3irN8/o6kSgYdiO205Str54nHa/xfW WxtiCd3p9XeCBL+vyIBXQ+lMTsgu02LsutDhOh7GJkwYkW8tKEm7SxoXIogrwemY2Q7vtT DXfxg67rCI5LDZXJCJVhkULQcHLaw5+nASDAhMzEUDfpBhQ7vm4pAgRLlvHEz1OQGvhWgf sKY1nwkdoa1Yz+BkD0nP54PHkx4Duw3ZjGGvX5jee8e0ANYrps6i3JBFEzLHSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753864354; a=rsa-sha256; cv=none; b=OcBaRBz3I+2pSivtKutBi//E71DknpKVQZYQhgzE+0ceun8c8rqtvvMSZTLVSID+hQAkyD 8+1uX4ksYKTELjgqj1T+ZX6+djcX6TViRvNokCki7STHO3hO6L1C7ceOdjX+XNRPTf6rqE p3lIKUVkzfG2BJqPxOiNqBBGWz30d3Gzy/d5FG6sWpmJspGHr6X4NRLREJdmoPJLTyoJgq S66FHz281Uv85frjiHk64ai3AuTYz5zFNEH6Y+K9cEJoYRkLP1eRoJgT3uBB7ixmbTn6qm LF9ApyM5p1vTzQHeNqCAbJ9mSdFNJJUBLoTgJeETyzCjJZgtsfW8EmR0wFyGCw== Received: from [192.168.0.30] (unknown [176.120.244.184]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: wulf) by smtp.freebsd.org (Postfix) with ESMTPSA id 4bsQSd4n1Szstr for ; Wed, 30 Jul 2025 08:32:33 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Message-ID: Date: Wed, 30 Jul 2025 11:31:58 +0300 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Vladimir Kondratyev Subject: CFT: evdev-awared moused Content-Language: en-US To: current@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi all, With some non-zero probability FreeBSD15 will have usbhid(4) enabled by default. See e.g. https://reviews.freebsd.org/D45659. That results in USB mices stop to work in virtual terminals as ums(4) replacement called hms(4) is not compatible with current moused(8) due to lack of legacy protocols support. To fix that I reworked our old good moused(8): https://github.com/wulf7/moused 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. - 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 stolen from libinput. No problem here as it is MIT-licensed. https://github.com/wulf7/moused Recommended installation method is through the port enclosed in port directory Although distribution bundle includes own rc file, I would prefer to test it as direct replacement of system daemon. So do not enable bundled rc file but change path to mouse daemon in system /etc/rc.d/moused from /usr/sbin/moused to /usr/local/sbin/moused (in two places) and than test it in 2 modes: 1. Sysmouse support mode. All should work as before. No new devices supported and no configuration changes required. Just kill and start again all instances of moused. In this mode recent (as of July 2025) CURRENT is required for psm(4) driver to work. This mode is planned for transition period to follow POLA. 2. Evdev support mode. It enables all previously mentioned devices. To enable it add following lines to /etc/rc.conf: moused_port="auto" moused_nondefault_enable="NO" Caveats: Some drivers are known to be incompatible with the Subj. 1. cyapa(4) - lack of sysmouse protocol support. I prepared a patch for it and can send it to any who able to perform a test on real hardware. 2. ams(4) - no evdev and kqueue support. One should implement them or use aforementioned msconvd utility. -- WBR Vladimir Kondratyev