2 issues in /usr/libexec/elogind/system-sleep/nvidia.sh
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- shell
- Domain
- operating-systems
Research direction
Start by reading /usr/libexec/elogind/system-sleep/nvidia.sh and compare its sleep hook with the ZZZ hook mentioned in the issue. Confirm how the pre-action argument is passed and whether the five-second wait is needed; done means the hook handles the requested sleep mode and no longer adds the unnecessary delay.
Written by the indexing model from the issue text.
Description
The nvidia package supplies some shell scripts to help with putting the device into sleep mode.
case "$1" in
pre)
logger -t nvidia-sleep "Entering $2 mode (invoked by $SYSTEMD_SLEEP_ACTION)"
/usr/bin/nvidia-sleep.sh "hibernate"
ret=$?
if [ $ret -ne 0 ]; then
logger -t nvidia-sleep "Failed to enter $2 mode (exit code $ret)"
exit $ret
fi
sleep 5
logger -t nvidia-sleep "Entered $2 mode (invoked by $SYSTEMD_SLEEP_ACTION)"
;;
First, the script ignores the argument completely and always passes hibernate, when it could accept suspend via "$2" as well. I'm not sure if it causes issues, but it looks wrong.
Second thing, the unnecessary sleep for 5 seconds slowing the whole thing down for no reason whatsoever. I just removed that line and nothing broke. ZZZ hook doesn't have the wait time, so I don't think it's doing anything, plus it returns if we succeeded anyway.
- Dominant language
- Shell
- Stars
- 3.4k
- Forks
- 2.8k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 302
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from void-linux/void-packages
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
void-linux/void-packages#62620 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
void-linux/void-packages#62603 ·
-
bug needs-testing
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
void-linux/void-packages#62598 ·
-
bug needs-testing
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
void-linux/void-packages#62562 ·
-
bug needs-testing
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
void-linux/void-packages#62552 ·
All issues in void-linux/void-packages
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
community-scripts/ProxmoxVE#17425 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·
-
agent-research-recommend agent-review-finding
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
jordansmall/spindrift#3714 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
conda-forge/python-feedstock#934 ·