Framework Laptop 12 X11 display autorotate: Chrome EC memmap
accelerometer and TBMD drive RandR on the built-in panel, ILIT
touch/stylus remap, XDM greeter recovery, and an optional
per-user chrome hook.
Details
Details
- Reviewers
adrian deb_freebsdfoundation.org emaste jrm - Group Reviewers
Ports Committers
Requires a Framework Laptop 12 (convertible) under FreeBSD with an X11
session (or XDM greeter). Other machines can exercise build/install only;
the functional half needs the Chrome EC (/dev/io) and a 360 hinge.
Build / install
- cd /usr/ports/x11/framework-autorotate
- make clean check-plist BATCH=yes
- make check-plist BATCH=yes WITHOUT=EXAMPLES
- make reinstall clean (or: make package && pkg install -f ./work/pkg/*.pkg)
Enable and start
- sysrc framework_autorotate_enable=YES
- sysrc framework_autorotate_mode=always (or: tablet)
- optional: sysrc framework_autorotate_logfile=/var/log/framework_autorotate.log
- service framework_autorotate start
- service framework_autorotate status Expect running, with /var/run/framework_autorotate.pid present.
Functional (Framework Laptop 12)
- With a logged-in X11 session on the built-in panel:
- Fold past about 180 degrees into tablet (or tip the lid) and confirm the panel rotates via xrandr to match orientation.
- Confirm absolute touch (and stylus, if present) still track the rotated panel on the built-in screen; external heads, if any, stay put.
- service framework_autorotate stop
- service framework_autorotate start Confirm rotate still works after restart.
- Optional mode check: sysrc framework_autorotate_mode=tablet service framework_autorotate restart Expect rotation only while EC reports tablet mode; otherwise forced to normal.
- Optional greeter: log out to XDM (or equivalent); confirm the greeter recovers usable orientation / built-in panel placement after logout.
Cleanup (optional)
- service framework_autorotate stop
- sysrc -x framework_autorotate_enable framework_autorotate_mode
- pkg delete framework-autorotate
Diff Detail
Diff Detail
- Repository
- R11 FreeBSD ports repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 75437 Build 72320: arc lint + arc unit
Event Timeline
Comment Actions
Drop ONLY_FOR_ARCHS=amd64: Framework Laptop 12 hardware is amd64, but
the port need not be. EC LPC via /dev/io is not an amd64-only constraint.
Comment Actions
Very cool.
Looks good to me. A few thoughts:
- Looking at the upstream code, I see you're calling xset in x11_greeter.c:61-62, so should we add xset:x11/xset to RUN_DEPENDS?
- (optional) portclippy/portfmt have a few minor nits.
- You could use %%EXAMPLESDIR%% instead of share/examples/framework_autorotate/ in pkg-plist.
- files/pkg-message.in doesn't have any substitutions, so it could be a plain pkg-message without SUB_FILES.