Category Archives: laptop

hibernating with slackware 64

Kernel Upgrade

upgraded kernel to 2.6.32.2 on 27th of last month, running late to write this entry, i know. customized and compiled the kernel with all much of it as modules. config file can be found here this config gave me 2.5MB kernel compared to 4.8MB stock. not bragging, but for leaner systems recompiling is a good option. mine can carry load, but i like to recompile still. If you have acer as7530g then you can simply download that config file, replace it with the one in ur kernel src directory, and compile your own kernel

Alsa Revamp

Also downloaded alsa and configured and installed. alsa packages can be found here. please note that these are only packages and have only been compiled. alsa is licensed under gpl and lgpl, links for licenses found here Alsa driver for  hardware is here, and alsa lib is here, this is basically a nvhdmi – realtek sound card [driver is snd-hda-intel]

Well coming to the hibernating part, zzzzzzzz

I took hints from SlackBlog, but skipped the LVM and LUKS part, so compiled kernel with hibernate [aka suspend2disk support], remember to mention the correct partition in your kernel config. the important part here is to also enable initrd support when compiling kernel, don’t worry if you are using the config file from above, its done.

making the initrd

in the directory where the kernel source is [probably should be /usr/src/linux]

#mkinitrd -c -k 2.6.32.2 -m ext4 -f ext4 -h [ur swap partition] -r [ur root partition] -o /boot/initrd.gz

Configuring LiLo

and add the following line to your /etc/lilo.conf

append=”vt.default_utf8=0 resume=/dev/acercryptvg/swap”

and also in the os section in the new os entry

initrd = /boot/initrd.gz

thats it guys, install lilo, and yes whenever u have  a new kernel remember to boot into init3 and not 4. unless you have correct graphics drivers for new kernel, I think in most cases you might have to recompile, for the new kernel.

Shiny suspend2disk works great, and reads image from disk in 8-10 seconds flat.

Running custom apps on laptop using hotkeys

This is a continuation to earlier post which speaks of configuring hotkeys on a linux, using xbindkeys. In addition here is a package for slackware 13 64 bit – xbindkeys-1.8.3-x86_64.txz. Also the source is here, so if you are on a different distribution or another o/s, you can get the source and compile it for yourself. We shall be adding some more eyecandy by adding an on screen display (OSD). Here we shall make use of xosd. Again, the source for xosd is here. And the package is here – xosd-2.2.14-x86_64.txz.

So lets begin cooking. Get the packages and install them. Once this is done, we need to find the keycode using ‘xev’ as mentioned in earlier post. In this upgraded version, we run a small bash script which does the tasks of calling osd_cat to show some meaningful messages on the screen and run the application. In a few scripts we also read the status of some switches / variables and swap the status from on off or mute unmute.

Below is part of the .xbindkeysrc file

“sh $HOME/scr/launch.firefox.sh”
c:180

“sh $HOME/scr/headfone.switch.sh”
Mod4 + c:74

“sh $HOME/scr/wifi_switch.sh”
c:246

“sh $HOME/scr/launch.amarok.sh”
c:163

“sh $HOME/scr/master.audio.switch.sh”
c:121

“sh $HOME/scr/launch.dolphin.sh”
c:156

And here we have the scripts

headphone.switch.sh

if [ `amixer sget Front | grep -i 'Front Left:' | grep -c off` == "1" ]; then
  amixer -q sset Master unmute
  amixer -q sset Side unmute
  amixer -q sset Front unmute
  amixer -q sset Center unmute
  amixer -q sset LFE unmute
  amixer -q sset Surround unmute
  osd_cat -d 2 -c red -p middle -A centre -f “-adobe-helvetica-bold-r-normal-*-*-300-*-*-p-*-*-*” $HOME/scr/messages/headfone.switch.off.txt &
  sleep 3s
  kill %1
else
#  amixer -q sset Master mute
  amixer -q sset Side mute
  amixer -q sset Front mute
  amixer -q sset Center mute
  amixer -q sset LFE mute
  amixer -q sset Surround unmute
  osd_cat -d 2 -c green -p middle -A centre -f “-adobe-helvetica-bold-r-normal-*-*-300-*-*-p-*-*-*” $HOME/scr/messages/headfone.switch.on.txt &
  sleep 3s
  kill %1
fi

launch amarok

amarok &
osd_cat -d 2 -p middle -A centre -c green -f “-adobe-helvetica-bold-r-normal-*-*-300-*-*-p-*-*-*” $HOME/scr/messages/amarok.txt &
sleep 2s
kill %2
exit 1

wifi switch

if [ `/sbin/iwconfig wlan0 | grep -c Tx-Power=off` == "1" ]; then
  sudo /sbin/iwconfig wlan0 txpower on
  osd_cat -d 2 -p middle -A centre -c green -f “-adobe-helvetica-bold-r-normal-*-*-300-*-*-p-*-*-*” $HOME/scr/messages/wifi.on.txt &
  sleep 3s
  kill %1
  #echo “code is beyond”
else
  sudo /sbin/iwconfig wlan0 txpower off
  osd_cat -d 2 -p middle -A centre -c red -f “-adobe-helvetica-bold-r-normal-*-*-300-*-*-p-*-*-*” $HOME/scr/messages/wifi.off.txt &
  sleep 3s
  kill %1
  #echo “working :)
fi

Looks like this >>>

http://sites.google.com/site/psibianopen/Home/wifi.off.jpeg?attredirects=0

Cooler laptop

My acer 7530G laptop was running hot, running close to 75 degrees celsius when fully loaded and at 68 degrees under average load. I thought of something to cool it down. I tore it apart, and increased the size of the vents which cool the heatsink. I cut some of the grids. Assorted pics below.

The hdd:
The work done

Here is the system snap after the mod, note the cpu temp : 58 degrees :)

The GPU rat race

AMD has announced the first 40nm graphics processors running in ATI Molility Radeon HD 4860 and ATI Molility Radeon HD 4830. These have suppor for directx 10.1, and are aimed for the laptops, did i not say they are mobile. So what else is new? GDDR5 memory, twice the bandwidth of GDDR3. Lower power consumption thanks to ati powerplay, powerxpress and switchablegraphics. ASUS is supposedly the first to launch them in their laptops. The max resolution they can offer are 2560 x 1600. That would be a sight! But that would be in AC mode only, aww! This is a link to some images.

Rivals Nvidia have launched two new notebooks gpus – geforce gtx 280m and gforce gts 160m and 150m. These have NVIDIA Hybrid power technology, NVIDIA PhysX effects, CUDA computing architecture. The retailers having these in their laptops are Asus, Clevo and MSI.

Lets wait and watch for some comparison tests.

Bluewhite64 12.2 package : xbindkeys-1.8.2 and setting up hot keys on laptops

The package : xbindkeys-1.8.2.tgz and here is part of my configuration file for binding the keys :

#increase volume by 5%
“amixer -c 0 sset Master playback volume 5%+ &> /dev/null”

c:176

#decrease volume by 5%
“amixer -c 0 sset Master Playback Volume 5%- &> /dev/null”
c:174

#execute the browser
“firefox”
c:178

“amarok”
c:236

“konqueror”
c:159

“sh /home/rahul/scr/mute.sh”
c:160

Also note that this configuration works for the laptop acer aspire as 7530g, to find the hotkeys on your laptop / desktop keyboard, just open a new terminal, and type in “xev”, a small x window appears, let it remain active, next press the hot key and see the output in the terminal, it would be something like this:

KeyRelease event, serial 35, synthetic NO, window 0x1e00001,
root 0x13e, subw 0×0, time 2530749, (1039,664), root:(1043,734),
state 0×10, keycode 236 (keysym 0×0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

The keycode number is what can be used in the configuration file .xbindkeysrc which stays in your home directory, viz. /home/$USER/.xbindkeysrc, and the owner of this file should be $USER. for example -

“amarok”
c:236

pressing the key would start amarok.

For muting and unmuting the sound a small script is used mute.sh, whose contents are:

snd_status=(`amixer -c 0 sget Master Playback Volume | egrep “\[on|off\]$”`)
cur_vol=$(echo ${snd_status[5]} | tr ‘[|]|%’ ‘ ‘)
echo cur_vol = $cur_vol
if [ $cur_vol == "off" ]
then
amixer -c 0 sset Master unmute #Playback Volume 0% &> /dev/null
else
amixer -c 0 sset Master mute #Playback Volume 50% &> /dev/null

After
editing the file you need to kill xbindkeys and restart if it is running for the changes to take effect.