profiles/fprintd add fix for sleep/suspend when using Goodix Technology readers#253
Open
Michalk2003-pl wants to merge 1 commit into
Open
profiles/fprintd add fix for sleep/suspend when using Goodix Technology readers#253Michalk2003-pl wants to merge 1 commit into
Michalk2003-pl wants to merge 1 commit into
Conversation
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? |
Contributor
There was a problem hiding this comment.
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_installby grepping/var/lib/chwd/ids/fprint.idsfor27c6. - Write
/etc/systemd/system/fprintd-Goodix-fix.servicevia a heredoc and enable it onsuspend/hibernate/hybrid-sleep/suspend-then-hibernatetargets.
💡 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.