Friday, February 27, 2009

icewm in pclos


I've been testing out the features of pclinuxos with the "big update" and I've been thinking about an icewm remaster. It's exceptionally lightweight and I've ironed out a few bugs, such as setting the dpi correctly for my monitor and customizing the panel a bit. Here's a pic of it so far.

Wednesday, February 18, 2009

Arch Linux 2009.2


There was a family issue at my sister's house in which her computer died, and a certain program had to be run that could only be done in windows.... so I wiped the hard disk with the perfectly working slack install and installed xp (ugh).

Needless to say, we ordered new parts for a computer and now I'm left with a laptop with windows xp on it.... this will never do! So after a quick perusal of distrowatch.com, I noticed that arch linux had a new release iso, so I figured why not?

The install was fairly straight forward.... One thing that I noticed was that my rc.conf didn't have any modules populating it... after checking the forums, I discovered that udev handles all that now, so I really only need to populate it with items that I want to blacklist. Nice eh?

I ensured that wireless tools and b43-fwcutter were installed and then had to figure out a way to get the firmware, as this laptop does not have a wired nic, only a wireless one. So I downloaded the firmware onto a usb stick on another computer and plugged the stick into the usb slot on the laptop. I checked /dev before and after inserting the stick to see what the stick came up as, and then I created a mount point in /mnt of usb... so it's /mnt/usb. The command to mount was mount -t usbfs /dev/sdb1 /mnt/usb. From here, I copied the firmware over to /tmp, extracted the tarball, cd'd into the driver directory and used b43fwcutter to installe the firmware. This allowed me to access my wireless network using wpa_supplicant and dhcpcd.

At this point I configured pacman and it was off to the races installing whatever I wished to. My girlfriend likes gnome and xfce and gets confused when I get all geeky and install something minimal like awesome or openbox... So to keep the peace, I figured xfce isn't TOO bloated and took the plunge.

The very first thing I noticed was that the fonts were AWFUL. So I searched the arch wiki and found clear instructions on lcd fonts on the fonts page. Then I enabled anti-aliasing for fonts, hinting and sub-pixel hinting
and the screen looks nice and sharp.

The standard vesa driver is fine, but there is full support for the graphics chip in this laptop with the r128 driver, so I installed that, set the bit depth to 16 for better performance and I'm back to 500 fps in glxgears. =p

I compiled a custom tuxonice kernel with the help of the aur and ran into a few problems. Tuxonice apparently doesn't like the uuid scheme of things, so I had to edit my /etc/fstab to the old /dev/sda way of doing things and then run mkswap on /dev/sda1 (my swap drive) for arch to detect the swap drive. I also kind of rushed through the wiki and missed a few steps with mkinitcpio and I was surprised that hibernate wasn't working. The second time through I took my time and got it right and now hibernate works as expected. I may try to get hibernate working from a graphical environment, but I'm not sure I'm going to bother. Logging out to the command line and running hibernate is not a big deal to me.

I'll keep you posted on how things are going!

Tuesday, February 10, 2009

Refining the install

On the dell inspiron 5000e with 320 megs of ram, I ran into an interesting phenomenon with pcmanfm. If I allowed pcmanfm to manage the desktop wallpaper and produce desktop icons, I ran into a spike of approximately 15 megs of ram usage and general slowness while scrolling.

I'm not sure what the correlation is, but when I switched to feh to handle the wallpaper and disabled desktop icons, scrolling became smooth once more. Weird eh, as even when I have other applications using up more memory than pcmanfm did while handling the wallpaper and icons, scrolling was still nice and smooth.

For those times when I simply want a dock instead of a full blown panel, I installed stalonetray, and it works great. It puts out a memory footprint a full 5 megs less than fbpanel, which is quite a nice improvement. It's not a big deal on this laptop, but if I were more memory constrained, I would definitely ditch fbpanel for stalonetray.

I've also grown to really love pysolfc as it has so many card games that it's insane! I can't count the number of hours I've spent playing this while watching tv or talking to the girlfriend. =p

The custom kernel I built is working great. It utilizes pentium 3 coppermine optimizations and I can really tell the difference in speed over the stock ppro kernel. I also cut out a LOT of cruft from the huge.smp kernel and slimmed it down big time. This was quite interesting as I noticed almost no difference in speed in my two faster boxes that run slack (a 1.86 ghz celeron m with 1.5 gigs of ram and a 2.4 ghz core 2 duo with 2 gigs of ram) when customizing the kernel. I guess the optimizations are most important on slower processors.

