From owner-freebsd-x11@freebsd.org Fri Jun 7 17:10:17 2019 Return-Path: Delivered-To: freebsd-x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A167D15B222C for ; Fri, 7 Jun 2019 17:10:17 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from mail.nomadlogic.org (mail.nomadlogic.org [174.136.98.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.nomadlogic.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7FFBC82731 for ; Fri, 7 Jun 2019 17:10:16 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from duke.gem.co (cpe-23-243-162-239.socal.res.rr.com [23.243.162.239]) by mail.nomadlogic.org (OpenSMTPD) with ESMTPSA id b8374188 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO; Fri, 7 Jun 2019 17:10:08 +0000 (UTC) Subject: Re: Developing a wayland compositor on FreeBSD To: raichoo , freebsd-x11@freebsd.org References: <20190607165049.GA1313@lain.lan> From: Pete Wright Message-ID: <2080bca3-703b-9846-2d96-1dc70c6f13fa@nomadlogic.org> Date: Fri, 7 Jun 2019 10:10:08 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190607165049.GA1313@lain.lan> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 7FFBC82731 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of pete@nomadlogic.org designates 174.136.98.114 as permitted sender) smtp.mailfrom=pete@nomadlogic.org X-Spamd-Result: default: False [-2.92 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[nomadlogic.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[mail.nomadlogic.org]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.56)[-0.558,0]; IP_SCORE(-0.05)[asn: 25795(-0.21), country: US(-0.06)]; RECEIVED_SPAMHAUS_PBL(0.00)[239.162.243.23.zen.spamhaus.org : 127.0.0.10]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:25795, ipnet:174.136.96.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[] 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: Fri, 07 Jun 2019 17:10:17 -0000 On 6/7/19 9:50 AM, raichoo wrote: > Hi, > > Roughly 2 weeks ago I started porting my window manager hikari > (https://hub.darcs.net/raichoo/hikari) over to wayland. I'm > currently running 12-STABLE and I'm making some progress. > I occasionally stumble across some weird behavior and I'm > not sure if that's related to wayland running on FreeBSD or > me just doing something wrong. > > The first thing that I ran into was that libinput does not seem > to be able to find any input devices unless I chmod everything > under /dev/input to less strict permissions (777 of course works > fine but I didn't test with anything else yet). This also seems > to be an issue for `sway` which I've tried out on a test > machine running 13-CURRENT. > > I also seem to have problems getting mouse events on these > machines (2 X1 carbons, 3rd and 5th gen). I initially thought > it was just me not rendering the cursor correctly but `sway` > seems to be affected by the same issues (only there I can see > a cursor appear but it's not reacting to any input). > > Since I'm fairly new to the whole wayland eco system I'm waa > wondering if this is a good place to help to improve wayland > support on FreeBSD. If I'm not mistaken Xorg is a setuid binary, so i can access devices under /dev/input without problems.  when i was testing sway a while ago i attempted to use a devd ruleset to change thing so that the devices were in the "video" group and had appropriate permissions. if you are using the drm-kmod you'll already are a member of this group.  i don't think i ever got the devd ruleset working to my satisfaction as i see a shell script that does this in my ~/bin/ directory that does this for me :) i also remember having issues with mouse and keyboard input using sway - these environment variables seemed important: export XKB_DEFAULT_RULES="evdev" export XKB_DEFAULT_LAYOUT="us,us" export XKB_DEFAULT_OPTIONS="caps:ctrl_modifier,shift:both_capslock_cancel" as did setting my XDG_RUNTIME_DIR to something reasonable (in my case it was /tmp/xdg-runtime-dir).  i also remember using "/usr/local/bin/libinput debug-gui" to help debug this.  i setup my init script to spawn a terminal then this program which helped a lot. hope this helps! -pete -- Pete Wright pete@nomadlogic.org @nomadlogicLA