Archive for June, 2006

Installing LAMP on Ubuntu

I found the following article that was helpful in installing LAMP. The only thing I change is that  PHP is now up to version 5. 

Using Synaptics, I was able to install the whole LAMP suite in less than 10 minutes. 

I tested the apache server and PHP by writing a helloworld php script and placing it in /var/www.

June 20, 2006 at 12:59 am 1 comment

Switching on PowerNow in Linux

Ubuntu 6.06 managed to work right away on the Presario 906us. When I run dmesg, I get the following:

[17179574.836000] ACPI: CPU0 (power states: C1[C1] C2[C2])
[17179613.464000] powernow: PowerNOW! Technology present. Can scale: frequency and voltage.
[17179613.492000] powernow: SGTC: 13333
[17179613.492000] powernow: Minimum speed 530 MHz. Maximum speed 1325 MHz.

To check which setting the cpu freq governor is set to, you can do a:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor  

The default is usually userspace. The settings for powernow are:

  • powersave – minmal cpu speed
  • conservative – change cpu speed according to load, but err on the conservative side to save power. Good for laptop.
  • ondemand – change cpu speed according to load, but err on the performance side. Good for desktop.
  • performance – highest cpu speed possible.
  • userspace – controlled by the user.

 I decided to use conservative setting. I added the following to the /etc/rc.local file:

# Set CPU Scaling to use power conservatively since this is a laptop
echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

The line will set the cpu freq to convervative on startup. 

June 18, 2006 at 9:49 pm Leave a comment

Memory Leak when disposing of .Net child Winform with mainmenu

I had an application recently that has a child window with a mainmenu. I begin noticing that memory weren't being released even when I dispose of the child form. I decided to do an experiment by creating a simple app that creates 10 child window and closes then each time a button is press. The form are disposed of immediately after they are closed. I then examine the run under the CLRProfiler.

What seems to be happening is that the event handler for the form prevent the child form from being garbage collected. However, this is technically not a leak, since after about 250 form objects are on the heap, some of the child forms are cleaned up. It's just that the CLR seems to be holding on to the child form longer than normal due to the menuitem event handler.

I tried this under VS.Net 2005 and notice that the problem does not occur, so it only affects VS.Net 2003. It's also possible that Microsoft may have a patch for this problem for VS.Net 2003, but I did not see it mentioned when I search MSDN.

June 18, 2006 at 5:23 pm Leave a comment

Switching off the tap in Synaptic Touchpad in Linux

The touchpad on my Presario 906us Laptop is supposed to simulate a mouse click if you tap on the touch pad. While many find this feature to be useful, I find it extremely annoying because I often trigger it by accident. There's been many situations where I select a block of text only to have it deleted by accident.

To remove the tap, all you need to do is to edit /etc/X11/xorg.conf. In the section for the input device driver "synaptics" (I am assuming that you installed the driver), add the following lines:

Option "MaxTapTime" "0"

June 18, 2006 at 5:01 pm 1 comment

Ubuntu / Debian apt-get install build-essential issue

Recently, I installed Ubunto 6.06 on my Presario 906us laptop. Unfortunately, the wireless did not work by default. I google and found a a very nice article for installing the Compaq W200 (Orinoco) drivers:

The installation process involves downloading the source, compiling the drivers and installing them. In order to compile the drivers, I had to get various packages. The article suggested using the following line:

sudo apt-get install build-essential cvs linux-headers-`uname -r` gcc-3.4-base cpp-3.4

Instead of working, I get an error that build-essential could not be found:

Reading package lists… Done
Building dependency tree… Done
E: Couldn't find package build-essential

The problem turns out to be an incomplete package list. To fixed the problem, you can either run either apt-get update from the command line or run the Synaptic Package Manager and press the refresh button.

June 18, 2006 at 1:34 pm 10 comments


June 2006

Posts by Month

Posts by Category