Fuchsia F22 release notes

Date: November 14, 2024

Version: F22

The following changes have been implemented:

Audio

The following updates have been made for Audio.

  • Audio drivers and driver API:

    • Updated audio driver VMO handle rights to be validated. The audio_driver_tests suite now validates that the VMO handles returned from an audio driver has the required rights.
    • Updated aml-g12-composite driver to use SetActiveChannels domain specific API to turn on or off the SoC power through StartSocPower/StopSocPower.
    • Disabled the default dispatcher in the SimpleAudioStream helper library.
    • Deleted aml-g12-[pdm|tdm]-dsp drivers.
    • Updated VirtualAudio driver to apply correct VMO handle rights and fix WatchTopology behavior.
  • AudioCore service and smart display support:

    • Updated the CapturerShimImpl dtor to be virtual, which fixes a new-delete-type-mismatch.
  • AudioDeviceRegistry service:

    • Implemented Control::Reset as an asynchronous method.
    • Clarified the circumstances in which the client-provided callback or the ControlNotify notifications will be invoked or not invoked.
  • Audio developer tools:

    • Added additional ADR support to ffx audio in the ffx audio device facet.
    • Updated ffx audio device info to show signal processing elements, topologies, and state.
    • Updated the RegistryDevice type in ffx audio to expose signal processing elements, element states, and topologies.
    • Moved the VmoBuffer to the common Rust audio library.

Bluetooth

The following updates have been made for Bluetooth:

  • Completed support for BR/EDR legacy pairing: This includes handling of pairing prior to ACL connection completion, and support for Variable PIN Type.
  • Building support for Isochronous streams: This includes the IsoDataChannel for data flow and a new API, along with support for setting up incoming streams.
  • Replaced Hci protocol with the HciTransport protocol which connects the stack to controllers: This includes all current drivers, improving compatibility and maintainability, as well as linearizing events across ACL and Command channels.
  • Added support for dynamic L2CAP connections in RFCOMM: L2CAP is preferred by new peers, with L2CAP PSMs automatically assigned and communicated to the profile.
  • The Snoop protocol for capturing Bluetooth data has been updated with a revised API preventing errors: This introduces the Vendor.OpenSnoop method for better access to snoop functionality.
  • A2DP offloading now stops correctly when the client unbinds.
  • Message Access Profile (MAP) in development now supports notification registration.
  • Sapphire no longer depends on the ICU library, removing a large dependency.

Build

The following updates have been made for Build:

  • Updated the partner unstable SDK: The spiimpl library has been added for extended SPI functionality.
  • Improved the GN build system: A new template, generated_ifs_file, enables dynamic .ifs file creation. The netsvc component inclusion has been reverted due to OTA test issues.
  • Enhanced the fx command: Analytics now use $EPOCHREALTIME for more precise timing. The --rbe flag has been removed.
  • Improved build system cleanup: An obsolete import in sdk_host_tool() has been removed. Clippy lints were fixed. Buffered readers improve serde_json performance. A new DFv2 driver library, pdev, reduces dependencies.

Cobalt

The following updates have been made for Cobalt:

  • Fixed clang-tidy warnings and removed fuchsia.cobalt/SystemDataUpdater protocol removed: This update fixes clang-tidy warnings and updates the #include style to match the Fuchsia style guide. Some files had to be mostly ignored because Clang struggles to find some of Cobalt's third party dependencies. The fuchsia.cobalt/SystemDataUpdater protocol, which was deprecated in F18, has also been removed.
  • Removed the fuchsia.cobalt/SystemDataUpdater protocol: This protocol was deprecated and unused.

Component Framework

The following updates have been made for Component Framework:

  • Improved the clarity of process launcher server-side error logging. This change refactors the error logging code to be testable and improves the job exit code description.
  • Improved the management of the power listener by prioritizing the session power listener: When initializing the power listener, the session power listener is now tried first, and if unavailable, the system power listener is used.
  • Implemented the Component Manager changes for true-copy VMOs: This change uses zx_vmo_transfer_data to perform the VMO copy and decommit operation from Bootfs to an entry's true-copy VMO.

Connectivity Drivers

