diff --git a/device/husky/NOTES.md b/device/husky/NOTES.md index a3513a5f9..b884d8da7 100644 --- a/device/husky/NOTES.md +++ b/device/husky/NOTES.md @@ -10,6 +10,10 @@ Sources: - `P/`: postmarketOS pmaports `device/testing` (2026-10-21). - `G/`: Google's GPL kernel for this phone, `android-gs-shusky-6.1-android16` ([source.android.com: Build Pixel kernels](https://source.android.com/docs/setup/build/building-pixel-kernels)). +## 2026-11-18: screen look stopgap (#537) + +After boot the 8 Pro's picture looks washed out: true black is fine (a full-screen 0,0,0 looked the same as the panel off, 4 rounds), but the mid-tones look flat. Hyprland's own transfer curve isn't it (`render:cm_sdr_eotf` default vs gamma22 looked the same in a blind A/B with an identical pair). A screen shader of `pow(rgb, g)` was judged by eye in blind rounds on Lef's phone on 2026-11-14 [V]: round 2 picked 1.5 and found no change washed out; round 3 picked 1.6, with 1.7 a bit dark, 1.35 a bit bright and added saturation the worst; round 4, on 1.55, picked gain 0.85 and 0.92 and found lower saturation worse. `omamobile-device-husky` 0.1.17 ships `pow(rgb, 1.55)` then x0.88 as a stopgap, off by default and turned on by an owner marker (`~/.config/omamobile/screen-look-on`). With it on and the phone idle, the GPU stayed at 150 MHz, its lowest clock [V]. The cause is unknown [I]: stock's tables read later don't explain a curve like this ([#537 correction](https://github.com/derekross/omarchy-mobile/issues/537#issuecomment-6876568016)), and one other owner's unit looked deeper for a while on 2026-11-15 with nothing changed in software, so panels or the panel's state after the bootloader may differ. The real fix belongs in the display path. See [#537](https://github.com/derekross/omarchy-mobile/issues/537#issuecomment-6875041006). + ## 2026-11-15: Bluetooth, haptics, the torch and the gauge on merged `omamobile`, a third phone Colin's phone, the third unit (Samsung 128 GB UFS 3.1, SKU G1MNW; [2026-11-08](#2026-11-08-a-third-phone-samsung-128-gb-ufs-31-still-locked)), unlocked since, with Google's CP3A.261005.005 on slot A and Omarchy on slot B. Kernel: `omamobile` at `82f31d3a7`, unchanged (`7.3.0-rc6-omamobile-push1-g82f31d3a7a35`, flashed with `bin/omamobile flash` on 2026-11-13). Firmware from the owner's own factory image with `tools/extract-vendor-firmware -d husky -s G1MNW` ([#722](https://github.com/derekross/omarchy-mobile/pull/722)), installed under `/usr/lib/firmware/updates`. `omamobile-device-husky` 0.1.13 from [#752](https://github.com/derekross/omarchy-mobile/pull/752) (0.1.12 plus the Bluetooth address step; merged 2026-11-15). Each item below was checked by a person at the phone. diff --git a/packages/omamobile-device-husky/PKGBUILD b/packages/omamobile-device-husky/PKGBUILD index 0f167a611..36946b96b 100644 --- a/packages/omamobile-device-husky/PKGBUILD +++ b/packages/omamobile-device-husky/PKGBUILD @@ -13,6 +13,7 @@ conflicts=(omamobile-device) backup=(etc/pacman.d/omamobile-mirrorlist etc/NetworkManager/conf.d/zz-omamobile-wifi-powersave.conf) install=omamobile-device-husky.install makedepends=(gcc) +checkdepends=(glslang lua) build() { "$startdir/build" "$srcdir/build" diff --git a/packages/omamobile-device-husky/README.md b/packages/omamobile-device-husky/README.md index 645ef820b..fcbbc0d0a 100644 --- a/packages/omamobile-device-husky/README.md +++ b/packages/omamobile-device-husky/README.md @@ -8,7 +8,7 @@ Omarchy Mobile's first userspace package for the Google Pixel 8 Pro (codename hu | `vendor/systemd/network/20-usb-gadget.network` | `/usr/lib/systemd/network` | Sets usb0 to 172.16.42.1/24 after handover. A replug needs the USB rescue below: without it the link stays dead until a reboot | | `vendor/systemd/logind.conf.d/10-omamobile-power-key.conf` | `/usr/lib/systemd/logind.conf.d` | A short power press does not power the phone off. Same drop-in as the Pixel 7 Pro. On husky the forced reset is Power + Volume Up held 15-30 s ([BRINGUP-M1](../../device/husky/BRINGUP-M1.md) test 23) | | `vendor/NetworkManager/conf.d/10-omamobile-usb.conf` | `/usr/lib/NetworkManager/conf.d` | Keeps NetworkManager off that link | -| `vendor/NetworkManager/conf.d/zz-omamobile-wifi-powersave.conf` | `/etc/NetworkManager/conf.d` | Wi-Fi power save on (`wifi.powersave=3`), the value the Pixel 6 Pro's package asks for. With it off the phone drew about 30 mA more on battery (step medians of 532 to 543 mA off over four steps and 508 and 509 mA on over two, 16 readings each, 2026-11-14). NetworkManager applies it when a connection comes up, not to a link that is already up. Only a file in `/etc/NetworkManager/conf.d` whose name sorts after `zz-omamobile-wifi-powersave.conf` wins over this one. The simple way to turn it off is to edit this file, which `backup=` keeps across upgrades. A saved network with its own `802-11-wireless.powersave` (2 or 3) keeps that value and does not use this default. Not yet booted from the package, and hours of use with power save on are untested on the 8 Pro. Ping latency with it on is in `device/husky/NOTES.md` | +| `vendor/NetworkManager/conf.d/zz-omamobile-wifi-powersave.conf` | `/etc/NetworkManager/conf.d` | Wi-Fi power save on (`wifi.powersave=3`), the value the Pixel 6 Pro's package asks for. With it off the phone drew about 30 mA more on battery (step medians of 532 to 543 mA off over four steps and 508 and 509 mA on over two, 16 readings each, 2026-11-14). NetworkManager reads it only when it reloads its configuration, and applies it when a connection comes up, not to a link that is already up, so an updated phone gets it from its next boot. Only a file in `/etc/NetworkManager/conf.d` whose name sorts after `zz-omamobile-wifi-powersave.conf` wins over this one. The simple way to turn it off is to edit this file, which `backup=` keeps across upgrades. A saved network with its own `802-11-wireless.powersave` (2 or 3) keeps that value and does not use this default. Hours of use with power save on are untested on the 8 Pro. Ping latency with it on is in `device/husky/NOTES.md` | | `vendor/systemd/sleep.conf.d/10-omamobile.conf` | `/usr/lib/systemd/sleep.conf.d` | Suspend means suspend-to-idle. The kernel's default on the 8 Pro is `deep` (`/sys/power/mem_sleep` reads `s2idle [deep]`), which Linux can't wake from on zuma yet. It is written to the kernel as one state (`SuspendState=freeze`), so a sleep a driver refused isn't tried a second time (#619). No hibernation: there is no swap. The test checks the five settings. Suspend itself is still untested on the 8 Pro ([ROADMAP](../../device/husky/ROADMAP.md), [UFS-PLAN](../../device/husky/UFS-PLAN.md) U5 and U6), so this only keeps a tap on Suspend from choosing `deep` | | `bin/omamobile-husky-display-start` + `vendor/systemd/system/omamobile-husky-display.service` + `display-manager.service.d/10-omamobile-husky.conf` | `/usr/bin`, `/usr/lib/systemd/system` | Loads gs-decon (kernel display PR) before the display manager, hang-safe: a synced marker that a start which never returns leaves behind keeps it off on the next boot, until `--retry`. First it allows the panel's DSI commands (`gs_dsim_cmd.allow_tx=1`, for brightness and 120 Hz), but only when the bootloader names the `google-hk3` panel on the command line, as the Pixel 9a's graphics start does for its panel. Then it sends the brightness systemd restored at boot again, which the panel could only take once `allow_tx` is on. On a kernel without the display PR (derekross/linux-omarchy-mobile#160) the DTB has no DECON0, so the unit is skipped by its condition and the screen stays on simple-framebuffer. With another panel name, `allow_tx` stays off and gs-decon runs read-only at 60 Hz | | `vendor/modprobe.d/omamobile-husky-display.conf` | `/usr/lib/modprobe.d` | Blacklists gs_decon's autoload, so the display start loads it after `allow_tx`: gs-decon decides on 120 Hz at probe. Sets `screen_off=2`, as cheetah and tegu do: on DPMS off DECON stops its frames and the panel goes to sleep, and DPMS on wakes it | @@ -22,6 +22,7 @@ Omarchy Mobile's first userspace package for the Google Pixel 8 Pro (codename hu | `etc/omamobile-mirrorlist` | `/etc/pacman.d/omamobile-mirrorlist` | Where pacman finds the `[omamobile]` repository. Same file as the Pixel 7 Pro package | | `omamobile-device-husky.install` | pacman hook | Adds `[omamobile]` to `pacman.conf` before `[omarchy]`, once. Same script as the Pixel 7 Pro package | | `src/reboot-to.c` | `/usr/bin/reboot-to` | Reboot with a reason the bootloader understands. Same bytes as the Pixel 7 Pro package; the test checks | +| `hypr/device.lua` + `hypr/screen-look.frag` | `/usr/share/omamobile/hypr/device.lua`, `/usr/share/omamobile/device-husky/screen-look.frag` | Screen look stopgap ([#537](https://github.com/derekross/omarchy-mobile/issues/537)): a Hyprland screen shader, `pow(rgb, 1.55)` then x0.88, set by `device.lua`, which omamobile-shell's `hypr/phone.lua` loads under `pcall` when it is there (the hook from [#204](https://github.com/derekross/omarchy-mobile/pull/204), needed for this to take effect). On some units the panel's mid-tones look flat after boot; the cause is unknown, so this is a stopgap and the real fix belongs in the display path. The numbers came from two blind gamma rounds and one blind gain round by eye on one phone, after a first pass with the names showing (gamma 1.5-1.6 won the blind gamma rounds, no change looked washed out, more saturation looked worse, gain 0.85-0.92 best); the GPU stayed at its lowest clock with it on. It is off by default. To turn it on, create `~/.config/omamobile/screen-look-on` and run `hyprctl reload` (or log in again); remove the file and reload to turn it off. Without the file `device.lua` does not call `hl.config` at all, so a `screen_shader` line of your own still applies. Screenshots, screen recordings and the VNC mirror don't include the shader: they go through Hyprland's screencopy, and v0.57.0's `ScreenshareFrame.cpp` sets `blockScreenShader` for its frames, so the look can only be judged on the panel itself or through a camera. The test (glslang and lua are checkdepends) checks the GLSL ES header, compiles it with `glslangValidator`, runs `device.lua` with and without the marker and with a failing `hl.config`, and checks no other device package ships `screen-look.frag` | | `device.conf` | `/usr/share/omamobile/device.conf` | The descriptor, the same bytes as `device/husky/device.conf` | `./build [DIR]` compiles `reboot-to` from this directory, `./install DESTDIR [DIR]` stages the files, and `test/all` checks the copies when it is run from the repository. diff --git a/packages/omamobile-device-husky/hypr/device.lua b/packages/omamobile-device-husky/hypr/device.lua new file mode 100644 index 000000000..cc0df0b78 --- /dev/null +++ b/packages/omamobile-device-husky/hypr/device.lua @@ -0,0 +1,18 @@ +-- SPDX-License-Identifier: MIT +-- Pixel 8 Pro Hyprland settings. omamobile-shell's hypr/phone.lua loads this +-- file under pcall after the shared rules, when it is there (#204). +-- +-- Screen look stopgap (#537): on some units the panel's mid-tones look flat +-- (washed out) after boot, cause unknown. A screen shader puts them back. +-- It is off by default. To turn it on, create +-- ~/.config/omamobile/screen-look-on and reload Hyprland (hyprctl reload) or +-- log in again; remove the file and reload to turn it off. Without the file +-- this does not touch screen_shader, so a line of your own still applies. +local shader = "/usr/share/omamobile/device-husky/screen-look.frag" +local opt_in = (os.getenv("HOME") or "") .. "/.config/omamobile/screen-look-on" +local marker = io.open(opt_in, "r") +if marker then + marker:close() + local ok, err = pcall(hl.config, { decoration = { screen_shader = shader } }) + if not ok then print("omamobile-device-husky: screen look: " .. tostring(err)) end +end diff --git a/packages/omamobile-device-husky/hypr/screen-look.frag b/packages/omamobile-device-husky/hypr/screen-look.frag new file mode 100644 index 000000000..9d2c83cb5 --- /dev/null +++ b/packages/omamobile-device-husky/hypr/screen-look.frag @@ -0,0 +1,16 @@ +#version 300 es +// SPDX-License-Identifier: MIT +// Pixel 8 Pro screen look stopgap (#537): pow(rgb, 1.55) then x0.88, from +// blind rounds by eye on one panel: two gamma rounds (1.5-1.6 won) and one +// gain round, after a first pass with the names showing. The cause of the +// flat mid-tones is unknown. +precision highp float; +in vec2 v_texcoord; +uniform sampler2D tex; +layout(location = 0) out vec4 fragColor; +void main() { + vec4 c = texture(tex, v_texcoord); + vec3 rgb = pow(max(c.rgb, vec3(0.0)), vec3(1.55)); + rgb *= 0.88; + fragColor = vec4(rgb, c.a); +} diff --git a/packages/omamobile-device-husky/install b/packages/omamobile-device-husky/install index 790758918..2391d58ce 100755 --- a/packages/omamobile-device-husky/install +++ b/packages/omamobile-device-husky/install @@ -67,3 +67,6 @@ install -Dm644 etc/omamobile-mirrorlist \ "$destination/etc/pacman.d/omamobile-mirrorlist" install -Dm644 LICENSE "$destination/usr/share/licenses/omamobile-device-husky/LICENSE" install -Dm644 version "$destination/usr/share/omamobile/device-husky/version" +install -Dm644 hypr/screen-look.frag \ + "$destination/usr/share/omamobile/device-husky/screen-look.frag" +install -Dm644 hypr/device.lua "$destination/usr/share/omamobile/hypr/device.lua" diff --git a/packages/omamobile-device-husky/test/all b/packages/omamobile-device-husky/test/all index 1760d8b79..fb7b48b5d 100755 --- a/packages/omamobile-device-husky/test/all +++ b/packages/omamobile-device-husky/test/all @@ -280,3 +280,33 @@ ps="$tmp/root/etc/NetworkManager/conf.d/zz-omamobile-wifi-powersave.conf" grep -qx '\[connection\]' "$ps" || fail "the Wi-Fi power save file needs a [connection] header" grep -qx 'wifi.powersave=3' "$ps" || fail "Wi-Fi power save is on by default (3 = enable)" pass "Wi-Fi power save is on by default" + +# Screen look stopgap (#537): the shader and the per-device Lua phone.lua loads. +[[ $(head -1 hypr/screen-look.frag) == '#version 300 es' ]] || fail "the shader starts with a GLSL ES 3.00 header" +grep -q 'pow(max(c.rgb, vec3(0.0)), vec3(1.55))' hypr/screen-look.frag || fail "the shader's gamma is 1.55" +grep -q 'rgb \*= 0.88;' hypr/screen-look.frag || fail "the shader's gain is 0.88" +# glslang and lua are checkdepends, so a package build always runs these. +command -v glslangValidator >/dev/null || fail "glslangValidator (glslang) is installed for the shader check" +glslangValidator -S frag hypr/screen-look.frag >/dev/null || fail "the shader compiles (glslangValidator)" +grep -q '"/usr/share/omamobile/device-husky/screen-look.frag"' hypr/device.lua || fail "device.lua points at the installed shader" +grep -q '"$destination/usr/share/omamobile/device-husky/screen-look.frag"' install \ + || fail "install puts the shader where device.lua looks" +grep -q 'hypr/device.lua "$destination/usr/share/omamobile/hypr/device.lua"' install \ + || fail "install puts device.lua where phone.lua's hook (#204) looks" +# Other phones may ship their own device.lua (#204), but not this shader file. +for other in ../omamobile-device-*; do + [[ $other == ../omamobile-device-husky ]] && continue + [[ -e $other/hypr/screen-look.frag ]] && fail "another phone ($other) ships screen-look.frag" +done +command -v lua >/dev/null || fail "lua is installed for the device.lua check" +stub='hl = { config = function(t) local d = t.decoration; io.write("[", d and d.screen_shader or "nil", "]") end }' +mkdir -p "$tmp/home/.config/omamobile" +out=$(HOME="$tmp/home" lua -e "$stub" hypr/device.lua) +[[ -z $out ]] || fail "without the screen-look-on marker device.lua leaves screen_shader alone" +touch "$tmp/home/.config/omamobile/screen-look-on" +out=$(HOME="$tmp/home" lua -e "$stub" hypr/device.lua) +[[ $out == '[/usr/share/omamobile/device-husky/screen-look.frag]' ]] || fail "the screen-look-on marker sets the screen shader" +out=$(HOME="$tmp/home" lua -e 'hl = { config = function() error("boom") end }' hypr/device.lua) \ + || fail "a failing hl.config does not raise out of device.lua" +[[ $out == *'screen look:'*boom* ]] || fail "a failing hl.config is printed" +pass "the screen look shader ships on husky, off unless screen-look-on is there" diff --git a/packages/omamobile-device-husky/version b/packages/omamobile-device-husky/version index e8e277f2f..04c5555c6 100644 --- a/packages/omamobile-device-husky/version +++ b/packages/omamobile-device-husky/version @@ -1 +1 @@ -0.1.16 +0.1.17