Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jun 2019 10:10:08 -0700
From:      Pete Wright <pete@nomadlogic.org>
To:        raichoo <raichoo@acmelabs.space>, freebsd-x11@freebsd.org
Subject:   Re: Developing a wayland compositor on FreeBSD
Message-ID:  <2080bca3-703b-9846-2d96-1dc70c6f13fa@nomadlogic.org>
In-Reply-To: <20190607165049.GA1313@lain.lan>
References:  <20190607165049.GA1313@lain.lan>

next in thread | previous in thread | raw e-mail | index | archive | help


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2080bca3-703b-9846-2d96-1dc70c6f13fa>