The following updates have been made for Connectivity Drivers:

  • Improved dwc3 driver with devicetree binding and other fixes:
    • Made dwc3 a composite device, allowing another HW version, starting peripheral mode only after DCI interface is set, and enabling endpoints on ConfigEp.
  • Improved dwmac driver performance and stability:
    • Added a memory barrier between configuring the rx descriptor and notifying the device to address a potential race condition.
    • Fixed a race condition that caused failures on vim3 where the driver wouldn't propagate the online status up to the legacy Ethernet driver. The fix involves notifying the child driver as soon as it binds.
  • Improved brcmfmac driver by logging all firmware recovery attempts to calculate the success rate of firmware recovery.

Diagnostics

The following updates have been made for Diagnostics:

  • Improved Archivist:
  • Improved logging:
    • Always log file and line information in Rust.
  • Improved Diagnostics persistence:
    • Persistence now integrates with system-update-checker to start publishing sooner than the previous 120s delay.
  • Improved Inspect:
    • Added support for escrowing in the Inspect Rust library: This makes it easier to collect and analyze Inspect data.
    • Updated all Inspect data to have a component url in the response: This improves the usability of Inspect data by making it easier to identify the source of the data.
    • Added a Builder for Data<Inspect>: This makes it easier to evolve the Data<Inspect> structure.
    • Created a Python inspect parsing library: This makes it easier to parse and analyze Inspect data in Python.
  • Power observability:
    • Added Level data to the lease status inspect updates in Inspect history: This improves the visibility of lease status changes and makes it easier to diagnose problems.
    • Enhanced the VMO size description to be friendlier. This makes it easier to understand the size of Inspect VMOs.
    • Increased the Inspect VMO for power broker. This improves the performance of power broker by reducing the number of times that the VMO needs to be resized and allows us to fit more information.

Driver Framework

The following updates have been made for Driver Framework:

  • Improved driver metadata management. This includes adding a GetMetadataIfExists() function to the fdf_metadata library.
  • Improved driver runtime performance and stability. This includes updating the dispatcher header on RAII semantics, removing the return value from driver host runner callbacks, and disallowing queueing delayed tasks during shutdown.
  • Improved driver testing infrastructure. This includes refactoring driver test fixtures and preparing driver_test.h for the partner SDK.
  • Added preliminary support for Rust in driver development. This includes adding implementations of safe Rust bindings for the arena and dispatcher, and adding the ability to increment the reference count of an fdf_arena_t to enable Clone in Rust.
  • Improved driver documentation. This includes adding a new DFv2 driver doc: "Troubleshoot common issues in DFv2 driver development".
  • Fixed various bugs. This includes fixes for bugs related to metadata handling, driver loading, driver testing, and driver runtime.

FIDL

The following updates have been made for FIDL:

  • Updated the SDK to use the modifier change syntax and reformatted the versions_natural_ostream.h.golden file: This change avoids redundant enum members and protocol methods and reformats the file due to changes in clang-format output.
  • Improved the FIDL ABI: These improvements include:
  • Removed the unused Host protocol, replaced the in_development_api_level variable, removed unused template disambiguation, and ensured that all documented GN variables are passed.
  • Backfilled missing @available(added=HEAD) annotations and fixed outgoing FIDL calls with wire objects.

GPU

The following updates have been made for GPU:

I18n

The following updates have been made for I18n:

  • Updated the I18n infra to support Fuchsia's new date/time API: This change updates the I18n infrastructure to use the new Fuchsia date/time API, which simplifies the process of formatting and parsing dates and times. This change also improves the I18n infrastructure's overall performance and reliability.

IOT

The following updates have been made for IOT:

  • Improved Thread stack stability and recovery by preventing ot-radio from sending frames during RCP reset and enhancing SPI TX logic: This avoids unnecessary resets by ensuring lowpan waits for RCP readiness and improves recovery when sending spinel frames fails.
  • Fixed a crash in lowpan-monitor and improved diagnostics: The monitor now generates a crash report when Thread stack booting fails, providing data on devices lacking a Thread stack.
  • Fixed the meshcop publish logic in lowpan.
  • Logged the source address of ignored ICMP6 messages when their source is not link local in openthread. This improves debugging for ICMP6 issues.
  • Added spiimpl to the partner unstable SDK: This change is primarily for internal use and less impactful for general users.
  • Fixed nat64 translator: Fixed a bug where nat64 translator state is not set correctly when setting CIDR.
  • Improved Matter/GHP: Matter and GHP related bug fixes and stability improvements.

Kernel

