Linux Blog

New Laptop

Filed under: Linux Hardware — TheLinuxBlog.com at 10:06 am on Friday, October 10, 2008

I’m excited because this weekend I’m getting another laptop. I’ve gone through quite a few laptops some of which have been more Linux friendly than others. I have been happy with my last two Toshiba laptops (Portege 4010 and Tecra M2) but this time I am buying a used Lenovo Thinkpad.

I was very happy with my last upgrade, from a 933MHz with 512MB of ram, to a 1.7GHz with 768MB ram that was recently upgraded to 1GB. The performance increase was phenomenal. Now moving from a 1.7GHz to am Intel Core 2 Duo should provide another greatly needed performance increase.

Suspend Scripts for the Toshiba Tecra M2

Filed under: Quick Linux Tutorials,Shell Script Sundays — TheLinuxBlog.com at 12:15 am on Sunday, March 30, 2008

As you may know if you are a regular reader I own a Toshiba Tecra M2. One of the things that annoyed me was I had to turn the brightness up every time my computer came out of standby mode. A fix for this is to adjust the brightness every time the computer comes out of standby mode.

The script is intended to be run under cron. I have mine set up to suspend after 5 minutes of the lid being closed.

if [ $(cat /proc/acpi/button/lid/LID/state | sed 's/state:      //') == "closed" ]; then
VAR=$(cat /proc/acpi/toshiba/lcd | sed 's/brightness:              //' grep -v levels);
sudo su -c "echo mem > /sys/power/state";
if [ $VAR -eq 1 ]; then
ACTION=ADD;
elif [ $VAR -eq 7 ]; then
ACTION=SUB;
else
ACTION=ADD;
fi;
if [ $ACTION == "ADD" ]; then
VAR=$(($VAR + 1));
else
VAR=$(($VAR - 1));
fi;
sudo su -c "echo brightness:$(echo $VAR) > /proc/acpi/toshiba/lcd";
fi;

I run this with the following cron entry:

*/5 * * * * sh hibernate.sh

The script first checks the current brightness. If the brightness is currently 1 or 7 it adjusts the mathematic operation so that when the laptop is opened the brightness is adjusted. Basically if the brightness is one, it adds one. If the brightness is 7 or any other value it subtracts one. This is currently working out quite well for me. I don’t know how useful this is to any body else, unless you happen to have a Toshiba that is doing the same thing but it should give you a good overall idea of how to perform basic mathematic operations in bash.

More Hardware to add to my collection. Toshiba Tecra M2

Filed under: Linux Hardware — TheLinuxBlog.com at 1:23 am on Monday, December 10, 2007

If you read my post about my Toshiba Portege 4010 you would know that I mentioned in their that it was a little too slow. I couldn’t do the things I needed to do, such as virtualization or play Quake3. So for an early Christmas present to I sold my Toshiba Portege 4010 and I purchased a used Toshiba Tecra M2 laptop. The specs are pretty decent for the amount I paid for it.

CPU: 1.7GHz PM
RAM: 512MB (Needs upgrading)
HD: 40GB -> Upgraded to 100GB
Graphics: GeForce Fx 5200 toGo 64MB.
Media: CDRW-DVD Combo, Firewire, USB 2.0, 2PCMCIA Card Slots
Network: 10/100/1000 B/G Wireless

The battery life is not as good as my old Portege 4010 but with the time I save by not waiting on the CPU I can normally get my Quake3 I mean work done in time to find a power outlet.

The Tecra M2 has excellent support for Linux. The only thing thats not supported that I’m working on is the SD Card reader. This is the same situation as the Portege’s as they use the same hardware.

I’ll be making a post for any body wanting to run a real Linux distribution on a Toshiba Tecra M2.