At this point, I consider this project pretty much closed. I'm very satisfied with the performance of this old laptop and see no need to upgrade this box further. I was considering buying another 256 meg stick and maxing out the memory, but quite honestly can't justify it. If I wanted to run gnome or kde, then I would probably do so, but with the way the system is set up right now, there is really no point.

Thursday, February 5, 2009

Slackware on Dell Inspiron 5000e part 2


Putting the final touches on an operating system is always very satisfying. When that operating system is Slackware, this is especially true. Slack is one of the quintessential "hands on" distributions where you really get down and dirty with the essentials of just exactly how your OS functions. Doing a full install of software with Slack will give you a plethora of tools with which you can build your own programs. The only portion I did without was KDE, as there is no way I will obtain any kind of performance with it.

A great resource is www.slackbuilds.org. slackbuilds are so useful because of their excellent documentation, and they build slackware packages with proper permissions and install locations. Slackbuilds.org also lists dependencies that need to be built before the slackbuild will compile correctly. It can be a tad annoying tracking down all the dependencies before building the program you wish to use, but it would be FAR more annoying trying to build the program and not having the dependencies already installed.
I won't bore you with how to set up a user account... One of my arch linux blogs documents this, and the functionality is the same in slackware.

The second step was to get the wireless functional as this laptop does not have an ethernet port, so connecting to the internet would have to be accomplished by the belkin wireless card that utilizes the broadcom 4306 wireless chip. The native stx broadcom driver does not include support for the 4306, so I would have to use either the b43 module or ndiswrapper. Slackbuilds.org has slackbuilds for the b43, so I built the b43 module against the proper firmware and I was in business.
One of the first things you'll want to do with slack is to build your own custom kernel. Without gnome or kde running things for power-management, I decided to compile in support for tuxonice to enable hibernation. Trimming unneeded items out can take some time on a custom kernel, so be sure to take your time and get it right the first time.... that and compiling on a 600 mhz celeron will take HOURS. I found best results with hibernation from the command line. So exiting out of x and issuing the /usr/sbin/hibernate command saved an image of what was running, and resuming brought the system back up in 10 seconds flat. Not bad for an old 600 mhz celeron.

The window manager selection was easy for me to decide on. Openbox is both lightweight and yet very robust in it's configurability. Had I not upgraded the ram to 320 megs, I would have gone without a panel to save on resources, and simply used alt-tab. Since I do have over 256 megs of ram however, installing a panel is perfectly acceptable and won't impact performance. There are many good choices for panels, such as pypanel and lxpanel, and I could have installed stalonetray or trayer just for a dock, but I tend to like having a menu accessible on my panel, so I chose fbpanel.... not because fbpanel is any easier or better than the other afore-mentioned panels... but because I've used fbpanel for a long time and I'm intimately familiar with just how it functions and how to configure it.
In fact, now that I think about it, I do tend to reuse many of the same programs, as I find it more productive than constantly learning new ways to achieve exactly what I want. That's my story and I'm sticking with it. The slackbuild for pcmanfm compiled and installed perfectly, and I was set with a lightweight filemanager which can also handle desktop icons.

Getting volwheel to work with Slackware was a tad difficult, only because of the fact that there is no slackbuild for it, and also no slackbuild for it's needed dependen
cy (perl-gtk2-trayicon). This required little in the way of real innovation. The aur in arch linux has a pkgbuild for perl-gtk2-trayicon, which also includes what it depends on which is perl-extutils-pkgconfig, which does have a slackbuild. Then I followed the instructions in the pkgbuild for perl-gtk2-trayicon, which involves downloading the source of gtk2-trayicon, unpacking the tarball and issuing the following command to build it with perl.

PERL_MM_USE_DEFAULT=1 perl Makefile.PL
make
make install
Then, I was able to utilize volwheel normally. It was good to see the documentation updated with very specific install instructions by the way. Props to Oliwer!

I also have enough ram to utilize wicd to handle accessing different wireless networks. The command line or a script would of course use fewer resources, but I wanted to see how the system would respond with 320 megs of ram and wicd. I installed wicd from /extra and the system didn't seem to suffer in usability, so I told it to start on bootup by adding wicd-client to my autostart.sh.

With conky installed I had access to some common features that I like to be aware of... such as ram usage, cpu usage, cpu temp, battery charge, file system usage, and network usage.

