From 65c24e595f119e60f761d06ba702a9339493eb3a Mon Sep 17 00:00:00 2001 From: Brosseau Valentin Date: Sun, 17 Aug 2025 10:26:47 +0200 Subject: [PATCH 1/3] Add script to enable TRIM if needed --- install/config/ssd-trim.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 install/config/ssd-trim.sh diff --git a/install/config/ssd-trim.sh b/install/config/ssd-trim.sh new file mode 100644 index 0000000000..1213ab3c42 --- /dev/null +++ b/install/config/ssd-trim.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if grep -q 0 /sys/block/*/queue/rotational; then + echo "Non-rotational device detected → enabling fstrim.timer" + sudo systemctl enable --now fstrim.timer +else + echo "No non-rotational device detected → skipping fstrim.timer activation" +fi From 0734ef3633d614c721451747ab4bb2a20fa421e6 Mon Sep 17 00:00:00 2001 From: Brosseau Valentin Date: Sun, 17 Aug 2025 10:41:31 +0200 Subject: [PATCH 2/3] Add SSD Trim detection script --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index f101c34ccb..e3814f83fa 100755 --- a/install.sh +++ b/install.sh @@ -45,6 +45,7 @@ source $OMARCHY_INSTALL/config/power.sh source $OMARCHY_INSTALL/config/timezones.sh source $OMARCHY_INSTALL/config/login.sh source $OMARCHY_INSTALL/config/nvidia.sh +source $OMARCHY_INSTALL/config/ssd-trim.sh # Development show_logo decrypt 920 From 0020a8d806bf1afc606139016645131bfccad0a2 Mon Sep 17 00:00:00 2001 From: Brosseau Valentin Date: Sun, 17 Aug 2025 10:44:26 +0200 Subject: [PATCH 3/3] Add migration to enable TRIM --- migrations/1755420126.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 migrations/1755420126.sh diff --git a/migrations/1755420126.sh b/migrations/1755420126.sh new file mode 100644 index 0000000000..46db2cabc6 --- /dev/null +++ b/migrations/1755420126.sh @@ -0,0 +1,3 @@ +echo "Check and enable TRIM if needed" + +source ~/.local/share/omarchy/install/config/ssd-trim.sh