From owner-freebsd-x11@freebsd.org Sun Sep 22 16:31:58 2019 Return-Path: Delivered-To: freebsd-x11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 24A30126776 for ; Sun, 22 Sep 2019 16:31:58 +0000 (UTC) (envelope-from greg@unrelenting.technology) Received: from out.migadu.com (out.migadu.com [91.121.223.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.migadu.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46btJY0FMSz3xb1 for ; Sun, 22 Sep 2019 16:31:56 +0000 (UTC) (envelope-from greg@unrelenting.technology) Received: (Migadu outbound); Sun, 22 Sep 2019 16:31:55 +0000 Received: from wms1-eu-central.migadu.com (wms1-eu-central.migadu.org [172.104.244.218]) by out.migadu.com (Haraka/2.8.16) with ESMTPSA id 3936EA4E-7D1E-462D-A89E-2126944A94AB.1 envelope-from (authenticated bits=0) (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 verify=FAIL); Sun, 22 Sep 2019 16:31:55 +0000 MIME-Version: 1.0 Date: Sun, 22 Sep 2019 16:31:54 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: RainLoop/1.12.1 From: greg@unrelenting.technology Message-ID: <300f65b7469c608ad4cd32a9ad6c41d6@unrelenting.technology> Subject: Re: Xorg with evdev input devices To: "Vasily Postnicov" Cc: freebsd-x11@freebsd.org In-Reply-To: References: DKIM-Signature: v=1; a=rsa-sha256; bh=b3sGx2bRFTz/g8Xc/cXqTHluFHLmht1XgShenp/pH4o=; c=relaxed/simple; d=unrelenting.technology; h=from:subject:date:to; s=default; b=ZUjSd2iZa091vtlWsT3v+mkvOGnS/ivAKaRbqTdK3zgTsiTrrseU/tMkKS/XacCuRsa64aF9yEo3++Zr6dz8YIQ2dDlxNFJk1wuaUHHQK+Hp9e8U31J6IjyaLP9lGJ4umcjF2/41k0WwcxvgkQdFqxlu37R8bqlC72vEZaM0lvg= X-Rspamd-Queue-Id: 46btJY0FMSz3xb1 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=unrelenting.technology header.s=default header.b=ZUjSd2iZ; dmarc=pass (policy=none) header.from=unrelenting.technology; spf=pass (mx1.freebsd.org: domain of greg@unrelenting.technology designates 91.121.223.63 as permitted sender) smtp.mailfrom=greg@unrelenting.technology X-Spamd-Result: default: False [-5.55 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[unrelenting.technology:s=default]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:91.121.223.63]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[unrelenting.technology:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[63.223.121.91.list.dnswl.org : 127.0.10.0]; FROM_NO_DN(0.00)[]; DMARC_POLICY_ALLOW(-0.50)[unrelenting.technology,none]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-2.55)[ip: (-9.85), ipnet: 91.121.0.0/16(-4.36), asn: 16276(1.44), country: FR(-0.00)]; ASN(0.00)[asn:16276, ipnet:91.121.0.0/16, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2019 16:31:58 -0000 September 22, 2019 7:12 PM, "Vasily Postnicov" w= rote:=0A=0A> Thanks, it works. The purpose of my evdev kernel support tes= ting is eventually switch to wayland.=0A> For this time I have all relate= d ports recompiled with WAYLAND option and also have x11-wm/sway=0A> inst= alled. Then I run following commands in terminal (I mean, without xorg se= rver running):=0A> =0A>> setenv XDG_RUNTIME_DIR /tmp=0A> =0A>> sway -d=0A= > =0A> Sway fails to start with the following log: https://pastebin.com/M= 3eExb0C=0A> =0A>> 2019-09-22 18:53:04 - [backend/libinput/backend.c:55] I= nitializing libinput=0A>> 2019-09-22 18:53:04 - [backend/libinput/backend= .c:84] libinput initialization failed, no input=0A> devices=0A>> 2019-09-= 22 18:53:04 - [backend/libinput/backend.c:85] Set WLR_LIBINPUT_NO_DEVICES= =3D1 to suppress=0A> this check=0A>> 2019-09-22 18:53:04 - [backend/multi= /backend.c:32] Failed to initialize backend.=0A>> 2019-09-22 18:53:04 - [= sway/server.c:195] Failed to start backend=0A> =0A> I've tried to run "se= tenv WLR_LIBINPUT_NO_DEVICES 1" as suggested and got sway started (but wi= thout=0A> input devices, I suppose). What's wrong with my libinput? It se= ems it works OK with Xorg=0A=0AYour sway process doesn't have permission = to access /dev/input/*.=0A=0A[re: the little follow-up email: setuid does= not help, because input devices are attached after dropping root, becaus= e input devices need to be hotpluggable anyway. setuid is bad, use consol= ekit2 as described below]=0A=0AThe good (but a bit involved for now) fix:= =0A=0A- run 'sysctl kern.evdev.input' to make sure you have a recent enou= gh kernel -- my patch for this is not in 12.0-RELEASE, but should be in 1= 2.1-BETA I'm pretty sure=0A- build libudev-devd with https://github.com/m= yfreeweb/freebsd-ports-dank/blob/lite/devel/libudev-devd/Makefile (i.e. u= pdate to the latest git commit)=0A- build consolekit2 with https://review= s.freebsd.org/D18754=0A- build wlroots with CONSOLEKIT option=0A- enable = automatic CK2 session creation on login: add 'session optional = pam_ck_connector.so' to the '# session' section of /etc/pam.d/login= =0A- log out, log in, just run sway=0A- (you can launch sway under ck-lau= nch-session if the automatic session gets screwed up somehow, but it work= s for me pretty well)=0A=0AThe bad (but quick) fix:=0A=0A- chmod/chown /d= ev/input/* to be accessible to your account=0A- (there's some devfs confi= g thing that can do this automatically)=0A- (this exposes input devices t= o any program running as your account, which defeats the "no keyloggers a= llowed" advantage of wayland)