8000 Fix goodix_ts DKMS auto-rebuild, thermald status check, doc gaps by pirsqr-rnd · Pull Request #19 · fstanis/chuwi-minibook · GitHub
[go: up one dir, main page]

Skip to content

Fix goodix_ts DKMS auto-rebuild, thermald status check, doc gaps - #19

Closed
pirsqr-rnd wants to merge 10 commits into
fstanis:mainfrom
pirsqr-rnd:main
Closed

pirsqr-rnd wants to merge 10 commits into
fstanis:mainfrom
pirsqr-rnd:main

Conversation

@pirsqr-rnd
Copy link
Copy Markdown
Contributor

Summary

Three independent fixes/additions found while running this on a CHUWI MiniBook X after a kernel update broke touchscreen resume behavior:

  • fix(goodix_ts): DKMS_VERSION used a hyphen ($(KVER)-minibook1), which pacman's dkms hook mis-parses when deriving module name/version from the /usr/src/<name>-<version> directory name (it splits on the last hyphen). This made the automatic rebuild-on-kernel-update silently fail every time (Error! Bad return status for module build), confirmed in /var/log/pacman.log across two separate kernel bumps. Switching to a dot fixes the parse without any functional change to the module itself.
  • fix(check-status): the thermald service check called bare thermald --version, which fails whenever /usr/local/sbin (or /usr/sbin for the install-arch path) isn't on the invoking user's PATH — reporting a correctly installed, correctly patched thermald as NOT FOUND (WRONG). Added a small fallback that checks the known install locations.
  • docs: documented that iio-sensor-proxy requires i2c-dev (silently exits with "No sensors or missing kernel drivers" otherwise) and acpi_call (needed for EC-level tablet-mode keyboard toggle), plus how to wire up an on-screen keyboard for tablet mode on Niri (no popup-on-focus mechanism like GNOME/KDE).

Test plan

  • goodix_ts: reproduced the pacman-hook failure on two real kernel updates (7.2.2, 7.2.3), confirmed the fix installs cleanly and the hook's own directory-name regex now parses correctly (verified against /usr/share/libalpm/scripts/dkms's all_nv_from_kver)
  • check-status.sh: confirmed thermald now reports correctly (2.5.11.minibook1, enabled, running) instead of (WRONG)
  • Docs changes are additive only, no code affected

… OSK setup

iio-sensor-proxy silently exits with "No sensors or missing kernel
drivers" if i2c-dev isn't loaded (find_accels() can't open /dev/i2c-*
without it) -- not obvious from the service's own error message.
acpi_call is separately required for the EC-level keyboard/touchpad
toggle in tablet mode; without it, screen rotation still works but
SW_TABLET_MODE-based toggling at the EC level is skipped.

Also documents wiring up an on-screen keyboard (wvkbd-deskintl) for
tablet mode on Niri, since there's no popup-on-focus mechanism like
GNOME/KDE have, plus how to reach Polish diacritics via the Compose key.
DKMS_VERSION was "$(KVER)-minibook1" (e.g. "7.2.3-minibook1"), making
the /usr/src/goodix_ts-7.2.3-minibook1 source directory contain two
hyphens. Pacman's dkms hook (/usr/share/libalpm/scripts/dkms) derives
module name/version by regex-splitting "name-version" directory names
on the last hyphen, so it parsed this as name="goodix_ts-7.2.3",
version="minibook1" instead of the correct name="goodix_ts",
version="7.2.3-minibook1" -- then called dkms install with that wrong
identifier, which always failed ("Bad return status for module
build"). Confirmed reproducing on two separate kernel updates (7.2.2
and 7.2.3) in /var/log/pacman.log.

Every other module here uses a static, hyphen-free PACKAGE_VERSION
(1.0, 1.2.2, ...) so only goodix_ts hit this. Switching to
"$(KVER).minibook1" leaves exactly one hyphen in the directory name,
in the right place, so the pacman hook's automatic rebuild-on-kernel-
update should now work without manual intervention.
The services check called bare "thermald --version", which fails
whenever /usr/local/sbin (or /usr/sbin, for the install-arch path)
isn't on the invoking user's PATH -- reporting a healthy, correctly
patched thermald install as "NOT FOUND (WRONG)". Added find_thermald()
to fall back to the known install locations before giving up.
@fstanis
fstanis commented Sep 12, 2026
Copy link
Copy Markdown
Owner

Thank you for the PR!

Regarding the new "Login screen" section:

None of the methods above reach the login screen

Are you sure? I'm finding it hard to believe neither the bootloader nor the VBT patch would reach the login screen.

…ironment warning

Fixed via a pacman hook that patches niri-session in place on every
package update, per the fix shared in niri-wm/niri#254 (maintainer
endorsed local patching over changing the default).

