renkuos-rotation adds software screen rotation to Renku OS and Haiku. A patched app_server turns the whole desktop, and an input_server filter turns touch input to match. The rotation happens when app_server copies its back buffer to the screen, so it works with any graphics driver: intel_extreme, VESA or framebuffer.
I made it for the Kootigers 8" pocket laptop. Its panel is mounted in portrait, so Haiku draws the desktop sideways.
What's in it
- A build script for Linux (
build-usb-image.sh). It downloads the current Renku OS x86_64 nightly and checks its SHA256. It builds app_server and the touch filter from that nightly's own commit, then writes a bootable USB image that comes up already rotated.
- A kit build script (
build.sh) for Renku OS/Haiku itself. Run it after pkgman update to rebuild app_server so it matches your system.
- Four rotation settings:
normal, left_side_up, bottom_up, right_side_up. They use the Linux/DRM panel orientation names. You set the rotation in ~/config/settings/display_rotation and reboot.
- A separate
touch setting for touch controllers that are mounted differently from the panel. Mice and touchpads aren't affected.
- The stock app_server in /system is never changed. Removing one launch override file takes you back to stock.
Tested
- On the Kootigers with Haiku nightly hrev60258. With
left_side_up the desktop is upright and taps land under your finger.
- In VirtualBox, where the desktop draws rotated and the USB tablet pointer lines up.
- Renku OS images are built the same way, because the app_server source is the same as Haiku master.
Limitations: Changing the rotation needs a reboot. While rotated, the cursor is drawn in software and video overlays are off. BDirectWindow apps fall back to normal drawing or refuse to start. Full-screen BWindowScreen games draw straight to the panel, so they appear sideways. Turn off subpixel anti-aliasing, and use 32-bit color (16-, 15- and 24-bit also work; 8-bit doesn't).
Get it: https://github.com/idumych/renkuos-rotation (MIT)
The first image build takes about 22 minutes on a 4-core machine, because it builds the cross compiler. Later runs reuse it.
This is a personal patch, not part of Renku OS or Haiku. Feedback is very welcome, especially from anyone with other portrait-panel devices.