Skip to content

Add HP EliteBook X G2i audio and camera support on linux-omarchy - #480

Open
meirdick wants to merge 14 commits into
omacom:masterfrom
meirdick:hp-elitebook-x-g2i-omarchy
Open

meirdick wants to merge 14 commits into
omacom:masterfrom
meirdick:hp-elitebook-x-g2i-omarchy

Conversation

@meirdick

Copy link
Copy Markdown

Replaces #124, which targeted linux-ptl. Omarchy 4.0.4 boots linux-omarchy
and no longer installs linux-ptl, so the kernel side moves there.

On a stock install the HP EliteBook X G2i (Panther Lake, board 8E86, SKU
D4DU1UT#ABA; the X Flip G2i D4VJ0UA#ABA is the same board) has no
speakers, no microphone and no webcam. With this PR it has four-speaker stereo
with the factory calibration applied, a working microphone and headset jack,
a webcam on the hardware ISP, and a resume that the amplifiers no longer hold
up.

Kernel

Eleven patches added to pkgbuilds/linux-omarchy, numbered into the existing
ranges with gaps kept. Every patch applies at offset 0 and fuzz 0 on 7.2.5-4,
was regenerated with git format-patch from a tree with the base applied, and
carries a full header (subject with subsystem prefix, body, Signed-off-by, and
the upstream SHA or list Link: where one exists). They are unsigned; the
source=() entries have no .sig companion, the way 7b11c97 ("Fix
unsigned patch sources for Omarchy kernels") listed them.

Patch Subject Upstream status
0520 ASoC: Intel: soc-acpi-intel-ptl-match: add HP EliteBook X G2i local only, stopgap: Intel does not take new PTL match entries (Bard Liao, 2026-06-29); HP BIOS Y90 99.15.23 reportedly lets the SDCA machine generator find the amps (LP#2164504), unverified here
0521 ASoC: tas2783: do not block system resume on peripheral re-attach local; series prepared
0522 ASoC: tas2783: re-initialise amplifiers from .startup after system sleep jml's v2 3/3, patchwork 14763920; stalled after Mark Brown's 2026-08-31 review ("feels like a bodge"); expected to be replaced by Baojun Xu's v4 (patchwork 14815978)
0523 soundwire: stream: append ports when a second DAI joins a stream local; series prepared
0524 ASoC: Intel: sof_sdw: split a four-amp TAS2783A link into two PDIs local; series prepared
0525 ASoC: tas2783: take one stream channel per mono amplifier not sent; on 7.3 173cb3147ba2 does the hw_params half in the codec and the .set_tdm_slot plumbing has no remaining purpose, so drop the whole patch there; still needed on 7.2.y
0526 ASoC: tas2783: keep the firmware image for re-initialisation local only; re-evaluate against Baojun Xu's v4, which avoids the download differently
0527 ASoC: tas2783: read factory calibration from every vendor GUID local; reply prepared to jml's v2 2/3 (patchwork 14763919), now carries both HP GUIDs (8E86 and 8EA1); upstream version sits on 3e56757584d6
0528 ASoC: tas2783: do not fail runtime resume on a late peripheral local; series prepared
0543 media: ipu-bridge: Add support additional link frequency in media-next as f9536a8065d9 for 7.4; b883954d842f (7.4) restructures the table, so the hunk needs a rebase before it is dropped
0802 platform/x86: int3472: 50 ms handshake delay for the ov05c10 superseded in media-next by 844982d3b993 (200 ms, Cc stable); on a 7.3 base edd0dd59aca0 changes .hid to .hids[] first

Nine patches from #124 are already in this base and were dropped: 0020,
0028 (carried as 0400/0401), 0029 (0350), 0030 (stable 7.2.5),
0055/0056 (stable 7.2.5), 0057 (0510), 0058/0059 (0511).

pkgrel is 4.1 for the local build here so it sorts between the published
4 and the next 5; set it to whatever the next release is.

Packages

hp-elitebook-x-g2i-audio, hp-elitebook-x-g2i-camera,
hp-elitebook-x-g2i-camhal-runtime, intel-ipu7-drivers and
libcamera-ov05c10 come over from #124 unchanged, then the audio and camera
packages switch their kernel dependency to linux-omarchy and drop the stock
linux-headers dependency as #454 did for the other DKMS packages. Package
contents are unchanged; makepkg --printsrcinfo shows the dependency change.

Verification

Verified on the reference board on linux-ptl 7.2.3.arch1-5 with the same
patches before the rebase: four amplifiers each on their own channel, left and
right where the chassis puts them; factory calibration found for all four
unique ids; camera on engine=camhal from a cold start; audio back after
suspend without the amplifiers holding up resume. A second board (@cyberKrakn, X Flip G2i) confirmed the
camera and the stereo topology on 7.2.3.arch1-4, and reported the late-amp
runtime-resume failure that 0528 fixes; the retest with 0528 is pending.

For this rebase: makepkg -o applies all 102 patches with no offset or fuzz;
the seven objects the patches touch compile with zero warnings at W=1;
linux-omarchy 7.2.5-4.1 builds to completion in 43 minutes on 8 threads
(both packages produced; the only compiler warnings in the log are two
-Wmaybe-uninitialized in tools/lib/bpf/libbpf.c, outside anything this
PR touches). In the built modules: snd-soc-tas2783-sdw.ko has
set_tdm_slot, fw_program, the HP GUID bytes, the factory calibration applied and starting the stream without it strings, and no
__pm_runtime_suspend/__pm_runtime_set_status references; snd-soc-sof-sdw.ko
has the splitting into 2 PDIs string; intel_skl_int3472_discrete.ko the
OVTI05C1 entry; snd-soc-acpi-intel-match.ko the dummy topology name; and
sdw_stream_add_master() in soundwire-bus.ko is 192 instructions against
157 in the stock 7.2.5-4 module.

Not yet verified: a boot of 7.2.5-4.1-omarchy on the board. linux-omarchy
turns INTEL_IOMMU_DEFAULT_ON on where linux-ptl had it off; the IPU7 and
Xe have run only in identity mode here, so the first boot should check
/sys/kernel/iommu_groups/*/type and, if the camera or display misbehave, try
iommu=pt.

On the next base bump

  • 7.2.6: 0510 will conflict on tas2783-sdw.c because 7.2.6 contains
    08331ff6fffa and bfa756f3b8bf, which 0510 also adds. Once 0510 is
    refreshed, 0521 and 0528 should still apply; they were regenerated against
    the 0510 versions of those hunks.
  • Any base with f9536a8065d9: drop 0543.
  • Any base with 844982d3b993: drop 0802.
  • A 7.3 base: drop 0525 (173cb3147ba2 does the same in the codec). 0523
    and 0524 are still needed for four amplifiers.
  • 0522 when jml's v2 lands or Baojun Xu's "firmware download status check"
    (v4, patchwork 14815978) is merged; re-check 0526 against the same patch.
    0527 if the GUID table or his second #define is merged.
  • 7.4 folds IPU7 and IPU7.5 into the intel_ipu6 driver (2f4ffd14b6c0,
    "media: ipu6: Enable support for IPU 7 and IPU 7.5", a 45-patch series).
    With CONFIG_VIDEO_INTEL_IPU6_IPU7 on, the Panther Lake IPU7.5 binds to
    intel_ipu6 by default and the in-tree intel_ipu7 steps back (module
    options in both drivers move it either way). The intel-ipu7-drivers DKMS
    modules and the CamHAL runtime are built around the IPU7 driver, so that
    base bump needs the camera stack re-tested, not just the patches
    re-applied.

Not a bug, so nothing to carry: tas2783-sdw requests 8E86-2-9.bin and
the like and linux-firmware ships 8E86-2-0x9.bin symlinked to
15E2-0-0x8.bin. That alias is Arch's make dedup collapsing byte-identical
files, not an upstream rename; the upstream 8E86 files are regular files.
The audio package's filename symlinks stay as they are.

Addendum: hp-elitebook-x-g2i-audio 1.1.0-6 pins the per-amp analog gain (Amp Volume) in UCM. On this base the regcache restored 20 for the left pair and 12 for the right, an audible left-heavy imbalance; pinned, the tweeters measure within 0.5 dB.

Closes #124.

🤖 Generated with Claude Code

@cyberKrakn

Copy link
Copy Markdown

@meirdick Rebase confirmed on the X Flip G2i (board 8E86, D4VJ0UA#ABA). Built pkgbuilds/linux-omarchy from hp-elitebook-x-g2i-omarchy here (16 threads), installed it with its headers, IgnorePkg set, and DKMS rebuilt the camera modules against it.

journalctl -k -b | grep -E 'factory calibration|not attached|splitting into 2 PDIs':

slave-tas2783 sdw:0:2:0102:0000:01:d: factory calibration applied (4 speakers in UEFI)
slave-tas2783 sdw:0:2:0102:0000:01:c: factory calibration applied (4 speakers in UEFI)
slave-tas2783 sdw:0:2:0102:0000:01:a: factory calibration applied (4 speakers in UEFI)
slave-tas2783 sdw:0:2:0102:0000:01:9: factory calibration applied (4 speakers in UEFI)

not attached: 0 lines.

cat /sys/bus/soundwire/devices/sdw:0:2:0102:0000:01:*/status -> Attached on all four (9, a, c, d).

pactl list cards | grep 'Active Profile' -> Active Profile: HiFi (5 sinks). Camera engine=camhal on the first open.

  • Suspend/resume: s2idle 15:37 -> 16:10 (33 min). Calibration re-applied x4 on resume and audio came back without the amplifiers holding up resume — 0522 works.
  • IOMMU: cat /sys/kernel/iommu_groups/*/type | sort | uniq -c -> 22 DMA-FQ. DMA remapping is on rather than identity, and camera and display are both fine — no iommu=pt needed on this board.
  • splitting into 2 PDIs greps to 0, and that is the check line rather than the patch: 0524 emits it with dev_dbg, so it never reaches a plain journal. The card still loads sof-sdca-2amp-id2.tplg and plays stereo, so nothing is wrong — but if you want that string visible on the next retest it needs dev_info, or dyndbg="file sound/soc/intel/boards/sof_sdw.c +p".

Also installed hp-elitebook-x-g2i-audio 1.1.0-6 for the per-amp analog gain pin.

Good to see the whole stack land on the new base — thanks again for the work.

@meirdick

Copy link
Copy Markdown
Author

@cyberKrakn Thanks, that is a full pass: enumeration, calibration, resume, camera and IOMMU all match what I see here.

One question: which BIOS are you on (cat /sys/class/dmi/id/bios_version)? HP's 01.02.02 (sp174220, via Windows Update) changes how the amps are initialised and silences the right pair on 4.1. Root cause found and fixed today, 4.2 adds 0529 for it. If you are still on 01.01.18, hold that for now, you are the only tester on the old path.

On the dev_dbg: keeping it. Upstream wants that line at debug level, and dyndbg="file sound/soc/intel/boards/sof_sdw.c +p" is the intended way to see it.

@meirdick

Copy link
Copy Markdown
Author

4.2: fix for HP BIOS 01.02.02

The new BIOS (sp174220, via Windows Update) describes the amps' SmartAmp function. The tas2783 driver then inits from BIOS data instead of its fixed sequence, and keeps the DSP posture the firmware image programs per side: left amps 1, right amps 4 (reads the second channel). 0525 gave each amp a one-channel port, so the right pair had nothing to play.

0529 skips the per-amp channel mask when the peripheral has a SmartAmp SDCA function. The link mirrors the stereo port to all four amps and each picks its own side. Old BIOS keeps the 0523-0525 path.

Verified on 8E86 / 01.02.02: four amps play, no crosstalk, sides within 1 dB. Testers on 01.01.18: no change for you.

@cyberKrakn

Copy link
Copy Markdown

@meirdick We're on Y90 Ver. 01.01.18 (board 8E86, D4VJ0UA#ABA), so the old path. Holding the BIOS update as you asked and staying on 4.1 — the pass above stands, and nothing here exercises 0529.

Good to know the dev_dbg is deliberate; I'll use the dyndbg line when I need it rather than asking for dev_info.

@ryanrhughes

Copy link
Copy Markdown
Collaborator

Before this can build: hp-elitebook-x-g2i-camhal-runtime has no .omarchy/package.json; every package needs one. Two other things to fix while you're in there: both DKMS PKGBUILDs use SKIP for every source checksum (12 and 7 entries), and the README shows sudo pacman -U of locally built files. Pinned sources with real checksums please. kwilczynski is requested for the kernel side.

@meirdick

meirdick commented Sep 22, 2026 •

Copy link
Copy Markdown
Author

All three fixed, and the branch is rebased on current master.

  • hp-elitebook-x-g2i-camhal-runtime now has .omarchy/package.json.
  • Every source in both DKMS packages has a real sha256 instead of SKIP, made with updpkgsums. The git sources were already pinned to a full commit SHA. pacman 7.1 checksums a git source from its checked-out tree, and I deleted the clone and re-fetched to confirm the hash comes back the same, so makepkg --verifysource passes on both.
  • TESTPLAN-v2.md was the only doc with pacman -U of local builds. It was my own test plan, so it is out of the repo. README.package.md is now the only doc a user reads.

Also here: a fix to Intel's ov05c10 driver in the camera package. It read a sensor register for VBLANK before checking runtime PM, so libcamera's control writes went to a powered-down sensor. Found through bprendie's Snapdragon port, which uses the same driver.

The kernel is rebased onto linux-omarchy 7.2.5-6, local pkgrel 6.2. Our 12 patches apply and it builds.

@cyberKrakn

Copy link
Copy Markdown

Boot confirmation for the 7.2.5-6.2 rebase on the X Flip G2i, same board as before: 8E86, D4VJ0UA#ABA, stock BIOS Y90 01.01.18 (holding the update as agreed).

Built pkgbuilds/linux-omarchy from the branch (16 threads, 106 patches applied with no offset or fuzz, ~44 minutes from source extraction to both packages), installed it with its headers (IgnorePkg set), DKMS rebuilt ov05c10 2.0.2, ipu7-drivers, vision-drivers and v4l2loopback against it, and booted 7.2.5-6.2-omarchy.

journalctl -k -b | grep -E 'factory calibration|not attached':

slave-tas2783 sdw:0:2:0102:0000:01:d: factory calibration applied (4 speakers in UEFI)
slave-tas2783 sdw:0:2:0102:0000:01:c: factory calibration applied (4 speakers in UEFI)
slave-tas2783 sdw:0:2:0102:0000:01:a: factory calibration applied (4 speakers in UEFI)
slave-tas2783 sdw:0:2:0102:0000:01:9: factory calibration applied (4 speakers in UEFI)

not attached: 0 lines. All four amps Attached in /sys/bus/soundwire/devices/sdw:0:2:0102:0000:01:*/status. pactl list cards -> Active Profile: HiFi, 5 sinks.

Camera: hp-elitebook-x-g2i-camera 2.0.2-3 with the ov05c10 VTS fix installed and DKMS-rebuilt. First open after boot starts engine=camhal (sensor_starts=1, sensor_failures=0, ~390 frames streamed), and it opens again cleanly after a resume (sensor_starts=2, sensor_failures=0, another ~300 frames).

Suspend/resume: s2idle entry/exit clean (12 s under rtcwake), factory calibration re-applied x4 on resume, all four amps Attached, HiFi, 5 sinks, and resume returned without the amplifiers holding it up.

IOMMU: cat /sys/kernel/iommu_groups/*/type | sort | uniq -c -> 22 DMA-FQ; camera and display both fine, no iommu=pt.

Our path is BIOS 01.01.18, so nothing here exercises 0529; 0523-0525 is what booted.

@meirdick

meirdick commented Nov 1, 2026

Copy link
Copy Markdown
Author

Rebased onto master at 7.2.15-1, and force-pushed, so the diff is new throughout.

The kernel packaging was restructured twice since this PR opened. linux-omarchy is the BORE kernel itself now, linux-omarchy-bore is an empty transitional package, and linux-omarchy-muqss is new. The eleven patches therefore go into linux-omarchy, -eevdf and -muqss, with a b2sum and a sha256 each and no .sig. pkgrel 2.

The patches cover board 8E86: an RT712 codec with four TAS2783A amps on SoundWire, and an OV05C10 camera on IPU7. Nine audio, one ipu-bridge, one int3472. Without them the right speakers are silent, resume takes 13 seconds, and the camera does not work.

Numbered 0519, 0533, 0534-0540, 0553 and 0809. Generated with git format-patch from the prepared 7.2.15-2 source, so each applies at offset 0 with --fuzz=0. Verified with makepkg --nobuild on linux-omarchy.

Nine of the eleven are not upstream yet. Two have mainline replacements that first appear in 7.4-rc1 and should be dropped when the base moves: the ipu-bridge link frequency (f9536a8065d9) and the int3472 handshake delay (844982d3b993). TI's f42fbd560cd8 also removes the per-amp split that 0540 gates.

Two package changes worth noting:

  • The audio and camera packages no longer name a kernel in depends. The patches are in all three kernels, and naming one pulled that kernel onto a machine running another.
  • hp-elitebook-x-g2i-audio no longer owns sof-soundwire/tas2783.conf, which alsa-ucm-conf carries upstream. A card-specific override points at our own file instead.

Closes omacom/omarchy#16123, #14172 and #13178 on this hardware; #16393 is a fourth.

One caveat: hardware verification was done on 7.2.8-11, with identical patch content. Stable 7.2.9 to 7.2.15 touches none of the six files involved, but this exact build has not been booted.

@meirdick
meirdick force-pushed the hp-elitebook-x-g2i-omarchy branch from 36ba361 to 97fa6c0 Compare November 1, 2026 21:52
@jlupox

jlupox commented Nov 15, 2026

Copy link
Copy Markdown

Hi! Just wanted to add some feedback from another HP EliteBook X G2i owner (board 8E86, BIOS 01.01.18).

I've been running the patched linux-omarchy 7.2.5-6.2 kernel since October, and I can confirm that all four internal speakers and the webcam work correctly.

I've also successfully upgraded to Omarchy 4.5.0 while keeping the patched kernel.

The only downside is that I currently need to keep linux-omarchy and its headers pinned through IgnorePkg to avoid losing hardware support.

It would be great to have these fixes integrated into the official kernel so we can return to normal kernel updates.

Is there any outstanding technical blocker, or is this mainly waiting for maintainer review?

Thanks to everyone working on this, especially @meirdick!

@meirdick

Copy link
Copy Markdown
Author

Thanks. I'll send an internal message to someone on the team to get this upstream.

@meirdick

Copy link
Copy Markdown
Author

@birkskyum and @ryanrhughes - let me know what you need to get this merged.

@birkskyum

Copy link
Copy Markdown
Contributor

@meirdick , this is an x86 machine - i'm working arm machines, so outside my area.

meirdick and others added 7 commits November 18, 2026 10:10
hp-elitebook-x-g2i-audio, hp-elitebook-x-g2i-camera,
hp-elitebook-x-g2i-camhal-runtime, intel-ipu7-drivers and
libcamera-ov05c10, unchanged from branch hp-elitebook-x-g2i-v2
(d881977). The kernel side moves to linux-omarchy in the next commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Omarchy 4.0.4 installs and boots linux-omarchy and no longer installs
linux-ptl. The kernel patches these packages need now ship in
pkgbuilds/linux-omarchy (0520-0528, 0543, 0802). Point the audio and
camera depends there, bump both pkgrel, and update the comments and
docs that named linux-ptl or the old patch numbers. The TAS2783A
component name patch (old 0051) is in 7.2 and is no longer listed.

Drop the stock linux-headers dependency from hp-elitebook-x-g2i-camera
and intel-ipu7-drivers, as omacom#454 did for the other DKMS packages: the
base install supplies the matching headers, and a concrete
linux-headers dependency pulls in the stock kernel's headers.

No functional change to what any of the packages installs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
UCM set the four Speaker Volume trims but never Amp Volume, so the
analog output gain was whatever the driver's regcache restored. On
linux-omarchy 7.2.5 that came up 20 on the left pair and 12 on the
right: right side ~3 dB down, tweeters 2.5 dB apart, audibly
left-heavy. Set all four to 20 alongside the Speaker Volume trims.
Measured matched to 0.5 dB on the tweeters afterwards.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Every package carries .omarchy/package.json; this one was missing it, so
the repo could not build it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both packages pinned their sources by commit but carried SKIP. pacman
7.1 checksums a VCS source from its checked-out tree, and the value
reproduces from a fresh clone, so the pins are verified now rather than
trusted.

Generated with updpkgsums; makepkg --verifysource passes on both.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
TESTPLAN-v2.md was an internal QA plan, and its install steps read as
package documentation for pacman -U of locally built files. It lives
outside the repo now; README.package.md stays the only user-facing doc.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
meirdick and others added 7 commits November 18, 2026 10:10
ov05c10_set_ctrl() read REG_TIMING_VTS for VBLANK before checking
runtime PM. libcamera sets controls while the sensor is suspended, so
the read went to a powered-down part and the dummy-line value came from
a failed read. Move it under the power check, and stop on a failed
control write instead of issuing the trigger sequence after it.

Found by bprendie in omarchy-snapdragon, which carries the same Intel
driver on an HP EliteBook Ultra G1q. Not upstream yet.

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

alsa-ucm-conf now ships sof-soundwire/tas2783.conf itself (182d0122a7,
after 1.2.16.1), the path this package owned. The next release would
fail to install on a file conflict.

- ship the Speaker device as sof-soundwire/tas2783-hp-elitebook-x-g2i.conf
- add conf.d/sof-soundwire/<card long name>.conf: probed before the
  driver-wide file, it includes the stock card config and redirects the
  speaker include to our file, gated on the amps' controls existing
- pin Amp Volume to 12 (17 dB) on all four amps, the value HP's firmware
  writes; 20 was the driver's register default
- tested against a pristine 1.2.16.1 tree with and without upstream's
  tas2783.conf present

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The patches are in linux-omarchy, -eevdf and -muqss. Naming one of them
pulled that kernel onto a machine running another, which the dependency
did not do while linux-omarchy was still a meta package.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Found on 7.2.8-11: kcontrols at 9.6s, the four amps finishing calibration
at 10.8, 11.9, 13.0 and 14.0s, WirePlumber enumerating at 13.6s. The
Speaker sequence was abandoned part-way, so the output switches stayed
off and the per-amp trim stayed at hardware maximum. Profile HiFi, graph
fully linked, every level plausible, no sound.

The wait now probes what breaks instead of sleeping a fixed 4s: while an
amp initialises its register cache is synced over anything written, so
it writes the trim and requires all four to hold it twice. About a
second on a settled card.

The self-heal gains that check. Gated on the Headphone Jack kcontrol:
with headphones in, UCM switches the Speaker device off on purpose and
the controls read identically.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
HPCAM_EXPOSURE_RANGE is documented as the way to stop AE riding maximum
analog gain. It does not. At 200 ms the sensor stayed at exposure 1978
of 3687 and gain 248 of 248. Raising vertical_blanking by hand lifted
the hardware ceiling to 21775 and AE still would not take it, while
softisp drives the same sensor to 3687 on the same scene.

Documented as known-broken rather than quietly dropped: it is the right
lever if a later HAL honours it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Eleven patches for board 8E86: RT712 plus four TAS2783A amps on
SoundWire, and an OV05C10 camera on IPU7. Nine audio, one ipu-bridge,
one int3472. In all three kernels, pkgrel 2.

Numbered 0519, 0533, 0534-0540, 0553 and 0809, into what is free on
7.2.15-1.

Generated with git format-patch from the prepared 7.2.15-2 source, so
every patch applies at offset 0 with --fuzz=0. Verified with makepkg
--nobuild on linux-omarchy.

Of the eleven, nine are not upstream yet. Two have mainline
replacements that first appear in 7.4-rc1, so they go when the base
moves: the ipu-bridge link frequency (f9536a8065d9) and the int3472
handshake delay (844982d3b993).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@meirdick
meirdick force-pushed the hp-elitebook-x-g2i-omarchy branch from 97fa6c0 to 8668294 Compare November 18, 2026 18:00
@greptile-apps

greptile-apps Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Confidence Score: 1/5RetriggerView in Greptile

[Medium impact] The changes affect audio and camera use on the supported EliteBook family.

Do not merge yet: the previously reported unsafe device access, legacy driver replacement, and unchanged default-kernel version remain unresolved.

Findings

  1. P1 Security Unsafe camera device is world-writable. ▶
  2. P1 Legacy CVS replaces current driver. ▶
  3. P1 Default kernel never updates. ▶
  4. P2 Translated sessions trigger audio restarts ▶
  5. P2 Driver package conflict is undeclared. ▶
  6. P2 Camera recipe omits Git. ▶
Fix with agent prompt
### Issue 1
pkgbuilds/intel-ipu7-drivers/90-ipu7-psys.rules:undefined-1
This gives every local user access to `ipu7-psys0`, including users outside the desktop session. The new package pins the same driver commit as `intel-ipu7-camera` but omits its `0005-ipu7-psys-harden-userptr-pinning.patch`. That leaves the unchecked page-array size and unsafe buffer cleanup reachable by unprivileged users. The existing package keeps this device root-only for that reason.

Keep the device root-only-the new camera service already runs as root-and carry the existing driver fixes.

**How this was verified:** The new rule grants world read/write access, and the pinned driver is packaged without the existing fixes for its unsafe user-buffer allocation and cleanup.

### Issue 2
pkgbuilds/intel-ipu7-drivers/dkms-vision-drivers.conf:3-7
`AUTOINSTALL="yes"` installs the old `intel_cvs` module into `/updates` on the current `linux-omarchy` kernel too. That copy takes precedence over the in-tree module of the same name. Linux 7.2 needs the in-tree CVS driver to expose the camera bridge; the legacy driver does not provide it.

Copy the pre-7.2 `BUILD_EXCLUSIVE_KERNEL` restriction already used by `intel-ipu7-camera`, rather than replacing the current kernel's CVS driver.

### Issue 3
pkgbuilds/linux-omarchy/PKGBUILD:140-147
These patches change the default kernel's contents, but its version remains `7.2.15-2`, exactly as on the base branch. Users who already have that version will not receive the patched kernel through `pacman -Syu`. The two alternative kernels increase `pkgrel`, but `linux-omarchy` does not.

Increase the default kernel's `pkgrel` as well so existing installations receive the hardware fixes.

### Issue 4
pkgbuilds/hp-elitebook-x-g2i-audio/hp-elitebook-x-g2i-audio-recover:43-45
**Translated sessions trigger audio restarts.** `card_profile()` searches translated `pactl` output for the English text `Active Profile`. In a non-English user session, it returns an empty value even when the card is already on `HiFi`. The recovery loop then restarts WirePlumber three times on every login, interrupting working audio.

Run this call with `LC_ALL=C`, or read `pactl`'s JSON output instead.

```suggestion
card_profile() {
  LC_ALL=C pactl list cards 2>/dev/null |
    grep -A40 "platform-sof_sdw" | grep "Active Profile" | awk '{print $3}'
```

### Issue 5
pkgbuilds/intel-ipu7-drivers/PKGBUILD:undefined-33
`intel-ipu7-drivers` and the existing `intel-ipu7-camera` both install `/usr/lib/udev/rules.d/71-ipu7-hide-isys.rules`. Installing the new driver package alongside the existing camera package therefore fails with a file conflict, but this declaration names only the AUR alternative.

Declare the conflict here, or finish the split by making the existing camera package depend on the shared drivers instead of shipping them itself. The conflict in `hp-elitebook-x-g2i-camera` does not protect direct installs of this package.

### Issue 6
pkgbuilds/hp-elitebook-x-g2i-camera/PKGBUILD:undefined-55
The recipe fetches `ipu6-drivers` through a Git source but does not declare `git` in `makedepends`. The repository's builder preinstalls Git, which hides the omission; a clean Arch build environment with only the declared dependencies cannot fetch the source.

Add `git` to `makedepends` so the package can be built outside that image too.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Adds HP EliteBook X G2i audio and camera support:

  • The HP EliteBook X G2i plays stereo through its four speakers and uses its microphone and headset jack.
  • The HP EliteBook X G2i sends webcam frames to apps through a virtual video device.
  • The Omarchy kernel packages include the EliteBook support patches.

The new audio recovery script misreads healthy cards in non-English sessions and repeatedly restarts WirePlumber.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  K[Omarchy kernel patches] --> A[Speaker configuration]
  A --> W[WirePlumber]
  R[Audio recovery] --> W
  D[IPU7 and sensor drivers] --> C[Camera daemon]
  H[Private CamHAL runtime] --> C
  S[Private libcamera fallback] --> C
  C --> V[v4l2loopback]
  V --> Apps[Camera applications]
Loading

Reviews (2) · Last reviewed commit: "linux-omarchy: add HP EliteBook X G2i pa..." · Reviewed by Greptile

@@ -0,0 +1 @@
KERNEL=="ipu7-psys0", MODE="0666", SYMLINK+="ipu-psys0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 security Unsafe camera device is world-writable. This gives every local user access to ipu7-psys0, including users outside the desktop session. The new package pins the same driver commit as intel-ipu7-camera but omits its 0005-ipu7-psys-harden-userptr-pinning.patch. That leaves the unchecked page-array size and unsafe buffer cleanup reachable by unprivileged users. The existing package keeps this device root-only for that reason.

Keep the device root-only—the new camera service already runs as root—and carry the existing driver fixes.

How this was verified: The new rule grants world read/write access, and the pinned driver is packaged without the existing fixes for its unsafe user-buffer allocation and cleanup.

Comment on lines +3 to +7
AUTOINSTALL="yes"

BUILT_MODULE_NAME[0]="intel_cvs"
BUILT_MODULE_LOCATION[0]=""
DEST_MODULE_LOCATION[0]="/updates"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Legacy CVS replaces current driver. AUTOINSTALL="yes" installs the old intel_cvs module into /updates on the current linux-omarchy kernel too. That copy takes precedence over the in-tree module of the same name. Linux 7.2 needs the in-tree CVS driver to expose the camera bridge; the legacy driver does not provide it.

Copy the pre-7.2 BUILD_EXCLUSIVE_KERNEL restriction already used by intel-ipu7-camera, rather than replacing the current kernel's CVS driver.

Comment on lines +140 to +147
0533-soundwire-stream-second-dai-ports.patch
0534-tas2783-system-resume-no-wait.patch
0535-tas2783-startup-reinit-after-sleep.patch
0536-sof-sdw-four-amp-two-pdis.patch
0537-tas2783-keep-firmware-image.patch
0538-tas2783-calibration-vendor-guids.patch
0539-tas2783-runtime-resume-late-peripheral.patch
0540-tas2783-firmware-described-whole-port.patch

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Default kernel never updates. These patches change the default kernel's contents, but its version remains 7.2.15-2, exactly as on the base branch. Users who already have that version will not receive the patched kernel through pacman -Syu. The two alternative kernels increase pkgrel, but linux-omarchy does not.

Increase the default kernel's pkgrel as well so existing installations receive the hardware fixes.

# left to bind them together.
#
# Declaring the conflict makes pacman refuse the combination instead.
conflicts=('intel-ipu7-dkms-git')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Driver package conflict is undeclared. intel-ipu7-drivers and the existing intel-ipu7-camera both install /usr/lib/udev/rules.d/71-ipu7-hide-isys.rules. Installing the new driver package alongside the existing camera package therefore fails with a file conflict, but this declaration names only the AUR alternative.

Declare the conflict here, or finish the split by making the existing camera package depend on the shared drivers instead of shipping them itself. The conflict in hp-elitebook-x-g2i-camera does not protect direct installs of this package.

arch=('x86_64')
url="https://github.com/omacom-io/omarchy-pkgs"
license=('GPL-2.0-or-later')
makedepends=('gcc' 'pkgconf')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Camera recipe omits Git. The recipe fetches ipu6-drivers through a Git source but does not declare git in makedepends. The repository's builder preinstalls Git, which hides the omission; a clean Arch build environment with only the declared dependencies cannot fetch the source.

Add git to makedepends so the package can be built outside that image too.

Comment on lines +43 to +45
card_profile() {
pactl list cards 2>/dev/null |
grep -A40 "platform-sof_sdw" | grep "Active Profile" | awk '{print $3}'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Translated sessions trigger audio restarts. card_profile() searches translated pactl output for the English text Active Profile. In a non-English user session, it returns an empty value even when the card is already on HiFi. The recovery loop then restarts WirePlumber three times on every login, interrupting working audio.

Run this call with LC_ALL=C, or read pactl's JSON output instead.

Suggested change
card_profile() {
pactl list cards 2>/dev/null |
grep -A40 "platform-sof_sdw" | grep "Active Profile" | awk '{print $3}'
card_profile() {
LC_ALL=C pactl list cards 2>/dev/null |
grep -A40 "platform-sof_sdw" | grep "Active Profile" | awk '{print $3}'
Prompt To Fix With AI
This is a comment left during a code review.
Path: pkgbuilds/hp-elitebook-x-g2i-audio/hp-elitebook-x-g2i-audio-recover
Line: 43-45

Comment:
**Translated sessions trigger audio restarts.** `card_profile()` searches translated `pactl` output for the English text `Active Profile`. In a non-English user session, it returns an empty value even when the card is already on `HiFi`. The recovery loop then restarts WirePlumber three times on every login, interrupting working audio.

Run this call with `LC_ALL=C`, or read `pactl`'s JSON output instead.

```suggestion
card_profile() {
  LC_ALL=C pactl list cards 2>/dev/null |
    grep -A40 "platform-sof_sdw" | grep "Active Profile" | awk '{print $3}'
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants