Skip to content

Instantly share code, notes, and snippets.

@ps
Last active December 24, 2015 07:49
Show Gist options
  • Save ps/6766407 to your computer and use it in GitHub Desktop.
Save ps/6766407 to your computer and use it in GitHub Desktop.
Ubuntu 12.10 Fixes
Fix 1
---------------------------------------------------
From time to time I'll get a clicking sound from my hard drive, I have identified it to be HDD head parking problem. The fix that has worked for me was the following:
Temporary solution: sudo hdparm -B 255 /dev/sda
sudo vim /etc/hdparm.conf
Unfortunately after sleep or reboot the heads parking property resets back to default. I don't want to run this command every time so I came upon a fix in ArchLinux which put a bash script in a folder that executes everything in it on awake/power on.
In Ubuntu 12.10 I placed my script in /etc/pm/power.d and /etc/pm/sleep.d
1. sudo vim hdparm_set
2. Put the following in the hdparm_set:
#!/bin/sh
hdparm -B 255 /dev/sda
3. Give execution permissions for all to the script with: sudo chmod +x hdparm_set
4. Make sure to do this in both power.d and sleep.d directories and should be good!
Fix 2
---------------------------------------------------
Every now and then I'll get sporadic crash reports from Ubuntu. They sometimes popped up after I caused a segmentation fault in one of my C programs. Those crash reports sometimes still linger and pop up from time to time. The fix to stop them from popping up that worked for me was to clear the crash reports that are stored in the system:
sudo rm /var/crash/*
Fix 3
---------------------------------------------------
Looks like I placed the command in the wrong place...
Now I added it in /etc/rc.local
Hopefully works now!
Fix 4
---------------------------------------------------
So I apparently have been doing this all wrong. In order
to permanently disable the feature sudo vim into
/etc/hdparm.conf and add the following line:
/dev/sda {
apm = 255
apm_battery = 255
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment