OpenELEC Forum
SSD TRIM doesn't appear to be enabled - Printable Version

+- OpenELEC Forum (https://forum.openelec.tv)
+-- Forum: Generic Forum (https://forum.openelec.tv/forumdisplay.php?fid=5)
+--- Forum: STORAGE (https://forum.openelec.tv/forumdisplay.php?fid=60)
+--- Thread: SSD TRIM doesn't appear to be enabled (/showthread.php?tid=8509)

Pages: 1 2 3 4


Re: SSD TRIM doesn't appear to be enabled - OlliLaukkanen - 11-01-2011

I use a Kingston SSD Now 16GB. Is it possible to turn on TRIM with Openelec 1.0.2?


Re: SSD TRIM doesn't appear to be enabled - amak79 - 11-01-2011

I don't know of any way to do it automatically in Dharma. With Eden, you can add the appropriate command in '/storage/.config/autostart.sh'.


Re: SSD TRIM doesn't appear to be enabled - chewitt - 11-02-2011

OE is an operating system package that includes XBMC Dharma/Eden code but the presence/choice of either XBMC version does not determine features in the underlying OS (which is what your statement implies) - they are maintained separately.

/storage/autostart.sh can be used in RC7 and higher releases of OE which include XBMC Dharma


Re: SSD TRIM doesn't appear to be enabled - amak79 - 11-02-2011

chewitt Wrote:OE is an operating system package that includes XBMC Dharma/Eden code but the presence/choice of either XBMC version does not determine features in the underlying OS (which is what your statement implies) - they are maintained separately.

Yes my post does erroneously imply that, even though I know that OpenELEC is separate from XBMC. I just wanted to point out that the development versions of OpenELEC, which are commonly referred to as Eden builds (incorrectly I suppose), do support autostart.sh.

chewitt Wrote:/storage/autostart.sh can be used in RC7 and higher releases of OE which include XBMC Dharma

Thanks I didn't know that.


Re: SSD TRIM doesn't appear to be enabled - OlliLaukkanen - 11-05-2011

chewitt post=15159 Wrote:(...)/storage/autostart.sh can be used in RC7 and higher releases of OE which include XBMC Dharma

Ok, and what do I need to write in that file? There are so many variants on the thread that I'm a bit confused.


Re: SSD TRIM doesn't appear to be enabled - amak79 - 11-05-2011

OlliLaukkanen Wrote:Ok, and what do I need to write in that file? There are so many variants on the thread that I'm a bit confused.

I have the following in '/storage/.config/autostart.sh'. It's an adapted version of the script posted here.

Code:
#! /bin/sh
(sleep 30;
mount -o remount,discard /storage
)&

I'm not sure if the 'sleep 30' is needed but that's what the original script had. I would also like to know when exactly the autostart.sh script is executed i.e. before or after XBMC is started.

To confirm that it's working, you need to run:

Code:
dmesg | grep discard

This should print the following:

Code:
EXT4-fs (sda2): re-mounted. Opts: barrier=1,data=ordered,discard



Re: SSD TRIM doesn't appear to be enabled - OlliLaukkanen - 11-08-2011

Thanks.
Are you sure about the "&" after ")"?

"dmesg | grep discard" gives me nothing back.
When I use "dmesg" only I searched for EXT4-fs and found:

EXT4-fs (sda1): re-mounted. Opts: barrier=1, data=ordered, commit=0
EXT4-fs (sda2): re-mounted. Opts: barrier=1, data=ordered, commit=0

Any suggestions?

(XBMC / OE is still usable.)


Re: SSD TRIM doesn't appear to be enabled - devkid - 11-08-2011

Works fine for me on XS35GTV2.

I think the & is needed to make the script non-blocking when waiting the 30 seconds.

Maybe try to call the command manually (without autostart) and see if the discard flag works?


Re: SSD TRIM doesn't appear to be enabled - OlliLaukkanen - 11-08-2011

Doing it manually worked. I use OE 1.0.2 which should support autostart.sh, correct? I put the file to "\OPENELECConfigfiles" which should be equal to "/storage/.config/".

"dmesg | grep EXT4" also revealed:
Code:
[ 1.950366] EXT4-fs (sda1): couldn't mount as ext3 due to feature incompatibilities
[ 1.973674] EXT4-fs (sda1): couldn't mount as ext2 due to feature incompatibilities
[ 1.998789] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[ 2.127178] EXT4-fs (sda2): couldn't mount as ext3 due to feature incompatibilities
[ 2.143733] EXT4-fs (sda2): couldn't mount as ext2 due to feature incompatibilities
[ 2.206716] EXT4-fs (sda2): warning: maximal mount count reached, running e2fsck is recommended
[ 2.209080] EXT4-fs (sda2): recovery complete
[ 2.209226] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[ 10.474768] EXT4-fs (sda1): re-mounted. Opts: barrier=1,data=ordered,commit=0
[ 10.526611] EXT4-fs (sda2): re-mounted. Opts: barrier=1,data=ordered,commit=0



Re: SSD TRIM doesn't appear to be enabled - amak79 - 11-08-2011

OlliLaukkanen,

Yes it works for 1.0.2 and '/storage/.config' is the correct directory.

Does it work if you run autostart.sh manually? Make sure you wait at least 30 seconds before checking the result via demsg.

Code:
sh /storage/.config/autostart.sh