Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Wednesday, May 11, 2011

Make your system run cooler this summer

My system is nearly 11 years old - quite a feat! And yet, with limited resources, it becomes a necessity to use whatever is at your disposal efficiently and with regard to the future. In short, we, the poor, have to take care of our hardware.

Linux has superior capabilities when it comes to fine-grained control over your hardware. Features such as Machine Check Exceptions make sure you don't fry your CPU. But you can do a lot more to keep your system running cooler and healthier:

  • Check to see if the CPU and system fans are installed properly and are running at optimal speed. The vents for airflow should not be blocked. Above all else do not cover the CPU or the monitor! I've seen systems catch on fire because the owner thought to cover them with plastic bags.
  • Use processor clock modulation when you're not doing CPU intensive stuff. For example, I tend to leave my system on through the night when I'm downloading a new Fedora release. So what I do is, I use the powersave governor to reduce the CPU speed to a minimum, and turn off the monitor. I have a Pentium 4 based CPU, so my frequency scaling driver is p4-clockmod. Here are the commands I use:
  1. modprobe p4-clockmod
  2. modprobe cpufreq-powersave
  3. echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

  • When you want to do something CPU intensive, switch to the "performance" governor:
  1. echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

  • You can use the "ondemand" governor too, which scales the processor frequency as and when required:
  1. echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Saturday, April 23, 2011

How to make the Creative SoundBlaster 5.1vx sound card work on Linux

If you have ever tried this card on Linux, you must have encountered the "white noise" problem, which is that you can only hear white noise if you try to play any sound. You must have spent endless hours like me trying to make it work, but probably you couldn't. That's why you're still searching. Well, search no more.

You'll want to kiss me after you read this - it's really that simple.

First of all, get the latest kernel version from kernel.org. I'm using 2.6.38.4, and the performance boost is awesome! It's my favorite version yet!

Now, this is important - alongside the ALSA modules, build the old OSS system as a module, and specifically build the old "100% sound blaster compatible" driver as a module too. Build the kernel and reboot, and viola! It works!

Logic: I __think__ the old "sb" oss driver installs some sort of firmware or something that the card needs. But it works fine with the native snd-ca0106 alsa module - the oss module just sits there. But this system makes it work flawlessly.

I'm gonna report it back to the alsa developers so that they can perhaps have a better look at it.

Enjoy!

Sunday, April 10, 2011

Convert YouTube Videos with Maximum Quality Retention

The easiest way to download videos from YouTube is perhaps by using the VideoDownloaderHelper extension. It can not only download videos from YouTube, but from almost any website that features embedded video.

You need ffmpeg to convert videos.

1. Videos to Mp3:
ffmpeg -i video.flv -vn -acodec copy file.mp3


Note that some videos feature the newer aac codec, so the above won't work. Use
ffmpeg -i video.flv -acodec mp3lame -ab 128k file.mp3

2. Video to iPhone:
ffmpeg -i vcodec copy -acodec copy file.mp4


3. Video to Mobile:
ffmpeg -i video.flv -vcodec h263 -acodec copy -b 200k -s qcif file.3gp


There are what I use, and might not work for an older phone.