Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
will defragging an ssd destroy it and if so, is there a way to prevent that with a linux OS? I am running Mint 18.3 Cinnamon 64bit. I was told a while back that Linux systems auto-defrag either on start-up or shut-down. I was also told I should try to disable the auto-defrag or at least see if my system recognises the ssd and prevents auto-defrag. I am a bit over my head here...
will defragging an ssd destroy it and if so, is there a way to prevent that with a linux OS? I am running Mint 18.3 Cinnamon 64bit. I was told a while back that Linux systems auto-defrag either on start-up or shut-down. I was also told I should try to disable the auto-defrag or at least see if my system recognises the ssd and prevents auto-defrag. I am a bit over my head here...
Defrag and trim are file system driver features, not a linux core feature. Drivers for file systems that properly detect and adjust to SSD devices will not defrag, as there is no advantage to defrag a ssd device. There is some advantage to trim, but that is a different subject.
Defrag is not the only issue, any operation that does lots of unnecessary writes will age an SSD device. The very latest SSD devices are very good, and should last longer than a rotational device despite a few defrag operation. Best practice is still to avoid those extra writes.
Before deciding on your storage plan it is best to research the SSD detection, automatic adjustments, and setting options for the available file systems and how they will affect your hardware and software behavior. ZFS, BTRFS, and newer XFS drivers are of interest. EXT4 does NOT auto adjust, but is actively being improved to make proper management of SSD devices better easier.
If it's a Linux file system such as ext4, defragging should not be necessary, as most Linux file systems in current use manage fragmentation dynamically (that is, not on startup or shutdown, but in regular usage). A web search leads me to believe that most of the concern about defragging SSD drives relates to systems using Windows file systems.
I never encountered a "defragmentation setting" on a Linux distro. Methinks your acquaintance was in error.
Thanks guys, I am afraid I have gotten behind on keeping up with the latest tech issues as such. To explain briefly what happened: I have been experiencing lately an anomaly in my computer where occasionally when I try to boot up, the unit does power up but the screen stays blank...nothing. I was sure it wasn't a power supply issue but after asking a few (supposed) techies as to the cause, they all said it appeared to be a failing HDD which in this case was a 1TB physical which was only about 3 years old and by the way I had only used about 21%. It was suggested I install an SSD and was told the old issues of "losing usable space" on an SSD due to deleting or un-installing software or files was no longer a problem. Later on another source stated defragging an SSD could be destructive and that he had never seen a hard drive cause the boot-up issue I had (or have which as yet has not reoccurred) He stated it may be more likely to be a CPU or motherboard problem, difficult to tell for sure since the problem is or was very inconsistent. So far my computer (ASUS K 20) is running well, a bit faster on start-up, but as yet no sign of start-up issues. If anyone has any further comments regarding this I would welcome them. Thanks again, Tukatz
You never defragment a file system that resides on an SSD, regardless of type. Period.
Defragmentation is something one does to improve performance. Fragmentation, meaning different parts of a file is spread across non-contiguous sectors on a drive, affects performance if, and only if, accessing contiguous sectors is faster than seeking to and accessing non-contiguous sectors. This is indeed true for mechanical drives that have to move physical read/write heads. It is however not true for SSDs, since each sector in an SSD is just a piece of memory with an address, like any other, in NVRAM.
Then there's the wear issue: A mechanical hard drive works until its mechanical or electronic components wear out. An SSD, on the other hand, has only electronic components. The SSD lacks the physical, rotating platters, meaning no seek time and no platter/head that can wear out, but instead it has non-volatile memory chips (flash memory), which are not present at all in mechanical drives. This introduces an entirely new wear issue.
NVRAM chips only last for a limited number of erase/write cycles. Hence, the less re-writing of data, the better. Unfortunately, the defragmentation process consists of nothing but the moving around and re-writing of data.
Conclusion: Defragmentation will not affect the performance of a file system stored on an SSD device, and is likely to severely reduce the lifetime of the device.
I have been experiencing lately an anomaly in my computer where occasionally when I try to boot up, the unit does power up but the screen stays blank...nothing. I was sure it wasn't a power supply issue ... difficult to tell for sure since the problem is or was very inconsistent. So far my computer (ASUS K 20) is running well, a bit faster on start-up, but as yet no sign of start-up issues.
I think we should stick to what is actually happening, not to what "could" be the reason for your problems.
Intermittent problems are the hardest to diagnose.
At what point does the screen go blank? Before the OS loads, or after? In other words, how long does it take, and can you see anything before the blank screen?
Hi Ondoho, the blank screen issue is right from boot-up. No Bios screen or anything, the computer is powered up but nothing happens. So far, with the new SSD it hasn't happened but of course I have no way of knowing if the problem will occur and it was very random. Re-booting always worked but obviously there is or was a problem, the question is what caused it?
No Bios screen or anything, the computer is powered up but nothing happens.
A PSU that's about to go bad could indeed cause symptoms like these. It could also be faulty capacitors on the motherboard, typically related to the CPU voltage regulator circuitry. I've never seen a hard drive cause anything like this, though.
When this happened, did the computer fans run? Did the power light come on and stay on? Do you remember if the keyboard lights flashed briefly?
Should this happen again, you might want to make notes regarding the following:
Does the system emit any sounds/beeps?
If you just leave the computer in this condition for a few minutes, are there any signs that something might be happening even though there's no picture on the screen? Such as the drive activity light flashing?
If your system has a reset button, will pressing it briefly when the system is "frozen" make it start booting normally?
Can you get the computer to boot by turning it off and then on again using the power button (which you might have to press and hold for up to 10 seconds), or do you have to pull the plug?
Does this only happen when you physically turn the computer on, or might the system also hang upon reboot?
Knowing the answers to the above would be really useful in narrowing down the underlying cause.
FWIW, a while back my main system exhibited the exact behaviour you''re describing. I noticed that it would boot normally if I disconnected my USB hubs, but a few months later it wouldn't boot no matter what I did. The cause turned out to be a leaky capacitor inside the PSU, one related to the 5V standby power circuit.
A PSU that's about to go bad could indeed cause symptoms like these. It could also be faulty capacitors on the motherboard, typically related to the CPU voltage regulator circuitry. I've never seen a hard drive cause anything like this, though.
.
I am not saying this is the case, but I have seen industrial hard drives that pull quite a significant startup current make a power related problem much worse on startup. It is possible that the rotational drive he replaced was PART of the problem and that whatever failing or underperforming part CAUSES the problem will behave differently under the more stable load represented by the SSD.
Ser Olmy: No bells, whistles, flashing lights etc. And there is no reset button on my computer. Just a totally black screen, no cursor, nothing, but I can tell the computer is powered up since I can hear the CPU fan. Nothing at all unusual other than a blank screen. Re-booting by using the power button always fixed the problem giving a normal boot-up. So far since installing the SSD the problem has not reoccurred, but it was so random that i don't know if it will happen again.
I also once experienced a faulty PSU on a previous computer, in that case it would just quit, at first it could be minutes or longer, but as time went on it finally got to where it would quit almost as soon as the desktop appeared.
I've had my current computer for about 3 years, it's a slim tower, and for the 1st 2 years it gave me no problem and otherwise still performs fine.
Ser Olmy: No bells, whistles, flashing lights etc. And there is no reset button on my computer. Just a totally black screen, no cursor, nothing, but I can tell the computer is powered up since I can hear the CPU fan. Nothing at all unusual other than a blank screen. Re-booting by using the power button always fixed the problem giving a normal boot-up. So far since installing the SSD the problem has not reoccurred, but it was so random that i don't know if it will happen again.
I also once experienced a faulty PSU on a previous computer, in that case it would just quit, at first it could be minutes or longer, but as time went on it finally got to where it would quit almost as soon as the desktop appeared.
I've had my current computer for about 3 years, it's a slim tower, and for the 1st 2 years it gave me no problem and otherwise still performs fine.
What about RAM, could it cause this?
While a failing part (including RAM) COULD cause this, it is more likely to be a thermal related issue. When you swapped in the SSD drive did you clean?
the blank screen issue is right from boot-up. No Bios screen or anything, the computer is powered up but nothing happens.
This could have a dozen different reasons, but since it happens before the OS loads it has nothing to do with the OS!
One good troubleshooting step is to boot from a known good live medium - if that boots OK, it could be the hard drive.
Or start disconnecting things from your mobo until it boots up again.
Or look for loose screws or loose connections.
Or.... or ....
I'd pull the power plug when I turn it off and see if a full cold power up solves the issue. (worth a try)
If you are planning to power up in the next few minutes then be sure to press the power button a few times while plug is out.
However if this system is old and you put a ssd in that would have never been shipped then we might expect that the ssd has some compatibility issue. Would be nice if you has a bios option to see start up or verbose display.
I think what they told you is some filesystems do a filesystem check. As noted a defrag on ssd is useless. Won't hurt but does nothing. Bits will just be in new places and access speed will be the same.
I'd pull the power plug when I turn it off and see if a full cold power up solves the issue. (worth a try)
If you are planning to power up in the next few minutes then be sure to press the power button a few times while plug is out.
However if this system is old and you put a ssd in that would have never been shipped then we might expect that the ssd has some compatibility issue. Would be nice if you has a bios option to see start up or verbose display.
I think what they told you is some filesystems do a filesystem check. As noted a defrag on ssd is useless. Won't hurt but does nothing. Bits will just be in new places and access speed will be the same.
From what he says, putting the SSD in made the problem either go away, or become lass common. Etiher way, I do not think we can blame the SSD: the problem started before the SSD was installed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.