Skip to content

profiles/fprintd add fix for sleep/suspend when using Goodix Technology readers#253

Open
Michalk2003-pl wants to merge 1 commit into
CachyOS:masterfrom
Michalk2003-pl:master
Open

profiles/fprintd add fix for sleep/suspend when using Goodix Technology readers#253
Michalk2003-pl wants to merge 1 commit into
CachyOS:masterfrom
Michalk2003-pl:master

Conversation

@Michalk2003-pl

Copy link
Copy Markdown

Hi i'm new to foss contribution so pls be kind to me. (:

This is fix for goodix readers they sometimes don't wake from sleep/suspend property. this adds systemd service to restart fprind service on wake up from suspend.

@ptr1337

ptr1337 commented May 30, 2026

Copy link
Copy Markdown
Member

Hi,

Thank you for sending this PR.

Would this not be smarter finding a fix for the kernel directly instead of workaround? Would you mind to provide logs?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a Goodix-specific workaround to the fprint chwd profile's post_install hook: when the installed fingerprint reader's vendor id matches 27c6 (Goodix Technology), a new systemd unit fprintd-Goodix-fix.service is generated and enabled to restart fprintd.service on resume from suspend/hibernate.

Changes:

  • Detect Goodix readers in post_install by grepping /var/lib/chwd/ids/fprint.ids for 27c6.
  • Write /etc/systemd/system/fprintd-Goodix-fix.service via a heredoc and enable it on suspend/hibernate/hybrid-sleep/suspend-then-hibernate targets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +28 to +39
tee /etc/systemd/system/fprintd-Goodix-fix.service > /dev/null <<EOF
[Unit]
Description=Restart fprint when using Goodix reader
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target

[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl restart fprintd.service

[Install]
WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
EOF
Comment on lines +27 to +41
if grep -qi '^27c6' /var/lib/chwd/ids/fprint.ids; then
tee /etc/systemd/system/fprintd-Goodix-fix.service > /dev/null <<EOF
[Unit]
Description=Restart fprint when using Goodix reader
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target

[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl restart fprintd.service

[Install]
WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
EOF
systemctl enable fprintd-Goodix-fix.service
fi
post_install = """
systemctl enable fprintd.service
if grep -qi '^27c6' /var/lib/chwd/ids/fprint.ids; then
tee /etc/systemd/system/fprintd-Goodix-fix.service > /dev/null <<EOF
if grep -qi '^27c6' /var/lib/chwd/ids/fprint.ids; then
tee /etc/systemd/system/fprintd-Goodix-fix.service > /dev/null <<EOF
[Unit]
Description=Restart fprint when using Goodix reader
packages = "fprintd"
post_install = """
systemctl enable fprintd.service
if grep -qi '^27c6' /var/lib/chwd/ids/fprint.ids; then

@vnepogodin vnepogodin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

requires rebase

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.

4 participants