Skip to content

Conversation

@h8d13
Copy link
Contributor

@h8d13 h8d13 commented Dec 28, 2025

Continuation to PR #4027

Would allow to set the algo of zram directly. Available ones can be checked using

cat /sys/block/zram0/comp_algorithm

We could however extend this to support re-compression as seen on the wiki

/etc/systemd/zram-generator.conf

[zram0]
compression-algorithm = lzo-rle zstd(level=3) (type=idle)

But for now already giving an option looks better.

untitled.mp4

This also fixes a quirk where the default highlighted value was "no" causing an extra interaction for sane default.

@h8d13 h8d13 requested a review from Torxed as a code owner December 28, 2025 10:02
packages: list[str] = field(default_factory=list)
parallel_downloads: int = 0
swap: bool = True
swap: bool | dict[str, Any] = True
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we could swap Any here if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dict[str, str] ?

Copy link
Member

Choose a reason for hiding this comment

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

Yepp that looks correct (I say just looking at the code, haven't tested it)

Copy link
Contributor Author

@h8d13 h8d13 Dec 28, 2025

Choose a reason for hiding this comment

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

Will also test later tonight 👍

I like this (would) make the option in menu more useful than yes/no :D

@h8d13
Copy link
Contributor Author

h8d13 commented Dec 29, 2025

Sorry about the messy commits, learning about the full structure still.

Really do appreciate all the feedback from both of you. I will do more testing today. If you have the chance to look at the LVM branch I'd be really grateful too.

@Torxed
Copy link
Member

Torxed commented Dec 29, 2025

Sorry about the messy commits, learning about the full structure still.

No worries, we squish commits to one right before merging - so it'll look like one commit in the end :)

packages=['firefox'],
parallel_downloads=66,
swap=False,
swap=ZramConfiguration(enabled=False),
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should probably be test the true case with a proper algorithm

@svartkanin svartkanin merged commit 2954e43 into archlinux:master Dec 30, 2025
9 checks passed
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.

3 participants