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

Low-Mem devices: zram-swap does not work anymore #1031

Open
Noki opened this issue Oct 25, 2024 · 2 comments
Open

Low-Mem devices: zram-swap does not work anymore #1031

Noki opened this issue Oct 25, 2024 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Noki
Copy link
Member

Noki commented Oct 25, 2024

Low memory devices should load zram-swap:

- name: "Add zram-swap on low mem and big flash"
set_fact:
packages: "{{ packages + ['zram-swap'] }}"
when:
- low_mem | default(false)
- not (low_flash | default(false))

This however results in the following error:

Thu Oct 24 00:51:16 2024 daemon.crit zram_start: kernel doesn't support swap
Thu Oct 24 00:51:16 2024 daemon.notice procd: /etc/rc.d/S15zram: zram_start: kernel doesn't support swap

We should either stop loading zram-swap or make the kernel support it.

@Noki Noki added bug Something isn't working help wanted Extra attention is needed labels Oct 25, 2024
@spolack
Copy link
Member

spolack commented Oct 30, 2024

Seems swap is not compiled in on OpenWRTs SMALL_FLASH devices.
https://github.com/openwrt/openwrt/blob/main/config/Config-kernel.in#L27-L29

Our issue seems also related to openwrt/openwrt#15951

@spolack
Copy link
Member

spolack commented Oct 30, 2024

I'd propose to either not install zram-swap on small_flash devices, which boils down to the ath79-tiny targets, another alternative would be to get a fix upstream. IMO saving ram is more important than saving a few bytes in the flash.

./model_ubnt_bullet_m2_ar7241.yml:target: ath79/tiny
./model_ubnt_bullet_m5_ar7241.yml:target: ath79/tiny
./model_ubnt_nanostation_loco_m2_xm.yml:target: ath79/tiny
./model_ubnt_nanostation_loco_m5_xm.yml:target: ath79/tiny
./model_ubnt_nanostation_loco_m5_xw.yml:target: ath79/tiny
./model_ubnt_nanostation_m2_xm.yml:target: ath79/tiny
./model_ubnt_nanostation_m5_xm.yml:target: ath79/tiny

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants