Sunday, November 30, 2008

Problems with Compaq Presario V3000

I own a Compaq Presario Notebook V3252AU which I bought in July 2007. 2 or 3 months before the warranty period expired, I started having problems with the wireless chipset. I'm using Gentoo Linux as my main OS and Ubuntu as my secondary OS. I couldn't detect the wireless chipset which is Broadcom Corporation BCM94311MCG wlan mini-PCI (rev 01). I was too lazy to bring it to the HP centre to repair as that would mean that I'd be deprived of my laptop for a while. So I bought a USB wireless adapter and got on with life.

Two weeks later, I started having problems with the display. The screen would suddenly become distorted and the system would freeze and I had to restart the system all over to restore it. This happened twice and then the com died slightly less than a month before the warranty period expired. I sent it to the HP centre and they said that the mainboard was damaged. Got the com back in 5 days.

A week later I started having problems with the wireles chipset again. The wireless connection kept disconnecting. In the end, I just disabled it altogether and prevent the module for the wireless card from loading. I am using the wired ethernet now.

2 weeks ago, a friend of mine who has the same version of laptop as mine told me that her wireless chipset stopped working. Windows couldn't detect it at all. Yesterday, her laptop couldn't be switched on at all. This is around 6 months post 1-year-warranty period.

Oh, and I couldn't update my BIOS at all because HP only provided BIOS updates for Windows and not for Linux-based systems and did not have the courtesy to reply to my enquiry regarding a BIOS update for Linux.

I am never buying HP-Compaq products again and I will think twice before I buy any HP products.

Sunday, February 24, 2008

Volume buttons

How to get on screen display when the volume / mute button is pressed.

1. emerge xosd

2. Create the executable files that will be executed when the buttons are pressed. For me, down.sh (when 'Volume decrease" is pressed), up.sh (Volume increase) and mute.sh (toggle between mute and unmute)
Contents of down.sh

amixer set Master 5%-
killall osd_cat
osd_cat -p middle -A center -f "-adobe-new century schoolbook-medium-i-normal--34-240-100-100-p-182-iso8859-1" -c blue -b percentage -P `amixer sget Master |grep "Front Left: Playback" |cut -c 28-30` -T `amixer sget Master |grep "Front Left: Playback" |cut -c 28-30` -d 2 &
Contents of up.sh

amixer set Master 5%+
killall osd_cat
osd_cat -p middle -A center -c blue -f "-adobe-new century schoolbook-medium-i-normal--34-240-100-100-p-182-iso8859-1" -b percentage -P `amixer sget Master |grep "Front Left: Playback" |cut -c 28-30` -T `amixer sget Master |grep "Front Left: Playback" |cut -c 28-30` -d 2 &
Contents of mute.sh

killall osd_cat
if /usr/bin/amixer sget Master | grep -q "Front Left: Playback 0 \[0%\]"
then
echo "Volume unmuted" | osd_cat -p bottom -A center -f "-adobe-new century schoolbook-medium-i-normal--34-240-100-100-p-182-iso8859-1" -c green -d 2 &
amixer set Master 75%+ on ## the 'on' allows the LED button turn blue
else
echo "Volume muted" | osd_cat -p bottom -A center -f "-adobe-new century schoolbook-medium-i-normal--34-240-100-100-p-182-iso8859-1" -c green -d 2 &
amixer set Master 0 off ## LED button turns orange
fi

3. Map the appropriate keycodes to the volume buttons by using xev into .Xmodmap.

4. Edit ~/.fluxbox/keys so that the respective files (down.sh, up.sh, mute.sh) will be executed when the respective buttons are pressed.

None XF86AudioRaiseVolume :ExecCommand ~/bin/up.sh
None XF86AudioLowerVolume :ExecCommand ~/bin/down.sh
None XF86AudioMute :ExecCommand ~/bin/mute.sh

Monday, February 11, 2008

Starting different window managers

I start up my window manager (Fluxbox) by command line 'startx'. However, sometimes I want to experiment with other managers and it becomes a chore editing the .xinitrc every now and then. Instead, I use 'xinit':

xinit /home/username/bin/fluxbox
xinit /home/username/bin/beryl
Content of ~/bin/fluxbox:
for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
do
if ( cp /dev/null "$errfile" 2> /dev/null )
then
chmod 600 "$errfile"
exec > "$errfile" 2>&1
break
fi
done

exec startfluxbox
Content of ~/bin/beryl:

if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
eval `dbus-launch --sh-syntax --exit-with-session`
fi

emerald &
beryl-manager &

# Start other applications here
#
# Example: set wallpaper + open a terminal
#
#fbsetbg -f /home/username/Personal/Bild/Hintergrund/nix.jpg &
#exec rox -p Default -b Default -S &
exec /usr/local/sbin/rox-session
exec beryl