alignment top_right
background yes
border_width 1
cpu_avg_samples 2
default_color cornflowerblue
default_outline_color white
default_shade_color white
double_buffer yes
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
gap_x 25
gap_y 15
maximum_width 225
max_port_monitor_connections 64
max_specials 512
max_user_text 16384
minimum_size 330 10
net_avg_samples 2
no_buffers yes
out_to_console no
#wm_class_name Conky
own_window_colour black
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window_type normal
own_window yes
stippled_borders 2
update_interval 2
uppercase no
use_spacer yes
use_xft yes
xftalpha 0.8
xftfont arial:size=9

TEXT
${color #9DCAFF}${font impact:size=12}$sysname $kernel ${alignr}$color${time %l:%M:%p}
${color #9DCAFF}$nodename
${font arial:size=5}
${color #0077ff}${font arial:bold:size=12}System:
${color #0077ff}${font arial:size=9}Uptime:$color $uptime ${color #0077ff} Load:$color $loadavg
${color #0077ff}CPU 0(${freq}mhz):${alignr}$color ${cpu cpu1}%
${color #0077ff}${cpubar cpu1}
${color}CPU Temp: ${color #0077ff}${acpitemp}${color}Celsius
${color #0077ff}RAM Usage:${alignr}$color $mem${color #0077ff}/${color}$memmax - $memperc%
${color #0077ff}$membar
${color #0077ff}Swap Usage:${alignr}$color $swap${color #0077ff}/${color}$swapmax - $swapperc%
${color #0077ff}${swapbar}

${color #0077ff}${font arial:bold:size=12}File Systems:
${color #0077ff}${font arial:size=9}/ ${alignr}$color${fs_used /}/${fs_size /}
${color #0077ff}${fs_bar /}
${color #0077ff}/home ${alignr}$color${fs_used /home}/${fs_size /home}
${color #0077ff}${fs_bar /home}

${color #0077ff}${font arial:bold:size=12}Processes:
${color #0077ff}${font arial:size=9}Top CPU ${alignr}CPU% MEM%
$color ${top name 1} ${alignr}${top cpu 1} ${top mem 1}
$color ${top name 2} ${alignr}${top cpu 2} ${top mem 2}
$color ${top name 3} ${alignr}${top cpu 3} ${top mem 3}
${color #0077ff}Total Processes:$color ${processes}

${color #0077ff}${font arial:bold:size=12}Network:
${font arial:size=9}${color #0077ff}
${color #0077ff}Net Down:$color ${downspeed eth0} k/s
${color #0077ff}${downspeedgraph eth0 104E8B 0077ff}
${color #0077ff}Net Up:$color ${upspeed eth0} k/s
${color #0077ff}${upspeedgraph eth0 104E8B 0077ff}

${color #909090}AC Adaptor: ${color0}$acpiacadapter
${color #909090}Battery: ${color0}${battery}
${battery_bar}

blogger.com never seems to format this correctly, so if you need my conkyrc and can't figure out where blogger screwed it up, just drop me a line.

Here's a list of what I chose

Window manager = Openbox
File manager = pcmanfm
Panel = fbpanel
Terminal emulator = sakura
Graphical text editor = geany
Mplayer = movie player
Mplayerplugin = movie player in firefox
Browser = firefox
Music Manager = Quod Libet
Card games = Pysolfc
Chat program = pidgin, xchat irc
Email client = thunderbird
Bittorrent client = transmission
Word processor = abiword
Calculator = galculator
Graphical archiver = peazip

These are all lightweight, or fairly lightweight applications that function well on older hardware. There are of course ways to go with even lighter software, but I didn't feel the need as these all function well and are easier to use (IMHO) than their more lightweight alternatives.

The 5000e has an 8 meg ati m3 graphics chip that utilizes the r128 module in xorg.conf. Changing the driver to this and a couple of other tweaks allowed me to achieve 530 FPS in glxgears. I know... I know... glxgears is not a benchmark, but it showed that 3d was working and I could utilize basic 3d functions. Installing frozen-bubble confirmed this. It was very slow at the default settings, but turning it down one notch (removes the penguin firing the bubble animation) allowed decent play.

Section "Device"
Identifier "VESA Framebuffer"
Driver "r128"
VideoRam 8192
Option "AGPMode" "2"
Option "AccelMethod" "EXA"
Option "EnablePageFlip" "on"
# Insert Clocks lines here if appropriate
EndSection

I love to encourage people to still utilize their older hardware. It's always great to have the latest and greatest to run the newest version of kde or gnome with all the bells and whistles, but the funny thing is that older hardware like this laptop are still perfectly usable with the right choice of window manager, software, and available hardware upgrades.

This has been a fun project, and I encourage you all to dig out that old desktop or laptop and resurrect it to usefulness.

Dave