CI / test (push) Failing after 49s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9.5 KiB
9.5 KiB
Handset & Touch Support
Chandra includes KMS/libinput/compositor adaptations tailored for mainline Linux smartphones (verified on OnePlus 6T oneplus,fajita at 1080x2340).
Display Scaling (CHANDRA_SCALE)
- Integer scaling lives in
compositor/kms/kms_stub.c. - Setting
CHANDRA_SCALE=N(or the default automatic2xscaling on dense portrait phone panels such as1080x2340) runs the compositor at a legible540x1170logical resolution while presentingNxnearest pixels to hardware dumb buffers and cursor planes.
Icon Desktop & Compact Panel
- Icon desktop default: Portrait handset layouts prioritize the touch-friendly icon desktop launcher aesthetic.
- Compact panel layout: Panel items (
launcher,dock,session-settings,network,battery,clock-digital,screenshot) size compactly so all controls fit cleanly within540pxportrait width without clipping, with fuel-gauge support (e.g.bq27411-0).
Touch Input & On-Screen Keyboard
- Long-press right-click: In
compositor/kms/kms_stub.c, a stationary touch held for500 msconverts to a synthetic right-click (BTN_RIGHT) via atimerfd, allowing context menus and secondary actions without a mouse. - Built-in OSK:
compositor/host/osk.mbtprovides a 5-row virtual keyboard that opens automatically when Wayland text input (zwp_text_input_v3) gains focus and can also be toggled manually from the bottom-rightKBpill. It sits directly above the panel, so the panel stays visible and usable while typing (a strict kiosk has no panel: there it reaches the bottom edge).
Display Rotation, Flip, and Auto-Rotate
- 4-way transform (
0°,90° CW,180°,270° CW): Handled end-to-end acrosscompositor/kms/kms_stub.c,wit/host/display.wit,wasmhost/bin/display.mbt, and the compositor event loop (CHANDRA_ROTATEsets the initial orientation). Both scanout rows and libinput touch/pointer coordinates transform to match the active orientation. - Touch
Rotpill: Sitting left of theKBpill incompositor/host/osk.mbt:- Tap: rotate
90°clockwise (0 -> 90 -> 180 -> 270 -> 0). - Long-press / right-click: flip
180°(0 <-> 180,90 <-> 270).
- Tap: rotate
- CLI control:
chandra-ctl rotate [cw|ccw|flip|0|90|180|270|status]queries or changes rotation live (0portrait,90/270landscape,180inverted). - Sensor auto-rotate: When running on the DRM backend (
chandra-session) withmonitor-sensor(iio-sensor-proxy) installed,session/chandra-auto-rotateruns inside the activeseat0session and applies orientation change events (normal -> 0,right-up -> 90,bottom-up -> 180,left-up -> 270) without fighting manualRottaps while stationary. SetCHANDRA_AUTO_ROTATE=0in the session environment to disable auto-rotate.
Client-Side Window Controls (Chromium / GTK)
compositor/wayland/server.mbtemitsxdg_toplevel.wm_capabilities(window_menu,maximize,fullscreen,minimize) forxdg_wm_basev5+ clients so client-decorated apps expose Maximize alongside Close.- On GTK/Chromium setups where GNOME defaults (
org.gnome.desktop.wm.preferences button-layout) omit maximize/minimize (e.g.'appmenu:close'), configure GTK andgsettings:~/.config/gtk-3.0/settings.iniand~/.config/gtk-4.0/settings.ini:gtk-decoration-layout=:minimize,maximize,closegsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close'
Keyring Unlock
session/chandra-sessionstartsgnome-keyring-daemon --start --components=secretsand unlocks an unencrypted defaultlogin.keyringat login over D-Bus (org.freedesktop.Secret.Service.Unlock) so apps such as Chromium store credentials without blocking prompts.
Power Button & Brightness
- Power key blank/wake: Pressing
KEY_POWER(116) incompositor/host/compositor.mbttoggles manual screen blanking (DPMSoff/on + touch cancellation incompositor/kms/kms_stub.c) while ignoring stray touches during blanking. Also controllable viachandra-ctl screen [on|off|toggle|status]. (SetHandlePowerKey=ignorein/etc/systemd/logind.conf.d/sologinddoes not power off immediately.) - Settings Brightness slider:
compositor/shell/backlight.mbtreads/sys/class/backlight/(ae94000.dsi.0,CHANDRA_BACKLIGHToverride) and writes changes via sysfs ororg.freedesktop.login1.Session.SetBrightness. When a backlight device exists, Settings > Power > Brightness shows a-/ slider /+control (5%..100%), also accessible viachandra-ctl brightness [PCT|status].
Audio & Volume Buttons
- Audio stack (PipeWire + WirePlumber + OnePlus 6T UCM2):
pipewire,wireplumber,pipewire-pulse, andpipewire-alsadrive the OnePlus 6T (fajita) ALSA UCM2HiFiprofile (Speaker,Headphones,Mic1/Mic2,Headset), with Qualcomm buffer tuning from51-qcom.conf. - Hardware volume keys:
compositor/host/volume.mbtbindsVolumeUp(KEY_VOLUMEUP/115),VolumeDown(KEY_VOLUMEDOWN/114), andMute(KEY_MUTE/113) incompositor/shell/shortcuts.mbtto asyncwpctl(withpactlfallback) commands:5%step per press, unmuting on volume up and capping hardware button increases at100%.- Hold-to-repeat after
400 ms(90 mscadence) until key release. - Works while the display is blanked (
screen_off/manual_screen_off) without waking the screen. - Passes
VolumeUp/VolumeDownstraight through tochandra-camerawhen it is the active foreground window (with no modal/popup/modifier) so the hardware buttons keep acting as the camera shutter. - Shows a floating top-center Volume OSD pill (
1.8 s) when the screen is on, and exposeschandra-ctl volume [up|down|mute|unmute|toggle|PCT|status].
- Mixer GUI (
moonmix):org.latha.moonmixprovides a GTK4 +libwireplumbervolume mixer (Playback, Recording, Output Devices, Input Devices) integrated into the launcher.
Face Unlock (libcamera)
- On phones whose MIPI sensors (
imx371,imx519,imx376) requirelibcameraSoftISP rather than raw V4L2 nodes,face/chandra-facesupportslibcamera:<camera-id>entries viapython-libcameraand applieslibcamera.properties.Rotation.face/install.pysupports--system-pythonto run with systempython-opencv+python-numpyonaarch64, andface/polkit-agent-helper.confgrantschar-video4linux,char-media, andchar-dma_heapaccess to polkit's helper sandbox.
Camera App (chandra-camera)
camera/chandra-camera,camera/chandra-camera-ui.c, andcamera/chandra-camera-isp.cprovide a native GTK3/Cairo Wayland camera app with a C/OpenMP Quad-Bayer ISP library (libchandra-camera-isp.so) installed viasession/install.pywith its desktop launcher and icon (Camera).- Supports multi-sensor
libcameradiscovery and live switching (Back · imx519,Front · imx371,Back 2 · imx376on OnePlus 6T, with automatic V4L2 fallback on desktops), sensor orientation transform + front-camera mirror preview,libcameraSoftISP CCM tuning (camera/ipa/simple/*.yaml), VCM contrast autofocus with tap-to-focus (lc898217xc), Photo mode (HDinstant /Fullhigh-resolutionStillCaptureor 3-frame raw burst merge on Quad-Bayer,0/3s/10sself-timer, 3×3 rule-of-thirds grid) saving JPEGs to~/Pictures/Camera, Video mode recording exact-PTS VFR H.264 MP4s (MatroskaI420Muxer+ffmpeg) to~/Videos/Camera, an in-app photo gallery viewer, rear flash/torch LED control (/sys/class/leds/white:flash) throughorg.freedesktop.login1.Session.SetBrightness, and hardware volume-button orSpace/Returnshutter control.
Remote Control Over Tailscale (chandra-remote)
remote/chandra-remote.cprovides a zero-overhead shared-memory framebuffer mirror (fb.shminwasmhost/bin/raster_stub.c) feeding both:- VNC (RFB 3.8, port
5900) with Tight-JPEG (libturbojpeg), Zlib, Raw, dynamic rotation resize (ExtendedDesktopSize), clipboard sync, and 1:1 pointer/touch/keyboard input (tested for Android AVNC). - Mobile Web UI / PWA (HTTP + WebSocket, port
6080) with 1:1 touch gestures (tap, drag, long-press right-click, two-finger scroll/right-click), optional trackpad mode, Android keyboard bridge, live rotation/brightness/OLED-off toggles, and adaptive JPEG streaming.
- VNC (RFB 3.8, port
- By default (
~/.config/chandra/remote.conf),bind=tailscale,bind_loopback=1, andauth=none, binding strictly to the Tailscale100.64.0.0/10interface +127.0.0.1so any device on the same Tailscale tailnet can connect directly with zero password prompt (http://<tailscale-dns>:6080/or<tailscale-dns>:5900), even while the handset's physical OLED screen is turned off (chandra-ctl screen off). Runchandra-remote statusto inspect endpoints orchandra-remote passwd [PASS|--none]to configure optional password auth.