The following updates have been made for Kernel:

  • Added support for the ZX_CLOCK_BOOT timeline, including user-mode clocks and syscalls (zx_ticks_get_boot, zx_clock_get_boot).
  • Introduced ZX_INFO_VMAR_MAPS for retrieving VMAR mapping information, and added related diagnostics tooling.
  • Added support for user-space dcache CLEAN and FLUSH operations through zx_cache_flush.
  • Added the k zx sock command for displaying socket information, and improved k command handling for peered dispatchers.
  • Added a PXA variant of the ns8250 UART and conditionally set the level-triggered bit based on device tree/boot shim configuration.
  • Fixed a kernel timer race condition and improved timer queue inspection.
  • Fixed atomic loads on volatile variables and introduced workarounds for libcxx atomic_ref limitations.
  • Improved physical memory management and handoff, including ensuring NVRAM and ZBI allocation persistence, handling of reserved test RAM, and diagnostic logging.

Platform Drivers

The following updates have been made for Platform Drivers:

  • Simplified the aml-sdmmc driver build process and improved driver clarity and consistency: A dedicated GN target was created for the source files and dependencies, improving maintainability and reducing potential build errors. Metadata type identifiers were also renamed for improved clarity and consistency.
  • Improved driver reliability and prevented potential crashes: A bug in the platform-device driver was fixed, which caused incorrect access to optional data.
  • Improved driver modularity, adaptability to different hardware configurations, and debugging capabilities. The aml-light driver was refactored to retrieve metadata using FIDL from the gpio-light platform device, and inspect data was added to the platform bus driver.
  • Improved power consumption and battery life by optimizing the aml-uart driver. The driver now only registers the interrupt as a wake source when suspend is enabled in the driver configuration.
  • Improved code readability and reduced complexity by simplifying the AmlSdmmc::GetToken() function in the aml-sdmmc driver.

Rust

The following updates have been made for Rust:

  • Improved build system support by adding the ability to pass GN-scope to test targets and cleaning up auxiliary rspfiles earlier after dependency scanning.
  • Prepared for std::panic::PanicInfo rename by adding #[allow(deprecated)].

Software Delivery

The following updates have been made for Software Delivery:

  • Refactored mock Omaha server to support both fasync and tokio runtimes and its start() function is now asynchronous.
  • Added support in Omaha client, system update checker, and fuchsia.update for the update-check-completed protocol, enabling Persistence to publish data immediately after update checks.
  • Updated OTA triggering to use ffx.
  • Omaha client fuchsia test now utilizes poll_until_stalled for better asynchronicity.
  • Improved OTA tooling and artifact downloading in swd-e2e-tests; improved testsharder error handling when a product bundle is missing.

Starnix

The following updates have been made for Starnix:

  • Enhanced security with set-user-id/set-group-id and SELinux dynamic transition checks: Added a setuid feature (disabled by default) and implemented type bounds checks for dynamic transitions in SELinux, improving security and preventing privilege escalation.
  • Improved file system security and management with SELinux hooks and /container feature flag: Added fs_node_set/getsecurity() hooks in SELinux for managing file security attributes, and introduced a feature flag to control the /container directory, paving the way for its eventual removal.
  • Enhanced BPF support with ring buffer operations and mapping: Implemented reserve, submit, and discard operations for BPF ring buffers, along with the ability to map BPF ring buffer file descriptors.
  • Introduced the NMFS manager framework and open3 support: Created a new framework for managing network file system events and added support for open3 in remote execution, providing a more robust and flexible approach to file system operations.
  • Added a stardev container and GPU information at boot: Introduced a new container for self-hosted Fuchsia development and added functionality to pass GPU information during boot for improved driver management.
  • Improved test identification by including "starnix" in test names: Added "starnix" to test names for better identification and organization on dashboards.
  • Fixed potential timer issues by resetting timerfd deadline when disarmed: Ensures the deadline in timerfd is reset upon disarming to prevent unexpected timer behavior.

Storage

The following updates have been made for Storage:

  • Enhanced fxfs testing with a poison pill option for FakeDevice teardown to provide more informative stack traces on crashes, and removed an unnecessary borrow in fuchsia-pkg-testing.
  • Improved NAND device read performance and driver efficiency. The driver now waits for the command queue to be empty before checking the status bits, reducing unnecessary polling and CPU usage. An unused interrupt was also removed, further improving driver efficiency.

Timekeeping