Also note a separate, intermittent Niri panic on session quit
(libseat backend race during teardown) - unrelated to the flash,
functionally harmless so far.
The merge of origin/main silently dropped the header for the
desktop-rotation/on-screen-keyboard content (left it orphaned under
'## Optional: higher refresh rate') and duplicated the vbt_patch
build step. Restructured:

- desktop rotation + on-screen keyboard back under their own
  '## Optional: screen auto-rotation on other desktops' header
- refresh rate content under its own '## Optional: higher refresh
  rate' header, keeping both the numbered explanation and upstream's
  added suspend/resume caution note
- removed the orphaned 'On Fedora, sudo dnf remove iio-sensor-proxy'
  fragment left over from the old numbered install steps
- fixed two internal anchor links (fstanis#7-iio-sensor-proxy,
  fstanis#8-vbt-patcher-display-refresh-rate) that pointed at section
  headers removed by the merge
check-status.sh silently skips the VBT line without intel_vbt_decode;
document which package provides it.
The i2c-dev/acpi_call requirements paragraph (from c06ef5d) got
stranded between 'Reboot, then run:' and the check-status.sh command
during the origin/main merge, and its content was already fully
duplicated (in more detail) in docs/iio-sensor-proxy.md's Runtime
requirements section.

- Removed the stranded paragraph; check-status.sh now follows
  directly after 'Reboot, then run:'
- Added a troubleshooting note in its place that reflects current
  reality: bootstrap-arch.sh loads acpi_call automatically now, but
  not i2c-dev, so that's the one still worth calling out
- Fixed docs/iio-sensor-proxy.md's cross-link, which pointed at the
  removed 'fstanis#7-iio-sensor-proxy' anchor
install_modules() called 'make -C modules/$m install' directly,
bypassing the Arch PKGBUILDs added in modules/*/packaging/arch/ -
unlike install_sensor_proxy(), which already builds and installs
iio-sensor-proxy through makepkg + pacman -U.

Consequence: re-running this script (which GUIDE.md documents as
safe to do any time, e.g. after a kernel upgrade) would silently
overwrite pacman-managed module installs with unpackaged files
under /usr/src, desyncing the pacman database.

Rewrote install_modules() to mirror install_sensor_proxy()'s
makepkg + pacman -U pattern for all four modules. Added
clean_unpackaged_dkms_source()/clean_unpackaged_file() so a prior
'make install' (raw DKMS, not a package) is migrated in place on
first run instead of conflicting with pacman -U - verified this is
a no-op once a module is already pacman-owned, and that the actual
migration path works end-to-end (manually walked all four modules
through dkms remove + rm -rf /usr/src/... + makepkg -si on this
machine, including the goodix_9110_cfg.bin firmware file conflict
this same helper now handles automatically).

Syntax-checked with bash -n; not run end-to-end as root since the
manual walkthrough already exercised the equivalent commands.
…creen

fstanis questioned this on PR fstanis#19 (comment on 2026-09-12), correctly --
the kernel cmdline and VBT patch both set the DRM panel-orientation
property, which any DRM client honors regardless of what greeter/session
is running, contradicting the 'none of the methods above' claim two
sections up on the very same page.

Confirmed live on this machine: commented out the manual 'transforms'
line in noctalia-greeter's greeter.toml and logged out. The login screen
stayed correctly rotated with no config at all.

What actually does not reach the login screen is the iio-sensor-proxy
*dynamic* rotation - it is a userspace daemon that only starts inside
the desktop session, after greetd already rendered its first frame.
Clarified that distinction instead of just deleting the wrong claim,
since the manual greeter.toml rotation config below is still the right
answer for anyone relying on the proxy alone with no static rotation.
@pirsqr-rnd
Copy link
Copy Markdown
Contributor Author

You were right to push back on that — sorry, that line was wrong.

I tested it live just now: commented out the manual transforms line in noctalia-greeter's greeter.toml and logged out. The login screen stayed correctly rotated with no rotation config there at all.

The kernel cmdline and VBT patch both set the DRM panel orientation property, which any DRM client honors regardless of what greeter/compositor is running — that's actually already stated correctly two sections up in the same doc ("Kernel command line"), I just failed to notice the contradiction when I added the login-screen section.

What doesn't reach the login screen is the iio-sensor-proxy dynamic rotation — that's a userspace daemon that only starts inside the desktop session, after greetd already rendered its first frame. That's the actual reason the manual greeter.toml rotation config is there: it's for anyone relying on the proxy alone, with no static rotation applied. I've pushed a fix that clarifies the distinction instead of the blanket wrong claim.

@pirsqr-rnd
Copy link
Copy Markdown
Contributor Author

Closing this one — the branch behind it (my fork's main) has since diverged a lot (merged your recent upstream changes plus a bunch of unrelated doc work), so the diff here has gotten pretty messy and isn't representative of just these three fixes anymore.

I'll re-open the individual fixes here as focused PRs against current main instead, same pattern as #26 (which already covers the bootstrap-arch.sh packaging fix). Sorry for the noise.

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.

2 participants

0