So look like ACPI events and actions were not defined.
Debugging acpid allowed me to find the events:
xps13 ~ $ sudo acpid -f -d -l
After that it was trivial to define them and write an action.
xps13 ~ $ cat /etc/acpi/events/tabletmode
event=video/tabletmode
action=/etc/acpi/actions/tabletmode.sh %e
xps13 ~ $ cat /etc/acpi/actions/tabletmode.sh
#/bin/sh
# 4th params gives tablet status
# 00000001 entering tablet mode
# 00000000 exiting tablet mode
if [ "$4" = "00000001" ]; then
sudo -iu lab /usr/bin/onboard &
elif [ "$4" = "00000000" ]; then
pid=$(ps ax | awk '/usr\/bin\/onboard/ { print $1 }') && kill $pid
fi
Now I just need to find out to dynamically pass the $USER to the script.