It’s just about time for a new release of Arcan, and way past due for a new release of the reference desktop environment, Durden. Going through some of the visible changes on a ‘one-clip or screenshot per feature’ basis:
Arcan
Most Arcan- changes are internal engine modifications or changes to the assortment of support tools and libraries, lacking interesting visual changes, so dig into the detailed changelog further below for some more detail.
Crash Recovery Improvements:
All unhandled server-side scripting errors (i.e. no fallback application is set) are now interpreted by clients as display server crashes, triggering the crash recovery-reconnect behaviour rather than a clean shutdown. Two shmif- related bugs preventing Xarcan from recovering have also been squished. This should leave us with arcan_lwa and the waybridge- tool left in terms of basic crash recovery (omitted now as the allocation- management is fiendishly difficult). The video shows me explicitly killing the display server process (it’s on a while true; do arcan durden; done loop) and the new instance getting a reconnect from the recovering xarcan bridge.
Improved support for Wayland clients:
Here we see SDL2 (GL-test), QT (konsole), EFL (terminology), Weston-terminal and gtk3-demo mixing wl_shm, wl_drm, wl_shell, wl_zxdg_shellv6, and a bunch of other protocols and subprotocols, with about as many variations of decorations and mouse cursors.
Initial Bringup on OpenBSD:
There’s a lot of things left to do on this backend, with the bigger issues (as usual) being system integration with pre-existing virtual terminal management schemes and getting access to input samples in the right states in the processing pipeline. The following screenshot show that enough bring-up has been done to get keyboard input and Durden working enough to show graphics, spawn terminal frameservers etc.
Terminal/TUI experimental features:
Smooth scrolling, Ligatures and non-monospace rendering. These are not really solvable problems for legacy terminal emulation (and disabled by default) but can in some limited settings be helpful, and will be relevant for upcoming work on terminal-emulator liberated TUIs/CLIs. The following video shows three differently configured terminals (though hinting looks like crap when recorded in this way). One that smooth-scrolls a bitmap font, one that shapes with a non-monospaced font, and the last one that performs ligature substitutions with the fira-code font.
Durden
A lot of the features and ideas hidden within durden have now been documented on the webpage, now situated at durden.arcan-fe.com
Window slicing:
This is useful when you only want to keep an eye on- or interact with- a specific part of a window (say an embedded video player in a web browser), slicing away crop-bars from video players or avoiding toolkit enforced decorations.
Overlay tool:
This is useful when you want some contents to follow you regardless of the context you’re working inside (except dedicated fullscreen). This can, of course, be combined with window slicing for better effect.
Input multicast:
This is useful when you have a hierarchy of clients you want to receive the same input in the same time frame (e.g. when doing latency measurements) or when controlling a large number of terminals, VMs or remote desktops.
Window- relayout/resize animations for float/tile:
This was primarily added as a cheap way of debugging performance and interactions between the animation subsystems and the window-type dependent scaling policies. The effect seemed pretty enough to be left as a configurable toggle (global/config/visual/window animation speed).
LED devices and profiles:
This is useful for reducing eye strain by mapping display contents to ambient light, for communicating system events like incoming alerts and for improved UI by showing which keybindings are currently available and a color hint as to what they do.
This clip shows a custom rule that maps the contents of the currently selected window to LEDs placed behind the monitor.
This clip shows the currently accepted keybindings (all lit = input locked to window) color coded by menu path, while the F1..n buttons indicate the global audio gain.
External clipboard manager support:
Though the tool and the interface has been provided by Arcan for a while, the WM (Durden in this case) still needs to allow/enable support since Arcan itself doesn’t dictate or care about clipboards as such. In Durden, this support now manifests itself as enabling a ‘clipboard bridge’ that allows one passive (global listen), active (global insert) or full (global listen/insert) clipboard connection.
External gamma controller support:
Although the subsystem still needs some work on the Durden side, it is possible to either allow all clients full gamma control access (any client can make the screen go unusable dark) or enable it on a per-client basis (target/video/advanced/color-gamma synch). When performed on an Xarcan instance, the currently active display will be exposed over XRandr, meaning that old/legacy tools that require ramp controls should work transparently.
What’s Next?
While we are still waiting for advancements outside of our control in regards to lower level primitives (synchronisation control, drivers switching over to atomic modesets, developments at xdc2017 in regards to usable buffer APIs, Vulkan driver stability, the list goes on) – the main development drivers for the 0.5 branch (which is, by far, the heaviest one planned for the entirety of the base project); heterogenous multi-GPU, live driver updates, VR and low level system graphics in general – will keep progressing alongside the various supporting tools.
The more enticing developments in the near-future are partly putting the finishing touches on the TUI- set of libraries and partly the unwrapping of the Lua APIs. As mentioned in earlier posts, the Lua interface has acted as a staging grounds for finding the set of necessary/sufficient features for writing quite advanced graphical applications. Quite some care was put into avoiding language-feature masturbation and object-oriented nonsense for the very reason of having the API being able to double as a privileged, GPU friendly drawing protocol. This means that the driving scripts can be decoupled from the engine and be controlled by an external process, creating some rather interesting possibilities – the least of which is re-enabling the separate window manager model from X, but without the intractable synchronisation issues.
Tracking for other, smaller, enhancements can be found in the issue tracker: arcan , durden.
Detailed Changelog
Arcan – Engine:
- Refactored frameserver- spawning parts to cut down on duplicated code paths and make setup/control more streamlined.
- Support for tessellated 2D objects, more fine-grained control over individual vertices.
- Extended agp_mesh_store to cover what will be needed for full glTF2.0 support.
- Crash-recovery procedure for external clients now also applies to scripting layer errors when there is no fallback appl set.
- Reworked font/format string code to bleed less state and automatically re-raster if the outer object is attached to a rendertarget with a different output density.
- Added additional anchoring points to linked images (center-left, center-top, center-right, center-bottom)
- VR- mapping work for binding external sensor “limbs” to 3d models, continued bringup on managing vrbridge- instances and fast-path integration vid vrbridge provided sensor output.
Arcan – Lua:
- New function: image_tesselation, used to change subdivisions in s and t directions, and to access and change individual mesh attributes for 3d objects.
- New function: rendertarget_reconfigure, used to change the target horizontal and vertical density of a rendertarget.
- New functions: vr_maplimb, vr_metadata
- Updated function: define_rendertarget to now returns status, accept more mode flags (for MSAA) and allow target density specification.
- Updated function: alloc_surface to allows additional backend storage formats, (FP16, FP32, alpha-less RGB565, …)
- Updated function: link_image, added additional anchoring points
Arcan – Shmif:
- New library, arcan-shmif-server. This is used for proxying / multiplexing additional connection unto an established one. Primary targets for this lib is a per-client networking proxy, and for TUI/Terminal to support delegating decode/rendering to other processes.
- Added support for HANDOVER subsegments. These are subsegments that mutate into primary segments in order to reuse a connection to negotiate new clients without exposing a listening channel, allowing a client to negotiate connections on behalf of another.
- RESET_ level 3 events now carry a reference to the deregistered descriptor so clients have a chance to remove from custom select()/poll() hooks that cache descriptor use.
Arcan – TUI/Terminal:
- Another dissemination/progress article: https://arcan-fe.com/2017/07/12/the-dawn-of-a-new-command-line-interface/
- support for bitmapped fonts (PSFv2) as an optional path for faster rendering on weak hardware and freetype- less builds.
- Built-in bitmapped terminus font for three densities/sizes (small, normal, large) as fallback when no font is provided by the display server connection.
- Added dynamic color-scheme updates.
- Rendering-layer reworked to support shaping, custom blits, …
- Experimental double buffered mode (ARCAN_ARG=dblbuf)
- Experimental smooth scrolling in normal mode (ARCAN_ARG=scroll=4)
- Experimental shaping mode kerning for non-monospace fonts (ARCAN_ARG=shape)
- Experimental ligature/substitution mode for BiDi/i8n/”code fonts” via Harfbuzz (ARCAN_ARG=substitute)
- Lua bindings and tool for experimenting with them (src/tools/ltui)
Arcan – Platform:
- Refactored use of environment variables to a configuration API
- EGL-DRI: VT switching should be noticeably more robust, EGL libraries can now be dynamically loaded/reloaded to account for upgrades or per-GPU sets of libraries.
- AGP: Updated GLES2 backend to work better with BCM drivers.
- Evdev: Added optional support for using xkblayouts to populate the utf8 field.
- EGL-GLES: quick fixes to bring BCM blobs back to life on rPI.
- OpenBSD: initial port bring-up, keyboard input and graphics working.
- SDL2: added SDL2 based video/event platform implementation, some input issues left to sort out before 1.2 support can be deprecated and this be the default on OSX.
Arcan – Tools:
- Aloadimage: basic support for SVG images.
- Doc: started refactoring lua API documentation format to double as IDL for re-use of lua API as privileged drawing and WM- protocol.
- Xarcan: synched to upstream, parent crash recovery fixes, old-drawing mode (no -glamor, no dri3) synchronization and color management improvement.
- Qemu/SDL2: synched to upstream.
Tools/Waybridge
- XKB- Layout transfer support, basic pointer and pointer surface (wl_seat)
- Damage Regions, dma-buf forwarding (wl_surf)
- More stubs (data_device/data_device manager/data_offer/data source)
- zxdg-shell mostly working (toplevel, positioners, popup)
- added support for relative_pointer motion
Durden
-
Documentation moved to a separate webpage, http://durden.arcan-fe.com
- allow client- defined mouse-cursor support
-
Window slicing: target/window/slice allows mouse-selected subregion to (active->input forward or passive) bind a subregion of one window to a new window.
-
External clipboard manager support: external clients can be permitted to read and/or inject entries unto the clipboard. See global/config/system/clipboard-bridge.
-
Gamma controls: external clients can be permitted to set custom color/ and gamma/ lookup tables, either per window or globally. See target/video/advanced/color-gamma synch and global/config/system/gamma-bridge.
-
Filesystem-like IPC: the iopipes IPC path has been extended to allow ls, read, write and exec like navigation of the menu subsystem. This can be bound to a FUSE-wrapper to fully control (script!) durden from a terminal.
-
LED devices: added support for profile driven LED device control see devmaps/led/README.md or global/config/led
-
Input multicast : added support for input multicast groups. Enable per window via target/input/multicast. Keyboard input received will be forwarded to all children.
-
Statusbar: can now be set to ‘HUD’ mode, where it is only visible on the global/ or target/ menu HUDs. (config/visual/bars/statusbar(HUD)/…)
-
Tools/Autolayout improvements: can now disable titlebars on side-columns, and allow a different shader on side-columns (see global/config/tools/autolayouting)
-
Tools/Overlay: [new], can now take the contents of a window and add to a vertical column stack at left or right edge as scaled-down previews.
-
Target/Video/Advanced: allow per-window output density overrides.
-
Atypes/wayland/x11: new scaling mode, ‘client’ to allow the client to know about the max dimensions, but let it chose its own actual size within those constraints.
-
Window- relayout/resize animations for float/tile: disable/enable via config/visual/window animation speed
-
Dynamically switchable visual/action schemes (devmaps/schemes/README.md) that can be used to set a global, per-display, per workspace or per window scheme of fonts and other configuration presets.
-
Allow GPU- authentication controls.
-
Split mouse cursors into sets.
-
More consistent font/font-size switching when migrating across displays with different densities.
-
Default-off display profiles for vive/psvr.
-
Defer window attachment to reduce initial storm of resize operations.
-
Menu options for appl- switching (global/system/reset/…).
-
Hidden bind path for suspend-state toggle (target/state/…).
-
Menu path to reset workspace background (global/workspace/…)
-
Menu path for global/workspace/switch/last.
-
Option to force bitmap font path for terminal.
-
A shader for luma (monochrome) – only mode.
-
Atype- profile for wayland clients.
-
Option to disable/block mouse (global/input/mouse/block).
-
Target menu path for set-x, set-y in float mode.
-
Mouse button debounce timer support (global/inpput/mouse/debounce).
-
Expose backlight controls per display (global/display/displays/…)
-
Tools/pulldown: can now set a shadow/colored border.
Impressive progress the whole stack looks more than capable for daily tasks. Do you have any plans to create a standalone spin with it so it can be taken for a ride by more enthusiasts ?
This could expose it to a wider audience since not many people want to mess around with alternative window system on their main system.
There are rough plans for a live- image based on alpine or voidlinux – unless someone beats me to it. I am mostly playing the waiting game to increase the success-rate, like stable virtualbox drivers for kms/gbm, the next round of usability changes for durden and for some browser to support wayland in a “non-embarrassing” state.
Thank you for sharing the insights. Looking forward to it. By the way qupzilla and epiphany already have decent support of wayland out of the box.