The following updates have been made for Timekeeping:

  • Updated GetMonotonic documentation and added compute_boot_ticks and compute_boot_time functions to libfasttime. The monotonic clock has been guaranteed to start at 0 every time the kernel is started for some time. Added functions to libfasttime to compute boot ticks and time.**
  • Improved RTC driver behavior. Changed timekeeper to watch the /dev/class/rtc directory instead of reading from it, added unit tests, and reverted a change that added a retry for RTC detection.
  • Improved Timer class behavior. Moved the TimerLock declaration into the Timer class to enable referencing it in annotations and allowing marking the timer lists as guarded by this lock, and acquired the timer lock when inspecting queues to address parallel Timer::Cancel events from different CPUs and correctly calculate the next timeout.

Tools

The following updates have been made for Tools:

  • The package-tool has been updated with several enhancements, including a --namespace argument for the extract command to create a namespaced view of a package, and the adoption of package_manifest.json for metadata handling. An outdated comment has also been removed.
  • The create tool now uses the new meta/ directory structure for storing metadata.
  • The sdk-deps script now supports CSV output and provides dependency counts.
  • Removed the obsolete display tools display-detect and display-png.
  • A dangling string assignment in audio tools has been removed, and the broken sys-realm-analyzer tool has been removed.

ffx

The following updates have been made for ffx:

  • Improved target handling: This includes refactoring target resolution, fixing dynamic target adding, setting SSH port in client-side discovery, and disabling client-side discovery to mitigate flakes. Dynamic target adding was relanded after an initial revert.
  • Enhanced output and configuration: Remove ASCII art from package commands, add --background flag for daemon, add --no-environment flag, and store repository info from the CLI.
  • Implemented initial client-side discovery (later disabled for stability).
  • ffx audio device info now shows signal processing, topology, and state with better formatting.
  • Formatted target addresses in error messages for better readability.
  • Removed the legacy freeform writer.

ffx emu

The following updates have been made for ffx emu:

ffx playground

The following updates have been made for ffx playground:

ffx repo

The following updates have been made for ffx repo:

ffx repository

The following updates have been made for ffx repository:

ffx target

The following updates have been made for ffx target:

  • ffx target echo supports machine schema and provides specific errors for unset default target.
  • Implemented daemonless ffx target wait.

fx

The following updates have been made for fx:

UI

The following updates have been made for UI:

  • SceneManager now uses the fuchsia.power.SuspendEnabled config capability to control the suspend_enabled configuration, enabling testing and gated use of the suspend feature.
  • Refined ActivityManager's integration with the power framework (flag-gated). Initial integration was reverted due to OOM issues, and subsequent changes re-introduced state transition management using LeaseHolder and StateTransitioner to prepare for proper wake lease integration. This work included updates to the suspend_enabled config, new integration tests, and routing of the fuchsia.power.SuspendEnabled capability.
  • Improved the handling of InputDevice and InputFile. InputFile::read now returns as many events as possible, and waiter notifications are more accurate due to the use of pending event counts. Button event debugging in Starnix has also been enhanced with inspect counting and additional logging.

Video

The following updates have been made for Video:

  • Fixed a compiler error related to std::pair's copyability: This was caused by a change in std::pair's copyability.

WLAN

The following updates have been made for WLAN:

  • Improved Antlion testing for wlanix: A new product bundle and metadata generation were added for testing wlanix on VIM3 devices without starnix, along with a no-op test.
  • Updated the WLAN roaming policy: Allows selectable roaming implementations through product configuration, defaulting to RoamingOff, and introduces a new roaming policy platform config.
  • Improved WLAN telemetry and inspection: Wlanix now serves Inspect data and logs client connection enabled/disabled events to telemetry for easier inspection of Wi-Fi on/off events.
  • Enhanced MLME and Fullmac FIDL: Added conversion functions and corrected RSNE length limits, resolving API mismatches and improving the handling of oversized data.
  • Improved the wlansoftmac driver: Migrated to DFv2, improving lifecycle and stability; optimized rx and tx paths for reduced data copying; and fixed a memory leak.
  • Enhanced wlan-frame-writer: Improved error reporting; split Appendable into Append and TrackedAppend; added padded buffer writing support; and simplified the write_frame_with_dynamic_buffer macro.
  • Miscellaneous WLAN improvements: Improved state synchronization in WLAN policy; added a driver timer test teardown to prevent errors; ensured ScanAborted is sent on wlanix scan errors; and added rxundec counters to brcmfmac for debugging.