Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jun 2019 13:28:15 -0700
From:      Johannes Lundberg <johalun0@gmail.com>
To:        Pete Wright <pete@nomadlogic.org>, raichoo <raichoo@acmelabs.space>, freebsd-x11@freebsd.org
Subject:   Re: Developing a wayland compositor on FreeBSD
Message-ID:  <c6395b04-bade-8441-776d-e4995e5a5b00@gmail.com>
In-Reply-To: <2080bca3-703b-9846-2d96-1dc70c6f13fa@nomadlogic.org>
References:  <20190607165049.GA1313@lain.lan> <2080bca3-703b-9846-2d96-1dc70c6f13fa@nomadlogic.org>

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

On 6/7/19 10:10 AM, Pete Wright wrote:
>
>
> 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.=A0 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.=A0=

> 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=3D"evdev"
> export XKB_DEFAULT_LAYOUT=3D"us,us"
> export
> XKB_DEFAULT_OPTIONS=3D"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).=A0 i also remember using
> "/usr/local/bin/libinput debug-gui" to help debug this.=A0 i setup my
> init script to spawn a terminal then this program which helped a lot.
>
>
> hope this helps!
>
> -pete
>
Hi

I'm using the following setup. Maybe some of it helps.

# /etc/rc.conf
devfs_system_ruleset=3D"localrules"

# /etc/devfs.rules
[localrules=3D10]
add path 'input/*' mode 0660 group video

# ~/.cshrc (will differ if you're using a different shell)
setenv XKB_DEFAULT_RULES=A0=A0 evdev
setenv XKB_DEFAULT_LAYOUT=A0 us,us
setenv XKB_DEFAULT_OPTIONS caps:ctrl_modifier,shift:both_capslock_cancel

if ( ! $?XDG_RUNTIME_DIR ) then
=A0=A0=A0 setenv XDG_RUNTIME_DIR /tmp/${uid}-runtime-dir
=A0=A0=A0 if ( ! -d "$XDG_RUNTIME_DIR" ) then
=A0=A0=A0=A0=A0=A0=A0 mkdir "$XDG_RUNTIME_DIR"
=A0=A0=A0=A0=A0=A0=A0 chmod 0700 "$XDG_RUNTIME_DIR"
=A0=A0=A0 endif
endif





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c6395b04-bade-8441-776d-e4995e5a5b00>