Skip to content

Add Surface Pro 11 ambient light sensor support - #828

Open
turbineBMW wants to merge 1 commit into
omacom:masterfrom
turbineBMW:upstream/surface-pro-11-sensors
Open

turbineBMW wants to merge 1 commit into
omacom:masterfrom
turbineBMW:upstream/surface-pro-11-sensors

Conversation

@turbineBMW

Copy link
Copy Markdown

Summary

  • The Surface Pro 11's light sensor sits on the ADSP's Qualcomm sensor core, which reports nothing until the host serves its configuration.
  • Builds hexagonrpcd (with registry write support) and libssc (reading Microsoft's color sensor) from pinned upstream source into a private directory, and points iio-sensor-proxy at that libssc with a drop-in. Arch's iio-sensor-proxy is otherwise untouched. The libssc pin includes the fix for iio-sensor-proxy spinning when the sensor server never appears.
  • The sensor configuration is Microsoft's and Qualcomm's and is not shipped. surface-pro-11-sensors-extract copies it from the machine's own Windows driver store, the same model as qcom-firmware-extract (Add safe Windows firmware extraction for Snapdragon laptops #221). It runs only on the Surface Pro 11 OLED (device-tree gated) and reuses an already mounted Windows partition.
  • The service starts when the ADSP device appears, so a missing DSP never delays boot. A sleep hook stops iio-sensor-proxy across suspend so the light stream does not wake the SoC.
  • groups=('omarchy-platform-qualcomm'), edge.

Consumers: the ALS keyboard-backlight work in omarchy#13148 and auto-brightness.

Dependencies

None to build. Needs the ADSP running, so the Surface DSP firmware from #221 (with the Windows-name fix offered there).

Test plan

  • test.sh and hexagonrpc's tests pass
  • The extracted configuration matches the previously qualified one byte for byte
  • The service starts from the ADSP device; monitor-sensor --light reports live illuminance (about 30 lux indoors, over 100 in daylight) on kernel 7.3-rc6
  • Readings continue after suspend and resume

The Surface Pro 11's light sensor runs on the ADSP's Qualcomm sensor
core, which reports nothing until the host serves it its configuration.
Build hexagonrpcd, with registry write support, and libssc, reading
Microsoft's "color" sensor, from pinned upstream source into a private
directory, and point iio-sensor-proxy at that libssc through a drop-in.
The libssc pin includes the fix for iio-sensor-proxy spinning when the
sensor server never appears.

The configuration is Microsoft and Qualcomm's and is not shipped.
surface-pro-11-sensors-extract copies it from the machine's own Windows
driver store, with the SoC ID and revision from the running system; it
runs only on the Surface Pro 11 OLED and reuses an already mounted
Windows partition. The service starts when the ADSP appears, so a
missing DSP never delays boot or iio-sensor-proxy, and a sleep hook
stops iio-sensor-proxy across suspend so the light stream does not wake
the SoC. The package is tagged for the Qualcomm platform guard and
published to edge.

Validated with test.sh, hexagonrpc's tests, and on a Surface Pro 11:
the extracted root matches the previously qualified one, the service
starts from the ADSP device, and iio-sensor-proxy reports live
illuminance.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant