Tuesday, August 28, 2007

Return of that blasted Toshiba

After wasting several hours of tearing apart the notebook and putting it back together to no avail. It just doesn't feel right for this damn thing to just work again the next morning. What is wrong with this lemon that Toshiba has given me?

Since it's working again. I'm back to tinkering with the acpi to get the LCD brightness working. I figured out that if you write 2 different values into the 2 /proc entries you'll get the that "TBX error" issue when you reboot.

Here's the output of that file:
[terrorsomemore@Terrors-PC ~]$ cat /proc/acpi/video/GFX0_PCI0/LCD/brightness
levels: 75 35 10 25 35 50 60 75 90 100
current: 0

The levels are the different setting available. Don't understand why the numbers are jumbled up. Tested the setting, the numbers between 10 -> 90 worked. The 0 & 100 did not work.

So here's my solution:
I wrote a script lcd-dim.sh with the contents:
#!/bin/bash
# Minimum Brightness
echo 10 > /proc/acpi/video/GFX0_PCI0/LCD/brightness
echo 10 > /proc/acpi/video/VGA_PEGP/LCD/brightness

Another script lcd-bright.sh
#!/bin/bash
# Nice Brightness
echo 50 > /proc/acpi/video/GFX0_PCI0/LCD/brightness
echo 50 > /proc/acpi/video/VGA_PEGP/LCD/brightness

Gave them execute permission: chmod 755 *.sh

To make the LCD dim when using battery.
I copied lcd-dim.sh into /etc/laptop-mode/batt-start/

To make the LCD bright when plugging in AC.
I copied lcd-bright.sh into /etc/laptop-mode/batt-stop/

To make the LCD bright at the desired level on power-up with AC.
I copied lcd-bright.sh into /etc/laptop-mode/nolm-ac-start/

If you wanna go further, you could add 2 icons into your panel & link that to your scripts so you get buttons for changing the brightness. I didn't bother because these needed root privileges that meant u had to type the root password every time you click the icon.

So all in all, I needed 3 hacks to make this laptop work decently.
1. The script I just explained above.

2. To make the Bluetooth & Wifi on/off switch work. I compiled & installed the latest omnibook module. Forcing module load using option ectype=12. Every other features of the omnibook module didn't work, only the switch worked.

3. To make Mandriva's KDE utilize the Media playback & volume control buttons, I installed lineak. Klineakconfig just segfaulted, so I had to configure it by hand. This was done basically using 'xev' to capture the keycode & writing my own custom keyboard type, then mapping these to the necessary plug-ins or DCOP commands. I managed to configure the Play, Stop, Next, Prev and VolumeUpDown buttons all this way.

I contrast, I recently installed Mandriva & Ubuntu into a Dell Inspiron 1520 notebook which has pretty much the same specs as this Toshiba. The Inspiron did not require any hacks whatsoever, it just worked. That's because Dell properly builds all the Fn+ hotkeys into the BIOS the way they should be.

1 comment:

ashotiwoth said...

you should have just gotten a Sony :)

yeah yeah.. i know it's free...