Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust compile threads for low memory boards when installing Respeaker driver #171

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

tannisroot
Copy link
Contributor

When running the latest, non-legacy Raspberry PI OS Lite version, it seems that some people with Pi Zero 2W boards are unable to install the respeaker driver due to running out of memory, see #170 (comment)
Someone adjusted swap size to workaround this, and it compiled successfully.
In my less intrusive workaround, I've changed the script to compile the dkms module with half the threads if the board has less than 512MBs of main memory. This should lower the memory requirements and avoid OOM issues.

@tannisroot tannisroot changed the title Adjust compile threads for low memory boards Adjust compile threads for low memory boards when installing Respeaker driver Jun 8, 2024
@tannisroot
Copy link
Contributor Author

A user has reported that this did fix the driver installation issues under bookworm and pi zero w2
#170 (comment)

@tannisroot
Copy link
Contributor Author

After this PR is merged, #167 can be merged too.

@tannisroot
Copy link
Contributor Author

Force push didn't change anything but simplify how threads are set, instead of dividing by 2 it just hard sets threads to 2 if there is 512 mb or less memory and more than 2 cores (which is the case for Pi Zero 2W). In my testing it was enough to avoid OOM issue.

@tannisroot
Copy link
Contributor Author

@synesthesiam could you review and merge this? This is needed to workaround OOM issues when installing the driver on bookworm. Thanks!

etc/install-respeaker-drivers.sh Outdated Show resolved Hide resolved
@synesthesiam
Copy link
Contributor

Minor change, and we'll be good. Thanks!

Co-authored-by: Michael Hansen <hansen.mike@gmail.com>
@tannisroot
Copy link
Contributor Author

Minor change, and we'll be good. Thanks!

Commited the change, can be merged now! (not sure why it's not auto-merging).

@synesthesiam synesthesiam merged commit f6c0d29 into rhasspy:master Jul 1, 2024
1 check passed
@synesthesiam
Copy link
Contributor

Thanks!

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.

None yet

2 participants