Showing posts with label slackware. Show all posts
Showing posts with label slackware. Show all posts

Friday, July 19, 2013

FAIL: cooling/acpi in a 2008 trashiba

Links: fan speed control :: cooling and acpi :: fancontrol :: Satellite L305D-S5869 :: One user's solution - v.2.0
I have a disposable Satellite L305D-S5869 or, more specifically, a PSLC8U-00Y010, for trips and low priority activities. It has the older Toshiba BIOS (Insyde H20 Rev 3.5 v. 1.8) with flakey DSDT code; it's hit or miss with ACPI or kernel module fan speed control. This appears to apply mostly to Slackware and Slackware hybrids; the laptop's fans do occasionally work with Fedora-based OS's. Another challenge for this crappy BIOS is hibernation, but that's another post.

$ lsmod |grep thermal
thermal 8082 0
thermal_sys 13862 4 thermal,processor,video,fan
hwmon 1473 3 radeon,thermal_sys,k10temp

$ sensors
k10temp-pci-00c3
Adapter: PCI adapter
temp1: +56.9°C (high = +70.0°C)

acpitz-virtual-0
Adapter: Virtual device
temp1: +56.0°C (crit = +105.0°C)
Not bad, except I had never heard the fan on even at over 70C. Taking a trip into the BIOS, there were no ACPI settings, but I added append="acpi=force"into LILO. Still over 70C with no fans. (On the BIOS tip, you can read further down that I also updated the BIOS to the latest version to no avail).

fancontrol

We can set thresholds to whatever we'd like, using the program to increase or decrease fan use. I don't yet have a configuration file in place.
# fancontrol
Loading configuration from /etc/fancontrol ...
Error: Can't read configuration file

# ls /etc/fancontrol
ls: cannot access /etc/fancontrol: No such file or directory
A larger problems; it may be that fancontrol cannot detect my fans -- its configuration editor is unable to detect them.
# pwmconfig
pwmconfig revision 5770 (2009-09-16)
/usr/sbin/pwmconfig: There are no pwm-capable sensor modules installed
At first cut, it appears no Pulse Width Modification controllable fans are in the laptop, but it may be the system fan is controllable via some other method(s). It's also of note that KDE is the WM running, and that Kinfocenter does not indicate hardware has been properly detected. Fedora-based distros have had no such problems. Accordingly, although this post began about cooling, detection is the first order of business, and it has been added to the title in parentheses.


Notably, Kinfocenter provides identical results as lshal, where it might have looked for its information:
# lshal
[snip]
udi = '/org/freedesktop/Hal/devices/acpi_CPU0'
info.category = 'processor' (string)
info.product = 'Unknown Processor' (string)

So instead of hal or other OS detection, let's directly access fan information.
# ls /sys/class/thermal
cooling_device0 cooling_device1 cooling_device2 cooling_device3 thermal_zone0

# cat /sys/class/thermal/cooling_device0/device/hid
PNP0C0B

# cat /sys/class/thermal/cooling_device0/device/modalias
acpi:PNP0C0B:

So this fan's ACPI identifier is PNP0C0B. The fan is currently off; what are its range of possible values when running?
# cat /sys/class/thermal/cooling_device0/device/thermal_cooling/cur_state
0

# cat /sys/class/thermal/cooling_device0/device/thermal_cooling/max_state
1

# cat /sys/class/thermal/cooling_device0/device/thermal_cooling/power/control
auto
Now it's clear why no PWM functionality was detected by pwmconfig: the fan's options are apparently either "on" or "off". Power is controlled "auto"-matically. But similarly to these commands for a backlight, let's attempt to turn on "cooling_device0".
# echo 1 > /sys/class/thermal/cooling_device0/device/thermal_cooling/power/wakeup_active
bash: /sys/class/thermal/cooling_device0/device/thermal_cooling/power/wakeup_active: Permission denied
This sort of problem continued with other attempts "invalid parameters" and so forth. The next step seemed to be query the device for legal settings. Assistance via a specialized program to add to efficiency seemed sensible.

acpitool

Links: acpitool :: acpitool GUI
I'm running a Toshiba laptop, so let's try
# acpitool -F 1
Forcing the fan of/off is only supported on Toshiba laptops.
No Toshiba ACPI extensions were found.
Hah! OK, so "No Toshiba ACPI extensions" on a Toshiba laptop means that either specific kernel modules are not loading for Toshiba, or playing with the BIOS and LILO until this changes. Probably the former, toshiba_acpi.ko.
# find -name toshiba_acpi.ko
./lib/modules/2.6.37.6/kernel/drivers/platform/x86/toshiba_acpi.ko

# lsmod |grep toshiba

# grep -n toshiba /etc/rc.d/rc.modules
178:#/sbin/modprobe toshiba_acpi

# nano /etc/rc.d/rc.modules
/sbin/modprobe/toshiba_acpi
/sbin/modprobe/thermal
/sbin/modprobe/processor
/sbin/modprobe/fan
Hopefully this is not too many modules and hogs memory. Following this I rebooted.
# lsmod |grep toshiba
Huh. Okay then...
# modprobe toshiba_acpi
FATAL: Error inserting toshiba_acpi (/lib/modules/2.6.37.6/kernel/drivers/platform/x86/toshiba_acpi.ko): No such device
Not good. Per this site, I checked the BIOS and note that the BIOS is not Toshiba. Appears I will have to recompile the kernel and enable (menuconfig) Device Drivers / x86 Platform Specific Device Drivers / Toshiba Laptop Extras . I'm dubious since, if it can't load an external module, how is it likely to work as a built-in option. Still, have to try everything for cooling...

post kernel - BIOS

As feared, the kernel was unable to detect the Toshiba-ness of the laptop, even after building in the Toshiba-specific features above, in addition to some other switches which I hoped would allow the kernel to grasp it was in a Toshiba.
# acpitool -F 1
Forcing the fan of/off is only supported on Toshiba laptops.
No Toshiba ACPI extensions were found.
Next stop is the BIOS. The BIOS, Insyde H20 v.1.2 rev.3.5, appears rudimentary and has no ACPI settings. Perhaps we can flash it to something better/more recent. At the Toshiba website, the most recent (April 2009) BIOS for the L305D. Sort of old and the file is Windows specific - slc8v180.exe. I ran strings against it see if it was just an archive.
$ strings slc8v180.exe
[snip] processorArchitecture="X86" name="Roshal.WinRAR.WinRAR" type="win32" /> WinRAR archiver
I was able to unpack this. I found a bootable ISO in the files with a README to reboot with it. Thereafter, I burned the ISO to a CD, and rebooted the system. Voila, the Insyde BIOS updated from 1.2 to 1.8. However, looking inside it, no ACPI functions were added, and I still get the following:
# modprobe toshiba_acpi
FATAL: Error inserting toshiba_acpi (/lib/modules/2.6.37.6/kernel/drivers/platform/x86/toshiba_acpi.ko): No such device

Arch installation

Let's see if we can find better interaction with a different OS, with a newer kernel. Installed Arch and then compiled acpitool.
# acpitool -F 1
Could not open file : /proc/acpi/toshiba/fan
You must have write access to /proc/acpi/toshiba/fan to stop or start the fan.
Or ensure yourself you are running a kernel with Toshiba ACPI support enabled.
Fails, but more information. Acpitool apparently only points at /proc/acpi/toshiba/fan, but the fan directory for this this system is /sys/bus/acpi/drivers/fan. Let's attempt a softlink, first being sure there is a /proc/acpi/toshiba directory into which we can link a "fans" directory.
# ls /proc/acpi/toshiba
keys version

# ln -s /sys/bus/acpi/drivers/fan /proc/acpi/toshiba
ln: failed to create symbolic link '/proc/acpi/toshiba/fan': No such
file or directory
Let me get this straight, ln fails to create a directory, because the directory it's supposed to create doesn't exist before it creates it? Brilliant program. But at any rate, the device in the "fan" directory, PNP0C0B:00, is a symlink to another directory.
$ ls -an /sys/devices/LNXSYSTM:00/device:44/PNP0C0B:00
total 0
drwxr-xr-x 4 0 0 0 Aug 1 12:06 .
drwxr-xr-x 6 0 0 0 Aug 1 12:06 ..
lrwxrwxrwx 1 0 0 0 Aug 1 18:42 driver -> ../../../../bus/acpi/drivers/fan
-r--r--r-- 1 0 0 4096 Aug 1 18:41 hid
-r--r--r-- 1 0 0 4096 Aug 1 18:41 modalias
-r--r--r-- 1 0 0 4096 Aug 1 18:41 path
drwxr-xr-x 2 0 0 0 Aug 1 18:41 power
drwxr-xr-x 2 0 0 0 Aug 1 18:41 power_resources_D0
-r--r--r-- 1 0 0 4096 Aug 1 18:41 power_state
-r--r--r-- 1 0 0 4096 Aug 1 18:41 real_power_state
lrwxrwxrwx 1 0 0 0 Aug 1 18:42 subsystem -> ../../../../bus/acpi
lrwxrwxrwx 1 0 0 0 Aug 1 18:42 thermal_cooling -> ../../../virtual/thermal/cooling_device3
-rw-r--r-- 1 0 0 4096 Aug 1 12:06 uevent
-r--r--r-- 1 0 0 4096 Aug 1 18:41 uid
Yep, acpi "proc" is being replaced by the newer "sys", which also effects "suspend", and other acpi activity. Which is the power state we need to change for the fan? Here are the "cats" for various of these entries:
driver directory
hid PNP0C0B
modalias acpi:PNP0C0B:
path \_TZ_.FAN1
power directory
power_resources_D0 directory
power_state D3cold
real_power_state D3cold
uevent DRIVER=fan
MODALIAS=acpi:PNP0C0B:
uid 2
Now in each of these three sub-directories "driver", "power", and "power_resources_D0"
/driver/
drwxr-xr-x 2 0 0 0 Aug 1 12:07 .
drwxr-xr-x 14 0 0 0 Aug 1 12:06 ..
lrwxrwxrwx 1 0 0 0 Aug 1 18:39 PNP0C0B:00 -> ../../../../devices/LNXSYSTM:00/device:44/PNP0C0B:00
--w------- 1 0 0 4096 Aug 1 18:37 bind
--w------- 1 0 0 4096 Aug 1 12:07 uevent
--w------- 1 0 0 4096 Aug 1 18:37 unbind

/power/
drwxr-xr-x 2 0 0 0 Aug 1 18:41 .
drwxr-xr-x 4 0 0 0 Aug 1 12:06 ..
-rw-r--r-- 1 0 0 4096 Aug 1 19:17 async
-rw-r--r-- 1 0 0 4096 Aug 1 19:17 autosuspend_delay_ms
-rw-r--r-- 1 0 0 4096 Aug 1 19:17 control
-r--r--r-- 1 0 0 4096 Aug 1 19:17 runtime_active_kids
-r--r--r-- 1 0 0 4096 Aug 1 19:17 runtime_active_time
-r--r--r-- 1 0 0 4096 Aug 1 19:17 runtime_enabled
-r--r--r-- 1 0 0 4096 Aug 1 19:17 runtime_status
-r--r--r-- 1 0 0 4096 Aug 1 19:17 runtime_suspended_time
-r--r--r-- 1 0 0 4096 Aug 1 19:17 runtime_usage

/power_resources_D0/
drwxr-xr-x 2 0 0 0 Aug 1 18:41 .
drwxr-xr-x 4 0 0 0 Aug 1 12:06 ..
lrwxrwxrwx 1 0 0 0 Aug 1 19:19 LNXPOWER:00 -> ../../LNXPOWER:00
The two symlinks are problematic infinite loops, but "power" appears to contain a useful writeable file named "control". According to this site, which is about USB, but has the appropriate power information, we should be able to use /power/control to change the fan's state from "auto" to "on".
$ cat /sys/devices/LNXSYSTM:00/device:44/PNP0C0B:00/power/control
auto

# echo on > /sys/devices/LNXSYSTM:00/device:44/PNP0C0B:00/power/control

$ cat /sys/devices/LNXSYSTM:00/device:44/PNP0C0B:00/power/control
on

$ cat /sys/devices/LNXSYSTM:00/device:44/PNP0C0B:00/power_state
D3cold
In other words, although the device seems to accept the power change, the fan does not power-up. And though we can see it in sys/devices, it's not detected by the kernel. Yeah, we see it in dmesg during boot, but it never is seen by the kernel -- we can tell because it never forms an entry in /proc/acpi. During boot, it's called "FAN1", but after that...gone.

$ dmesg |grep ACPI
PnP ACPI: found 10 devices
ACPI: bus type PNP unregistered
ACPI: bus type USB registered
ACPI: Battery Slot [BAT0] (battery present)
ACPI: AC Adapter [ADP0] (on-line)
ACPI: Power Button [PWRB]
ACPI: Lid Switch [LID]
ACPI: Power Button [PWRF]
ACPI: Video Device [VGA] (multi-head: yes rom: no post: no)
ACPI: Thermal Zone [THZN] (50 C)
ACPI: Fan [FAN1] (off)

# cd /proc/acpi

# grep -rn LID *
wakeup:2:LID S4 *enabled

# grep -rn FAN *
# grep -rni fan *

$ acpi -V
Battery 0: Unknown, 100%
Battery 0: design capacity 4000 mAh, last full capacity 2541 mAh = 63%
Adapter 0: on-line
Thermal 0: ok, 48.0 degrees C
Thermal 0: trip point 0 switches to mode critical at temperature 105.0 degrees C
Cooling 0: Fan 0 of 1
Cooling 1: LCD 3 of 7
Cooling 2: Processor 0 of 3
Cooling 3: Processor 0 of 10
Seems to be there, but nothing....

How about in /sys/bus/acpi/drivers/fan?
$ ls /sys/bus/acpi/drivers/fan
PNP0C0B:00 bind uevent unbind

$ ls /sys/bus/acpi/drivers/fan/PNP0C0B:00/
driver hid modalias path power power_resources_D0 power_state real_power_state subsystem thermal_cooling uevent uid
These are the same settings (and same problems) as earlier above in the former configuration: /sys/devices/LNXSYSTM:00/device:44/PNP0C0B:00/. A Gordian knot with no apparent commands to reach inside it -- so close but so far.

Saturday, May 18, 2013

slacko 5.5 (puppy) and easy peasy on a hp110 mini

Links: GPTfdisk  Puppy User and Security

booting from USB


I downloaded the latest slacko ISO (5.5), and used UNetbootin to put the ISO onto a stick. I put in the stick and powered-up. F10 got me into the BIOS, but the BIOS did not detect the USB --- the HDD was the single boot option. The F1 key and cycling the BIOS eventually detected the USB. Each time thereafter, an F9 option to "change boot device order" appeared in the BIOS splash. Once the USB was detected, Slacko booted and installed quickly from it.

Next were attempts at a couple of Ubuntu based distros; Joli OS, and EasyPeasy. Both hung during auto-partitioning. Reckoning I had encountered the storied MBR/GPT conflict, I considered downloading GPTfdisk, but then I discovered an article which appeared to show how to remove the GPT manually. I processed these on both ends of the HDD, but the installs still hung at the same step.

Why was an Ubuntu installer hanging and a Slackware based installer not hanging? During installs, Ubuntu's installer script apparently relies on the POS gparted for the partitioning phase. Since Ubuntu installation screens are GUI, not CLI, gparted has no straightforward way to provide its failure information; gparted simply dies (exits) and hangs the installation. I was eventually able to guess it might be gparted only after Googling similar hangs. To verify, I exited the setup script and entered the live CD desktop. I then opened a terminal, su'ed up ("sudo passwd ubuntu", then "su") and ran gparted. Sure enough, gparted failed and exited. The failure:
Assertion (head_size <= 63) at ../../../libparted/labels/dos.c:659 in function probe_partition_for_geom() failed.
OK, the above explained why I couldn't see the failure, and why it didn't occur in Slackware, but what is this failure? Poor design, apparently. Certainly, the difference between a USB and a CDROM should be irrelevant for gparted to do its install job, but it obviously isn't. It is a nasty bug. I was only able to find one fix on my first chop at it, and that was designed for Verbatim brand USB's. I don't have a Verbatim USB. Nevertheless, cfdisk -z /dev/sdb got me partway there, and then I also formatted the USB with ext2 (mke2fs /dev/sdb1) just to be sure. I then ran UNetbootin on an EasyPeasy ISO. With this, I was able to install EasyPeasy (Ubuntu installer script) without issues. 3 lost hours.

UEFI (Unified Extensible Firmware Interface) Note:

I also booted Slacko from the USB on a 2013 laptop. For this, I found I had to enter the BIOS and disable UEFI booting prior to the USB, or even a CDROM, booting successfully.

Slacko: adding a user, logins, X-settings for user

Slacko's default GUI access is root, which makes sense for a live distro. So how to create users and which files are required for X (and Bash, etc) initilization for these users?

Create users (in this case "foo"), add them to groups, and set-up the home directory...
# mkdir /home/foo
# adduser foo
# nano /etc/group #(add foo to whatever)
# su foo
$ cp /boot/root/.bashrc /home/foo/
$ cp /boot/root/.Xdefaults /home/foo/
$ cp /boot/root/.Xresources /home/foo/
$ cp /boot/root/.fonts-cache1 /home/foo/
$ cp /boot/root/.gtkrc-2.0 /home/foo/
...then arrange for runlevels and booting logins.

First, to eliminate autologins to root, change the second line in \etc\inittab.
\etc\inittab
tty1::respawn:/sbin/getty -n -l /bin/autologinroot 38400 tty1
...to...
tty1::respawn:/sbin/getty 38400 tty1

Wednesday, April 24, 2013

CLI slackware on a 1999 laptop

Links: CNET specs   broadcom module

AmeriNote RL366C 366MHz Celeron  


In the late 1990's, CompUSA1 apparently sold a line of laptops called "AmeriNote"s. It's unclear who manufactured these for CompUSA, but the laptops did garner at least some good reviews in their day. I recently had an opportunity to salvage one in unknown condition. Current market value would be less than 50 cents, but the project seemed interesting: a 366MHz Celeron with 256Mb of 144 pin 60MHz SODIMM, 3.2 GB HDD (not bad for '99), CD-ROM drive, single USB 1.0 port, and a 12.1" 800x600 screen. The screen appeared to be without a backlight, passively lit, if that's possible. Full specs are in the link at top.

operable?

The laptop powered into BIOS OK, but did not boot; apparently it suffered corrupted HD sectors. I located a 2008 Slackware 12.1 CD and it booted with "huge.s". Bad sectors seemed about 100MB leaving sufficient space for a CLI install. First, the verification of the checksum of the old install disk however:
$ cd /media/foo/S12.2d1
$ md5sum -c CHECKSUMS.md5
md5sum: WARNING: 12 lines are improperly formatted
The warning is inconsequential since it just means whomever created the checksum file made a syntax error. Any warnings that "computed checksums did NOT match" however would have to be evaluated.

time

The on-board battery had obviously not kept-up, and was stuck in 2005. Some applications (eg. WiFi modules) will not compile if the OS date is too far removed from the dates in the source code. I fixed this based mostly on the information from this site, adding quotation marks as follows...
# date --set="Sat Apr 24 18:49:00 EST 2013"
... and sent it to the hwclock using
# hwclock --systohc --utc

user - adduser

Creating a user with "useradd" appeared the most flexible, but seemed to always lead to account expiration errors even when a directory, expiry, and so forth seemed properly initialized. After several iterations of "useradd", "usermod", and "userdel" with different option flags, eventually sampled "adduser". "Adduser" worked the first time and so seemed worth the annoying GECOS hand-holding, etc. The command is simply...
# adduser foo
Subsequent verification of the user set with # passwd -Sa ("status", "all"), and $ groups confirmed a normal scenario, including a user directory.

applications

I had a USB stick with application source --- how to get them into a user directory using CLI? I found instructions here. I varied from these slightly by using udevmonitor to detect the drive name, and by creating the mount directory (as $) under my home directory, eg /home/foo/myusb...
$ mkdir /home/foo/myusb
# udevmonitor [returned "/dev/sda1" from usb stick]
# mount -t vfat -o rw,users /dev/sda1 /home/foo/myusb
I was able to easily move files as a user. Then, prior to removing the USB stick...
$ umount /dev/sda1

network - pcmcia

The AmeriNote of course only had a built-in 56K modem. This left the PCMCIA or USB ports as possible network adapter inputs (how did we get by back in '99?). PCMCIA seemed best for WiFi: leave the USB available. For whatever reason, I had a small pile of PCMCIA WiFi cards in an old shoebox. Each was detected, but using the numbers in lspci -vn, the subassembly chips seemed to require ndiswrapper, which I wanted not to use. And peering into /lib/modules/`uname -r`/kernel/net/wireless, it seemed that, after all these years, very few native modules have emerged2. However, one of the cards was a Broadcom 4300 series. It seemed worth a try with a 32 bit driver. The source compiled without errors, but when I went to insert it, I had errors which ultimately required a kernel recompile enabling more WiFi networking features than the vanilla install. I have instructions for such recompiles in a March 2009 post. I also considered stripping down the running modules and running make localmodconfig, since that runs "lsmod" to determine the Makefile. In the end, I recompiled the Slackware 12.1 source, enabling wireless.

Before trying the Broadcom driver noted above, I checked to see if the newly compiled modules might natively drive the card. But using...
$ ls -l /dev/sys/net
...only revealed an eth0 and no wlan0. Hmmm...

1Absorbed since 2012 into TigerDirect.com
2Self-defeating firmware opacity on the part of manufacturers?

Saturday, December 22, 2012

Browser - Adobe Flash

Links: Slackware Flash update :: Opera plug-in page

Like most reasonable people, I dislike Adobe's proprietary obsfucation. It's most oppressive in the Linux environment, where its intrusive modules don't interact well with Linux's more transparent libraries.

A recent Adobe Flash update1 screwed my Iceweasel installation and, in turn, destabilized a previously 3-years' stable Zenwalk install. That is, immediately following the update of (libflashplayer.so), including complete deletion of all prior versions, etc, the previously rock-solid Iceweasel intermittently crashed at Flash intensive sites. A new installation of FlashBlock did not stop the crashes. Reinstallation of all three applications did no better. I eventually had to move to ArchLinux from Zenwalk, due to these Adobe-related Flash crashes. In other words, I had to change my entire OS structure thanks to Adobe's closed-sourced, DRM intensive elements, which are so-far impossible for average users to ignore for a typical browsing environment.

1Pop-up windows demanding Adobe Flash Player updates began to appear in sponsored YouTube videos December 2012. Prior to this update ads could be bypassed. Following the update, they could not.

Tuesday, December 20, 2011

video editing - command line

Links: Kino site

I attempted to do everything with ffmpeg, but found there were some limitations with dissolving and so on that seemed to require scripts and sort of reinventing the wheel1. Accordingly, looked at GUI's and Kino stuck out (GTK libs), but seemed to require a lot of dependencies. Nevertheless, jumped in.

dependencies

Monday, February 8, 2010

Inspiron 7000 - Linksys WPC54G w/BCM4306

Links: Discussion on 43b module   b43 module installation (doesn't work)   b43 v. ndiswrapper  b43legacy issues  ndiswrapper solution   linksys WPC54G support


This is an install I'm working on with a friend's older Inspiron 7000. We dropped Zenwalk 6.0 (Slackware light) into the system and everything configured out-of-the box, except his PCMCIA Linksys WPC54G (version 1.2) card. This entry is meant as a trail of crumbs for how we solved it.

The legacy Linkys WPC54G card employs a Broadcom 4306 chip. I've never understood the impulse behind closed-source drivers for hardware. There are millions of Linux users; if Broadcom only produces a driver for Microsoft, at least make it open-source. Linux users can then easily design a good driver. They will want to buy Broadcom-based hardware.

Since the Broadcom driver was proprietary, any drivers/modules for it needed to be reverse engineered for Linux with some predictable results. For example, the b43 module described here didn't work. The fwcutter program appeared to properly extract info from bcmwl5.sys and install it into /lib/firmware; the card was detected by the kernel and apparently was semi-configured by the b43 module; but yet the card never fully initialized. This meant it came down to either the b43legacy module or, as a last resort, to using ndiswrapper on the driver coded for MSoft by Broadcom. You know, like back in 2004. But before we capitulated to ndiswrapper or b43legacy, we wanted to try fwcutter again with a more researched approach.

environment
$ uname -r
2.6.28.7

# lspci -vnn
06:00.0 Network controller [0280]: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller [14e4:4320] (rev 03)
Subsystem: Linksys WPC54G [1737:4320]
Flags: bus master, fast devsel, latency 64, IRQ 11
Memory at 1c000000 (32-bit, non-prefetchable) [size=8K]
Capabilities: [40] Power Management version 2
Kernel driver in use: b43-pci-bridge
Kernel modules: ssb


software
Understanding from above that we're dealing with the "4320" Broadcom chip, the b43 module should have worked previously; b43 is the recommended driver for the 4320 id. I decided to recompile fwcutter, this time making sure I had version "012" of fwcutter and version 4.150.10.5 of Broadcom's proprietary driver.

$ wget http://bu3sch.de/b43/fwcutter/b43-fwcutter-012.tar.bz2
$ wget http://mirror2.openwrt.org/sources/broadcom-wl-4.150.10.5.tar.bz2


success
Untarred and compiled fwcutter -- "$ make". Didn't even have to configure. Then, after untarring the driver, put the driver files in the folder with the fwcutter program and ran:

# ./b43-fwcutter -w /lib/firmware wl_apsta_mimo.o

Rebooted and the card came right up.

Monday, March 30, 2009

slackware 12.2 - kernel recompile

Last edited: 2013/05/03
Links: slackware compile simple   good: includes LILO   full Debian   gentoo instructions w/LILO   arch instructions   kernel performance
Kernel builds are straightforward and can be done in user mode in /usr/src/[version]
$ make mrproper
$ cp /boot/config /usr/src/[version]/.config
$ make menuconfig
$ make dep
$ make bzImage (or just "make")
$ make modules
# make modules_install
Recompiles are mostly the same, but we use same source version repeatedly. That is, each recompile uses source with the same version number. That causes a modules problem.

the problem and solution

A problem with using the same version source repeatedly is that modules are installed according to kernel version numbers. The modules go into /lib/modules/[version]. We don't want modules for each recompile overwriting or mixing with the prior recompile. We want a unique directory for each build's modules. How do we do that? We could just change $MOD_INSTALL_PATH, in the Makefile. However, we also need our new kernel to be able to find its modules. A better option then, is to change $EXTRAVERSION to something unique. This will then be incorporated into $KERNELRELEASE, and everything downstream -- the module directory, and pointers to those modules within System.map --- will be properly named and installed. So, before running "make menuconfig", change the top-level $EXTRAVERSION (or occasionally "$EXTRAVER") variable in Makefile to a different suffix for each build. Before running "make", double check the Makefile for your identifier. There is also apparently an option for "local version" suffix creation within the make menuconfig process beginning with kernel 2.6.

Note: to examine the running kernel settings in a GUI without changing the settings, run "make xconfig". This displays the configuration of the booted kernel. Select "discard changes" before exiting. To do the same in an ncurses CLI interface, the command is "make menuconfig" (also discard changes when exiting).

Other - unintended effects

There's a small chance one's video drivers or other hardware will act odd with the new kernel and modules. It's therefore worthwhile to back-up the old modules in case one needs to use the old kernel. If one recompiles GLibC, it's nearly certain some applications will have to be recompiled.

Other - what is /boot/vmlinuz?

When bzImage is created in /usr/src/[version]/arch/i386/and we copy the bzImage to /boot, we change its name. The file is the same, but we change it to "vmlinuz". We also append a suffix to its file name to distinguish it from other kernels in /boot. For example, we might title it "vmlinuz-20120604" or "vmlinuz-test". We add this same suffix to the "config" and "System.map", files for that build when they are copied to /boot.

pre-compile: patches, optimizations, modules

Patches are accomplished prior to opening the configuration files; they potentially expand the kernel options with new features. To patch, put the patch in the same directory as the source, consider the level for "p" (in this example I'll use "1") and:
$ patch -p1 < patchname

For optimizing the kernel, hardware information: # lshw or # lspci. Save this to a file, and print it. For example, I have one older laptop with
    AMD Athlon(tm) X2 Dual-Core QL-60 64 bits, 1900MHz,L1 256 capacity, L2 2x512KB capacity
It appears the processor will be able to run an i686 instruction set (using amd 64 / i686). Instruction sets are backwards compatible to 386,486,586. It's also worth reading here about CFLAGS (SLKCFLAGS for Slackware) CHOST, and so on, for compilation notes, since the compilation of the kernel is just another compile. Also examine these two
$ cat /proc/cpuinfo
$ echo | gcc -dM -E - -march=native
I save march info to the lshw file. Of course, we can adjust the march to something forced, but it's valuable to start with examining what's automatically selected (by gcc).

compiling

So "vmlinuz" is simply "bzImage" renamed and copied into /boot. If we compile using the standard make install technique, the vmlinuz file in /boot will be overwritten during that step. Instead, use make (or make bzImage) without "install". Later, we'll manually copy the new kernel, "bzImage" into /boot, changing its name to, say, vmlinuz_20090312 as we do so, and preventing overwrites.
$ make mrproper
$ make menuconfig
$ make dep
$ make bzImage (or just "make")
$ make modules
# make modules_install
Kernel compilation varies depending on the processor speed and the number of cores. See "j" flag options for "make".

post-compile

Booting requires System.map and vmlinuz. And, each kernel requires its own System.map file. These both need to be in /boot. Also the ".config" file should be placed in /boot for future reference. Make them easy to locate within /boot. Eg, supposing the unique identifier for that build were "20090312", then I would move the files to /boot from /usr/src/linux/) as
# cp /arch/i386/bzImage /boot vmlinuz-20090312
# cp /usr/src/linux/System.map /boot/System.map-20090312
# cp /usr/src/.config /boot/config-20090312
# rm /boot/vmlinuz
# ln -s /boot/vmlinuz-200903312 /boot/vmlinuz

Double check kernels, System.maps, config files and proper softlinks within /boot.

LILO

If you're certain about a single kernel, a single softlink named "vmlinuz" to that kernel will work, as just described. LILO needn't be changed. However, if wanting to select between multiple kernels at boot time, LILO needs additional entries. The one we have been doing above would be added as
/etc/lilo.conf
image=/boot/vmlinuz-20090312
  label= somenameforscreen
  root= /dev/sda1
  read only
Then to update LILO:
# lilo -v

Appendix - Cleaning source

(courtesy http://linuxgazette.net/111/krishnakumar.html)

After we have initiated compilation once on the source if we want to clean the object files and other temporary files then we have to run the following:
make clean
This will remove most generated files but will keep the configuration file. If we need an absolute cleaning, i.e. if we want to return the source to the state in which it was before we started the compilation, then do a
make mrproper
This command will delete all generated files, the configuration file as well as various backup files. This will in effect unwind all the changes we made to the source. The source after this step will be as good as it was just after the download and untar.

Tuesday, February 10, 2009

toshiba l305d-s5869 - more video

Last September, I posted about picking up one of these Toshibas. At that time, the RS780 (HD3100) ATI/Radeon video chip was problematic, and may pose some additional problems. However, currently it appears the radeonhd driver has finally matured enough to supplant the proprietary fglrx driver which seemed to only provide software rendering.

links


fglrx driver
fglrx installation
radeonhd download and install
ati chip audio considerations

steps


1. Back-up the working xorg.conf in etc/X11.
2. Regardless if going forward with a newer fglrx driver, or some other driver, such as the radeonhd driver, remove the outdated fglrx driver to avoid conflicts.
# cd /usr/share/ati
# sh fglrx-uninstall.sh

3. Install git from respository or source.
4. Decide whether to install fglrx or radeonhd.
4a. fglrx driver
4b. (Radeonhd)
# git-clone git://anongit.freedesktop.org/git/xorg/driver/xf86-video-radeonhd
# cd xf86-video-radeonhd
# autogen.sh --prefix=/usr/
# make
# make install
# gtf 1280 800 60 -x (or whatever the native resolution and refresh)
# nano /etc/X11/xorg.conf

More coming, need some sleep

Friday, December 26, 2008

CUPS - usb HP DJet F300

(HP a1350e)
    Zenwalk 5.2
    2.3G Athalon X64 two part processor
    400 MB Ram
    HP Deskjet F300 (USB)

CUPS, good documentation here.

Sketchy CUPS Webtool


I was at my folks house recently for the holidays and installed Zenwalk 5.2, a Slack-based OS that's pretty light. All went well until I attempted to add a HP Deskjet F300 All-In-One. The HP website says support only begins with F310. I figured I could get a workaround going.
1. In spite of (significant) password efforts, you will likely find that the webtool athttp://localhost:631simply rejects any and all passwords, no matter what, when, or why, and will deny you adding a printer, always waiting until the final step in a timely 6-part process to do so. After a couple of lost days working with /etc/cups/cupsd.conf and password, this of course will become ballistically frustrating. The temptation to sledge-hammer the computer will become more pronounced as one realizes the rejection of the CUPS webtool means the printer must be added manually using lpadmin and, like any CLI, it is powerful and simultaneously filled with the potential for damaging errors. One can easily spend days. But what are you going to do - you have to print, right?
2. The ppd file has to be locatable by lpadmin. Put the ones which need to be found in /usr/share/cups/model/ . I renamed the original ppd to dj350.ppd. for ease of loading and made sure it was the proper permission for ppd files "644". Now try this:
#lpadmin -p HP300 -E -v usb:/dev/usb/lp0 -m dj350.ppd 
The printer added easily. If a mistake is made and a PPD file is installed that you later want to substitute with a different PPD file, put the new file in /usr/share/cups/model/ and run the following command:
#lpadmin -p HP300 –P another.ppd
To delete a printer entirely, use the command:
#lpadmin -x HP300
To make certain, you can always check the list of installed printers using:
#lpstat -v



Day 2 (Afternoon/Evening) More lpadmin and configuration files


It may be possible, though unlikely, to work via CUPS web interface. If not, look at the file /etc/cups/printers.conf and note its arrangement. Pay particular attention to this line.
DeviceURI usb://dev/usb/lp0
This critical printer setting must be accurate.

test prints


Test prints are one easy thing from the CUPS web interface; although lpadmin is required to stop testprints, the CUPS interface is an easy way to initiate them. While testing the printer configs, many test prints might be desired. If they don't print, they pile-up in queue and use resources re-attempting. One can't use CUPS web interface to stop prints, so cancel them from lpadmin:
#lpstat -o
provides pending print jobs and the job number eg, "HP1100-1". Then
#cancel HP1100-1
will get rid of the job. Run "lpstat -o" again to verify, if you like.

xfce4 connection


To print from Mousepad and others that use X-settings, xfce printing needs to recognize the CUPS printer. Try printing in Mousepad and see if the CUPS printer is available. If not, configuring xfce4 to CUPS will be necessary. This was simple for me. I simply went to the XFCE menu, then access Settings ->Settings Manager -> Printing System. Once in Printing System, I selected the CUPS network printer and closed the menu. I then opened a Mouspad file to print; sure enough, the CUPS printer appeared in my options.

SNMP HPLIP


SNMP (Simple Network Management Protocol) is a powerful process originally designed to simplify web management. Many processes take advantage of SNMP functionality and one of them is HPLIP

If hp-setup doesn't work, then the road may be long. Try using SNMP to determine if the kernel can see the printer at the nework address:
snmpwalk -Os -c public -v 1 ip.address.of.printer 1.3.6.1.4.1.11.2.3.9.1.1.7.0 

Per this site HP tshoot, the response should be something which shows the manufacturer, or SNMP may not be installed correctly. This means working with the /etc/snmp/snmpd.conf file.

Thursday, November 13, 2008

slackware 12.0 - wpa, wicd

I'm using the Atheros AR242x 64 (5007 chipset) in a Toshiba Satellite running Zenwalk 5.2. So, this is not technically a Slackware 12.0 post - the Slackware foundation of Zenwalk means they are similar. I'll edit the specifically Slackware aspects of this post over Christmas break. For Zenwalk WPA, I mostly followed these excellent instructions .

Atheros AR242x 64 (5007 chipset)
The information here was helpful for understanding this newer chip. For a module, Zenwalk provides ath5k, but ath5k wasn't responding well to configuration attempts, so I turned to a Madwifi module. Incidentally, the Madwifi site also contains information on ath5k here, and it appears the ath5k module will eventually be effective. Currently however, the steps which worked with the Madwifi module were:

1. in /etc/modprobe.d/blacklist, blacklist the "ath5k" module
2. reboot and lsmod - make sure ath5k is gone
3. download madwifi-hal-0.10.5.6-r3861-20080903.tar.gz , or the newest one there, make, and install.
4. reboot again and lsmod
5. iwconfig ath0

WEP
WEP is trivial, merely requiring the two iwconfig commands "essid" and "key restricted", matched to whatever network I was using. Because I'm multihomed, the order of bringing-up the interfaces was the only other pay-attention issue. If the interfaces are activated backwards in /etc/rc.d/rc.local, then dhcpcd apparently attempt to assign DNS to the interface on the LAN, rather than the one on the WLAN. blah blah blah.

WPA
The basis here was again gained at this Zenwalk wiki , but there are a couple of tweaks or clarifications. It appears that wpa_supplicant relies upon inserting the wext module into the kernel.
1. using wpa_passphrase with the [essid] and [password] varies with the WLAN with which one wants to connect. The command is used similarly to the WEP iwconfig ath0 key restricted "xxxxx", which varies with each WLAN. Wpa_password then, is not a key for the laptop I'm working from, it's a password key hashed for the WLAN I'm attempting to connect with. This means I have a different entry for each WPA WLAN I'm working on.
2. wpa_password [essid] [password] > /etc/wpa_supplicant.conf is a brilliant way to start the initial conf file. And, as noted in the wiki, the file can be this simple to work:

network={
ssid="BART Transit"
#psk="oct2008@rezt9bit"
psk=3ad964f16045787dec86a4730e9dec4bedaa9e24f2998eacfa363e80510e3393
key_mgmt=WPA-PSK
proto=WPA
}
3. The following command line from the wiki configured ath0 properly on the first shot:
wpa_supplicant -i wlan0 -D wext -c /etc/wpa_supplicant.conf -B
the "-B" switch is added to make the program run as a daemon, and might not be necessary.
4. After the above, I had only to dhcpcd ath0 to get a valid connection.
5. One issue appears to be quickly enabling or disabling configurations for different WLANs via /etc/wpa_supplicant.conf. (see wicd below).
6. Permanence/boot - inserting the line in Step 3 above into an /etc/rc.local should work if I have an /etc/wpa_supplicant.conf file with a single network configuration in it.

more wpa_supplicant.conf
Wpa_supplicant is not necessary for WEP security, since we can program the card directly with CLI commands to prepare WEP. However, if one chooses to run wpa_supplicant for everything, /etc/wpa_supplicant.conf files appear able to configure WEP and unencrypted connections, in addition to WPA connections. The conf files are useful for storing various wi-fi location configurations. Each connection requires a different conf file, eg etc.wpa_supplicant1.conf, etc.wpa_supplicant2.conf, etc. Apparently wicd can do this with a gui interface which manages switching. But this also means the wicd daemon must run - additional memory usage.

A site with the wpa_supplicant.conf commands is this one, and a site that shows the different WLAN setups in the "conf" file is here (scroll down).

wicd
Wicd configuration files live in /etc/wicd/encryption/templates. A primer for converting wpa_supplicant.conf files to wicd configurations is at this site. Once the various templates are in place, it appears we can switch between them using the wicd gui, though it's unclear if dhcpcd would need to be killed and restarted in the command line?

Sunday, October 26, 2008

Audio - SiS966 (Realtek ALC660-VD) Drama

A strange case appeared recently that might be helpful to someone. I updated ALSA on an SiS966 card and the sound died. Alsamixer was unmuted, etc, proc shows the card as a single unit with a single interrupt:
$ cat /proc/asound/cards
0 [SIS966 ]: HDA-Intel - HDA SIS966
HDA SIS966 at 0xfbfe8000 irq 22

Aplay shows more information about the card.

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: SIS966 [HDA SIS966], device 0: ALC660-VD Analog [ALC660-VD Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: SIS966 [HDA SIS966], device 1: ALC660-VD Digital [ALC660-VD Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
So it appeared hw=0.0 was the analog card, and hw=0,1 was the digital version. If followed that, for the analog portion...
$ cat /proc/asound/card0/pcm0p/info
card: 0
device: 0
subdevice: 0
stream: PLAYBACK
id: ALC660-VD Analog
name: ALC660-VD Analog
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
....and for the digital portion...
$ cat /proc/asound/card0/pcm1p/info
card: 0
device: 1
subdevice: 0
stream: PLAYBACK
id: ALC660-VD Digital
name: ALC660-VD Digital
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
Why no sound when levels are tested in alsamixer? I took a look at a reliable page alsa-hw that has helped me in the past. From here, I checked to see which of the cards was default:
$ aplay -L
default:CARD=SIS966
HDA SIS966, ALC660-VD Analog
Default Audio Device
front:CARD=SIS966,DEV=0
HDA SIS966, ALC660-VD Analog
Front speakers
surround40:CARD=SIS966,DEV=0
HDA SIS966, ALC660-VD Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=SIS966,DEV=0
HDA SIS966, ALC660-VD Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=SIS966,DEV=0
HDA SIS966, ALC660-VD Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=SIS966,DEV=0
HDA SIS966, ALC660-VD Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=SIS966,DEV=0
HDA SIS966, ALC660-VD Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
null
So it's clear the analog portion of the card is the default. Can we hear anything from the digital portion of the card?
$ aplay -D hw:0,1 alsatest.wav
Playing WAVE 'alsatest.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
No sound here on the digital, what about the analog...
$ aplay -D hw:0,0 alsatest.wav
Playing WAVE 'alsatest.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
...and here I have sound. Apparently the analog portion only will be available.
testing
To check microphone settings, a nice way to check the levels is to open two terminals. Record a couple minutes using arecord in one terminal and use the alsamixer in the other window to vary levels until it works.
$ arecord -d 60 -f cd -t wav -D hw:0,0 foobar.wav
This will record for 60 seconds, but we can change the number of seconds to any value we wish. I call out the changes into the microphone as I make them. To play foobar.wav and check the various settings, we just
$ aplay -D hw:0,0 foobar.wav
After the settings are correct, don't forget
# alsactl store

Saturday, September 27, 2008

zenwalk 5.2 in Toshiba Satellite (L305D-S5869)

2022 update

The original post from 2008 is at the bottom, but I just couldn't help wanting this dinosaur alive. NB: You must get the replacement battery for the model S5869 which is 11.1 VDC, not the 10.8 VDC of most replacements. I could not get the laptop to boot with a 10.8VDC battery.

battery and sdd

  • $0 CMOS battery: run down, but I don't have an adjustable soldering iron right now, so I installed ntp and ran
    # ntpdate pool.ntp.org
    right after connecting to my local router
  • $19 battery: an inexpensive Chinese "TA3533LH" Li-Ion, 5200mAh, 6 cell. However, when I received it, it was for the
  • $15 hdd -> ssd: I'd read somewhere that SATAIII was backwards compatible with SATAI and II, so I simply bought a new drive and moved stuff over.
  • $0 OS: The latest version of Arch worked fine with the old hardware.

From 2008

These were on-sale recently (9/25) at Fry's and seemed like a good deal although it's understood the Linux factor might be difficult with ATI video and so on. Still for $400:

15.4 WXGA
AMD Athlon 64 X2 Dual Core
1024 MB PC6400 SDRAM
Radeon 3100HD (RS780) w/VGA out
Atheros AR5007EG (wifi)
Realtek RTL8102E (ethernet)
Realtek ALC268 (sound)
120GB 5400 RPM SATA 2.5"
DVD RW, PCMCIA, SD port
3xUSB 2.0
No bluetooth or videocamera

Booted into pre-installed Windows Vista first. The return policy is 15 days for laptops and specifies software and hardware must remain unmodified. After verification of hardware features, I blew out the unbelievably bloaty factory load, dropped in a boot disk, formatted, and mke2fs /dev/sda1. Nice.

Slackware 12.0


I had a Slack 12.0 DVD gathering dust available and Slackware is my favorite. However, errors appeared on installation and it seemed an extensive parameter set was required to tame them:
#boot nosmp noapic irqpoll
To me, these problems meant that, if I continued with the Slack install on the newer hardware, I might be compiling and patching over the weekend, or that I should download and burn Slack 12.1 and begin there. I also had a copy of Slackware-based Zenwalk (formerly Minislack) 5.2 which possessed a newer kernel and a supposedly candy-coated installation process. Choices.

Zenwalk 5.2


Installed smoothly with only irqpoll needed as a parameter.

Atheros AR242x 64 (5007 chipset)
The instructions here were helpful for understanding this newer card. Zenwalk provides ath5k, but it wasn't going well. The Madwifi site has information on ath5k here, and it appears the ath5k module will eventually be effective. Currently however, the steps which worked were:

1. in /etc/modprobe.d/blacklist, blacklist the "ath5k" module
2. reboot and lsmod - make sure the ath5k is gone
3. download madwifi-hal-0.10.5.6-r3861-20080903.tar.gz , or the newest one there, make, and install.
4. reboot again and lsmod
5. iwconfig ath0

WEP and WPA
WEP is trivial, merely need the two iwconfig commands "essid" and "key restricted" to make it work. WPA, on the other hand, is a separate post. It only took 10 minutes to configure, but the description is too long for this overview. If one has a distro which requires kernel modification for WPA, the process becomes longer. This site seems to explain it t I'm also currently building a chart for easier understanding based on this site.

screen brightness and gamma
The default settings for screen brightness and backlighting install maxed at 100%, and the Fn buttons don't seem to work except in Windows - battery life, screen life, eyestrain. Without going into X, one has command-line control over the brightness. Look in /proc/acpi/video/VGA/LCD/brightness to see the possible brightness settings for the card, such as 25, 50, 75%, and so on. I like 25%, so:
#echo -n 25 > /proc/acpi/video/VGA/LCD/brightness
It appears we cannot change the backlighting outside of X, though I haven't researched. Once in X however, open a terminal and select any number between 0.00 and 1.0 for gamma, eg:
xgamma -gamma 0.75

Realtek ALC268 Sound
Some duplicate alsamixer settings were seen. For example, alsamixer showed two microphone capture bars when only one channel was connected. I went to the Realtek downloads site, clicked a link there to the "HD Audio Codec Driver", and agreed to licensing language. After download and unpacking, it turned out this was the latest release of ALSA, so it basically installs the latest ALSA, but apparently with a newer HD driver. The alsamixer showed proper inputs following this ALSA update. and so, after setting levels, it was time for # alsactl store.

Radeon 3100HD RS780MC
Initially, Zenwalk loaded the vesa driver in /etc/xorg.conf, providing resolutions of 800x600. Common sense and #gtf seemed to indicate higher resolutions were available. In /etc/xorg.conf, I replaced "vesa" with, alternately, "ati", "radeon", and "radeonhd"; these did nothing but break X. I then relented for the proprietary driver "fglrx" described on most blogs as bloaty and slow, but operational. The driver was avialable here by selecting the Linux x86_64 -> Radeon -> ATI Radeon HD 3xxx Series and pressing "go". One note about installing this - I received checksum errors when I attemped to install it with #. ati*; I had to explicitly invoke bash #bash ati*. However, following this installation, I simply replaced "vesa" with "fglrx" in the Device section of /etc/X11/xorg.conf, rebooted, and everything worked. With the vesa-fglrx swap, the /etc/X11/xorg.conf file looks like this:
Section "Device"
Identifier "Videocard1"
VendorName "ATI Technologies Inc"
BoardName "Video device"
Driver "fglrx"
BusID "PCI:1:5:0"
Option "RenderAccel" "true"
EndSection
Adjustments to the fglrx module "Options" can come some other weekend; resolution and display appear sharp currently.

additional fglrx considerations for the Radeon 3100HD R5780MC
The fglrx driver, although supplied by Radeon, does appear to have significant Googleland complaints for slowness. For me, it renders well, but very slowly: I'm experience update lines even scrolling through a simple text page on Mousepad, etc. So, it appears something either a)very inefficient, or b)very underpowered, is taking place in terms of memory usage with the fglrx driver. From Google, it appears there are a few things to investigate: 1) does flglrx load as a module? (lsmod |grep fglrx). Mine does not appear in lsmod, and this apparently means xorg.conf loads a substandard fglrx_drv.ko module. Lsmod failed to locate this module either. Odd. 2) Settings in /etc/X11/xorg.conf for the fglrx driver, under "Options" may be important. 3)Settings (don't know syntax or location) for whether the ATI card uses SIDEPORT mode (card uses its own memory),UMA mode (card shares system memory), or another unnamed mode where it uses a mix of SIDEPORT and UMA. One thing for sure, a lifesaver in these forum boards is fglrxinfo or fglrxinfo -v:
# fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: Mesa project: www.mesa3d.org
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.4 (2.1 Mesa 7.0.3)

glxinfo is also important. On my system, glx is not enabled, though this may be a different problem than the overall slowness of screen panning and scrolling that I'm experiencing. A good forum thread for these issues is here, not for solutions but for the many aspects of the problem.

netpkg repos
Each time zenwalk is released, the repositories update to the most current release so that, if one needs a certain package, they generally have to update the rest of their system to be in sync with it. Suppose I like my release and just want to keep it into perpetuity. As long as 1) I have the installation disk 2) have netpkg'ed all the programs from that release I want (they download to /var/packages), and 3) have downloaded a copy of PACKAGES.TXT.gz, I can point netpkg to /var/packages and use the older release. A couple of simple modifications are required with two configuration files since netpkg doesn't inherently recognize URLs of the type "file:///". This link describes the changes to the two files, /usr/libexec/netpkg-functions and /etc/netpkg.config files, which I repeat here.
  • /usr/libexec/netpkg-functions, at or about line 144:


  • if [ $( echo "$url" | egrep -e "ftp:.*|http:.*|file:.*" ) ]; then
  • ...at or about line 205:


  • if [ ! "$(echo $mirror | egrep 'http://|ftp://|file://')" ] ; then
  • /etc/netpkg.conf add another line such as


  • Internet_mirror = file:///var/packages
    Put a copy of PACKAGES.TXT.gz into /var/packages, and you've got a self-contained distribution.

    unsolved: multiple instantiation of mplayer, thunar, etc
    Perhaps because of multiple processors, there's currently a problem when using DVD's. Multiple instances of related applications appear, eg 2 x MPlayer or 2 x Thunar. Working around this by disabling automatic HAL events for the time being. Manually opening one instance of the application for now.

    Friday, September 5, 2008

    Slackware 12.0 - Wine Install

    It appears Slackware doesn't include Wine. In early September of 2008, there was a dedicated Wine package available for Slack 10.1 here, but this package made for 10.1, may not have worked with the 2.6.21.5 kernel in Slack 12.0. I thought it best to go with source and compile. The latest Wine package download info is typically found at this portion of the WineHq site. I selected the latest release, which was Wine 1.1.4 in early September 2008.

    dependencies

    Dependencies are supposed to be the bane of installing Wine. I was unable to locate a dependency list at the WineHQ site to preempt vigilance with configure. Nevertheless, it seemed it would be easy to watch configure, note misses, download and install them, and then re-run configure. It seemed that easy.

    I untarred the package and proceeded to the first run of configure, Several apparent problems which didn't appear to be dependency problems displayed as configure scrolled its checks. These scrolling messages seemed to indicate various audio features were unavailable. Here's a few of hundreds that appeared:
    checking machine/soundcard.h usability... no
    checking machine/soundcard.h presence... no
    checking for machine/soundcard.h... no
    When configure finished its run, it also provided a message which may have been dependency related:
    configure: libcapi20 development files not found, ISDN will not be supported.

    Additionally, I looked in /include/config.h to check further for missing dependencies. All told, I didn't think I'd need the audio stuff that was scrolling or the ISDN support the message indicated, so I went to the remaining standard installation steps:
    $ ./configure
    $ make depend
    $ make
    # make install
    These steps seemed to go well, though in the back of my mind I was a feeling my dependency laziness might bite me later.

    configuration


    After installation, I began with $ winecfg and received another apparent error message:
    $ winecfg
    wine: created the configuration directory '/home/doofus/.wine'
    Could not load Mozilla. HTML rendering will be disabled.
    wine: configuration in '/home/doofus/.wine' has been updated.
    Not sure what this meant either, but I kept going, unzipping and installing a Windows gradekeeper program. It started without any problems. So far, so good, though I may yet find that these HTML and audio messages provide some limitations.

    Saturday, August 23, 2008

    FAIL: Slackware 12.0 - NFS, NAS, rsync

    Links:

    I created an NFS Ethernet with a 4 port router. One of the ports went to a NAS, another to a printer, a third to my desktop and fourth was left free. The point was a LAN which allowed me to use the NAS as a central synch point, something like a cloud server. First, I would synch with my desktop, secondly, when I arrived home with a work laptop, I could plug it into the open router port and synch that also.

    NFS was because it's an older service built upon Sun's RPC services -- it's tried and true. Additionally, my systems currently are Linux systems, so why add security and memory problems with SMB or Samba? Ultimately however, I was defeated by a sh*tty NAS enclosure.

    Vantec LX NAS (NST-375LX-BK)

    I purchased a Vantec NAS enclosure and ran into problems immediately, probably because I didn't research the product in advance. Thinking it would work generically, I installed a dormant 350GB PATA drive into the Vantec. The enclosure has USB and Ethernet ports, but it appears Vantec's brilliant designers made the Ethernet firmware Microsoft protocol exclusive. This meant it was not native NFS and would instead require SMB (Samba). I was faced with installing Windows compatible Samba garbage or using the USB connection. In addition to no network compatibility (except samba), USB speeds are similar to molasses. What a load of crap. For those who want to jeopardize your box w/Samba, here is a forum link with the info of what to do.


    Edit: the power conditioning in this box is just a voltage regulator chip; even normal line transients will change power to the enclosed HDD and possibly zorch the data. After I gave up on this box as a NAS, I used it as an external back-up and lost about 100G of data, some of it irreplaceable, eg family photos. I now use only USB powered externals.

    politics


    A short digression for a rant. Following my above situation, I looked for other options. There is a hideous lack of home-user NAS enclosures running NFS in the US consumer marketplace. In the US, to purchase a NAS that works with NFS one must spend at business levels, about $1000. Interestingly, if one only needs a Windows enclosure, the cost is perhaps $400. Meanwhile, there are many options for inexpensive NFS-serving NAS enclosures in foreign markets, such as the UK. These foreign markets don't require Windows or Samba, so why is NFS so shut-out in the US? Especially when it's understood that Windows and Samba have security vulnerabilities. One has to ask themselves what marketplace and/or government influences would lead to such a situation. Interesting.

    NFS, RPC, portmap


    Without an NFS box, let's still take a look at what I would have done, if I'd had one. As noted above, NFS lies on top of RPC services. RPC ports are not dedicated, they move around, so we need port mapper as a connection tracker. The portion of NFS which sends commands and acknowledgments between server and client is a normal dedicated port "file" (ports are files in UNIX), port 2049. But NFS uses undedicated RPC ports to move the data payloads, eg. the powerpoint files, the text files, whatever we are moving. The portmap application is necessary for this portion of the transfer. If portmap crashes, data may be lost or unsaved. To see what ports portmap is currently tracking, use, eg...
    $ rpcinfo -p

    RPC functionality


    This tutorial is a good start to setting up the RPC functionality necessary for NFS.
    1. The presence of /etc/hosts.allow and /etc/hosts.deny.

    portmapper functionality



    NFS functionality


    1. In function, I've seen that domains have to be the same across the machines. For example, let's say one machine's /etc/HOSTNAME indicates "green.example.net", and another machine on the same LAN has "blue.example.net". This makes the situation very difficult.

    NFS from command line


    NFS is essentially a mount, but remote - we mount a drive, or folders from a drive, from another system on the LAN, and it appears as a drive on our current system, though labeled so we know it's an NFS share. We can mount temporarily from command line or make it permanent as part of the boot process.

    NFS as an fstab line



    NFS directory mounting



    security

    NFS requires various ports. The system should be operating smoothly before attempting to add firewall functionality because ports may be affected from the firewall rules. If anything goes wrong, we will know that it was on the firewall side, and not our NFS configuration.

    Thursday, August 21, 2008

    Slackware 12.0 - Dual Homed


    Challenges can arise when a wifi NIC is handling wifi internet access and, in the same computer or "host", an ethernet NIC is operating in a wired LAN (eg, with a printer and backup storage). Since the host exists in two different LANs simultaneously, it is "dual homed". Obviously, two LANS means two routers.

    gateway vs. dhcpcd


    Check email at Yahoo. The host PC makes this request to Yahoo and Yahoo is outside the host's network, so it needs to use the gateway and the name servers outside the gateway. But when interfaces are being initialized at boot, the dhcp application, dhcpcd, overwrites the /etc/resolve.conf file that shows the IP addresses of these nameservers. So, if we bring the eth0 connection up after the wlan0 connection, our nameservers will be overwritten. To avoid this we do all these things:
    /etc/rc.d/rc.local
    ifconfig eth0 down
    ifconfig wlan0 up
    dhcpcd wlan0
    sleep 3
    route
    sleep 5
    route del -net 169.254.0.0 netmask 255.255.0.0 dev wlan0
    ifconfig eth0 up
    sleep 3
    dhcpcd -R eth0 #-R prevents resolv.conf overwrite
    sleep 3

    Sometimes,(rare) I have a "UG" default gateway for both wlan0 and eth0 even after these steps. I then remove the extra gateway at the command line:
    route del default eth0
    A quick verification with "route" shows me the second gateway is gone.
    Also there are these files...

    loading order


    rc.inet1 reads rc.inet1.conf and loads rc.wireless which reads rc.wireless.conf when loading. I don't worry about the rc.wireless.conf, but, in rc.inet1.conf I look for the default gateway line and I change it from "" to the IP of the gateway router.

    security


    The final step. We want to be sure everything is running before we lock down ports.

    Wednesday, August 20, 2008

    Slackware 12.0 - SiS190 eth0 module

    Links: sis191 instructions

    symptoms


    I connect a hard-wire Cat5 cable from my box (integrated SiS190 NIC) to a known-good Cisco router. Dhcpcd times-out and assigns a default IPV4LL address, eg 169.254.126.11. The network is unreachable. Is it the cable, the router, the NIC, router firmware, OS software?

    Unfortunately for my weekend, several hours pass narrowing the options. Eventually, it appears the insertable module for the NIC is from 5/2007 and does nothing. Isn't that nice? The process is explained relatively well here.

    Kernel recompiling was required. Since I had no Net on this box, I had to download kernel source on another box and sneaker-net it to the box with SiS191.

    Tuesday, August 19, 2008

    Slackware 12.0 - Safety Part 1: expectations

    high expectations, low knowledge, under-equipped


    We typical home pc users combine our computer security system, end-user applications, and our critical data into a single box. Further, we design this arrangement without IT or programming experience. How effective do you believe such a security arrangement is likely to be?

    Accordingly, seen in security terms, our home computer systems are an "opportunity". In large organizations, well-paid IT professionals design layers of dedicated security systems to protect workstation computer networks and data is backed up and retained elsewhere. Since we don't have that option, let's at least think about our configuration.

    situational awareness - threats


    Given that our home systems present opportunities, are there threats which seek to take advantage of them? First, it appears one may assume governments, US or otherwise, can easily penetrate our leaky home systems, and perhaps they do so regularly. It's also likely a large number of civilian entities penetrate our home computer systems. Given the opportunity and the threat, and our typical lack of resources to build a $3-5K layered and ported system, about all we can do is make ourselves a less inviting target than other home machines out there. Let's suppose here we're going to make the effort, where do we begin?

    step one - no security


    Linux security features sometimes function like shells around processes, sometimes around files, sometimes around ports, sometimes around data streams, sometimes around other things. The security system is complex. The dedicated security servers of the corporate world do this more easily since they operate with firmware or static-linked libraries and have no other applications or data to interfere. But we want applications and data on our home systems. This means we're bound to have permission or authentication problems when we configure complex security functions around desktop applications and web interfaces. Accordingly, I have one rule for a home system prior to activating iptables.chains,tripwire,ssh, really any security function - the system has to work exactly the way it's supposed to work before the security is implemented, and hopefully before it's connected to any network. If we don't have desktop functionality first, is the permission problem we see when activating security related to the security configuration or is it due to the user configuration? We have no way to cut the problem in half. Alternatively, we could bring up our security half before the desktop operations half, but this means we would have to estimate user applications in advance. So the first step of (home) security is to configure the desktop system to run reliably, including all it's peripherals of printers, scanners, cameras, audio inputs, and so on. Subsequently, we will activate our security and the net packages together, and adjust the mix when a desktop application ceases to work due to security layers. Ideally, we should test system applications after adding each security layer.

    Monday, August 18, 2008

    Slackware 12.0 - CUPS network printer

    Here's how CUPS worked-out on a couple different systems connected to a wired ethernet LAN, with a printer attached to the same LAN, and wifi access to the Web on each box (dual-homed boxes).

    slackware 12.0 - huge.s kernel patched for non-smp
    500 MHz PIII
    500 MB Ram
    --printer--
    HP1100 LaserJet
    Netgear PS 101 MiniServer
    Linksys BEFSR41 10/100 router
    RTL8139 type card

    What works: install


    For most of us, the CUPS webtool at  http://localhost:631
    simply never works. Not only this, but it waits until the final step in a timely 6-part process to note the failure. For me, it feels more efficient to add printers manually. Perhaps some day all the permissions will align with the stars and CUPS will work. At any rate, there is no limit to the number of printers we can manually add to our workstation.

    Lpadmin is the command, but first prepare the printspace:
    • add print group ("lp", in many cases) to the groups for users I want to have print access. Users who are not in lp or whatever, can notprint or cancel print jobs without rooting-up.
    • decide which ppd to use with the printer.
    With these two accomplished, try to add the printer:
    # lpadmin -p HP1100 -E -v socket://192.168.1.101/printer -m hpijs.ppd
    This may return the error that the hpijs ppd file, in this case hpijs.ppd, cannot be copied. Ppd's need to be in the correct format (uncompressed ppd) and directory (/usr/share/cups/model) if lpadmin is to find them and add them.

    Foomatic hides and zips their ppds. I finally located them in /usr/share/cups/model/foomatic-ppds/HP. The one I needed was HP-LaserJet1100.ppd.gz. I copied this file into /usr/share/cups/model , unzipped it: "gzip -d HP*", and renamed it hp1100.ppd for ease of loading. Then I ran:
    # lpadmin -p HP1100 -E -v socket://192.168.1.101/printer -m hp1100.ppd
    The printer was successfully added to the system. Suppose, however, I wanted to try several .ppd files to determine the one with the clearest print and functionality? Ppd files can easily be added and deleted. Simply copy the new .ppd file (let's call this new one eg, another.ppd) into /usr/share/cups/model/ and run:
    # lpadmin -p HP1100 -P another.ppd


    What works: configuration


    Ideally again, one should be able to use the CUPS webtool at  http://localhost:631 for configuration, just as we were supposed to be able to add printers with it. If the web interface is working, use it. If not part two of our work will be to modify the file /etc/cups/printers.conf with the right settings and restart the CUPS server so it reads the file. In /etc/cups/printers.conf one line has different possible structures depending on how the printer is attached. Let's say we've named our device "printername", some possibilities are:
    DeviceURI socket://ip.address/printername #LAN
    DeviceURI socket://ip.address:ps101name #LAN version2
    DeviceURI parallel:/dev/lp0 #parallel port
    DeviceURI usb:/dev/usb/lp0 #usb port

    I experimented until I determined the correct one for the physical connection which, in my case, was on a LAN. I looked in my router and found my printserver received DHCP at 192.168.1.101.
    I navigated there (http://192.168.1.101) in Firefox, and found a GUI interface which allowed me to rename the printserver to any name I desired, but decided to leave it PS101. Accordingly, the successful syntax for my DeviceURI was this one:
    DeviceURI socket://192.168.1.101/PS101
    and my final working configuration file went like this:
    /etc/cups/printers.conf
    # Printer configuration file for CUPS v1.3.7
    # Written by cupsd on 2008-12-01 04:19
    <DefaultPrinter HP1100>
    Info HP1100
    DeviceURI socket://192.168.1.101/PS101
    State Idle
    StateTime 1228132708
    Accepting Yes
    Shared Yes
    JobSheets none none
    QuotaPeriod 0
    PageLimit 0
    KLimit 0
    OpPolicy default
    ErrorPolicy stop-printer
    </Printer>

    After all this, I ran
    # service restart cups
    in order for CUPS to re-read the /etc/cups/printers.conf file with the new information. I was able to print from all programs.

    test prints


    While testing printer ppd's, I ran a lot of test prints. Some worked, but the ones that didn't print piled-up in the queue, and the CUPS interface at http://localhost:631 would never allow me to delete jobs. CLI solution to delete print jobs, (assuming CUPS is running, there is no "lpstat" w/out CUPS):
    # lpstat -o
    provides pending print jobs and the job number eg, "HP1100-1". Then
    # cancel HP1100-1
    will get rid of the job. Run "lpstat -o" again to verify, if you like.
    # lpstat -v [list of installed printers]
    # lpstat -d [names default printer, also can specify using this]



    xfce4 note


    To print from Mousepad and others that use X-settings, xfce printing needs to recognize the CUPS printer. Try printing in Mousepad and see if the CUPS printer is available. If not, configuring xfce4 to CUPS will be necessary. This was simple for me. I simply went to the XFCE menu, then access Settings ->Settings Manager -> Printing System. Once in Printing System, I selected the CUPS network printer and closed the menu. I then opened a Mouspad file to print; sure enough, the CUPS printer appeared in my options.

    What is supposed to work (as opposed to all of the above)


    First, good CUPS documentation here.
    Essentially, one should be able to navigate to CUPS at  http://localhost:631 with Firefox and add printers, manage the print queue, or do other config changes. I never could get the parts to sync enough to add a printer, let alone administer them. Some considerations:
    • GUI authentication: CUPS apparently relies on PAM, Slackware does not provide PAM?
    • parallel: HPLIP is supposedly needed for support if using a parallel port, but not for network printer. I could not get HPLIP to see the parallel port on the legacy system
    • parallel: snmp might be a factor
    In the name of gleaning understanding and advancing progress from previously attempted approaches or, at least, of not duplicating effort,here were some initial directions:
    1. configure network and verify dhcp assigned print server and slackbox IP's. Let's call these IP's as follows:
      192.168.1.101 - Print Server 192.168.1.102 - Slackbox

    2. check /etc/rc.d/ - verify rc.cups (and rc.hplip, if it were needed) are 755.
    3. is printer plugged in? PS101 plugged in?
    4. Firefox to http://912.168.1.101. Blue admin page. Change or leave the name of the PS101, but be sure to write it down - you will need it later in your /etc/cups/printers.conf file. Print a test page to see that the server is talking to the printer properly.
    5. Firefox to http://localhost:631 CUPS admin interface. Make sure it comes up.
    6. Check that tcp and udp ports 161,162, and 9100 are not locked-down.

    CUPS Webtool notes http://localhost:631


    1. Try adding the printer with the CUPS webtool. It likely will wait until the (frustratingly) last step in the process and reject your password. Since CUPS uses PAM for password authentication and Slackware doesn't use PAM, I made many many many attempts at editing the /etc/cups/cupsd.conf file to eliminate the password requirement, but it always prompted me for a password in the CUPS webtool. According to the information at this slack site here is how one should proceed:
    A. Lets say your name is "doofus" and you declared your SystemGroup in cupsd.conf as "wheel":
    lppasswd -g wheel -a doofus
    B. Check to be certain:
    # cat /etc/cups/passwd.md5 doofus:wheel:01234567890abcde1234567890abcde12
    C. Now restart CUPS and go back to the webtool in Firefox and add the printer:
    #/etc/rc.d/rc.cups restart
    I never got it to work; the password was always rejected and I could never add a printer.

    SNMP HPLIP


    SNMP (Simple Network Management Protocol) is a powerful process originally designed to simplify web management. Many processes take advantage of SNMP functionality and one of them is HPLIP

    If hp-setup doesn't work, then the road may be long. Try using SNMP to determine if the kernel can see the printer at the nework address:
    snmpwalk -Os -c public -v 1 ip.address.of.printer 1.3.6.1.4.1.11.2.3.9.1.1.7.0
    Per this site HP tshoot, the response should be something which shows the manufacturer,or SNMP may not be installed correctly. This means working with the /etc/snmp/snmpd.conf file.

    Slackware 12.0 - install 1

    Intro


    Moving from Debian and Debian-based hybrids (eg. Ubuntu) means a different initialization configuration. For me, this was for the better: the straightforward /etc/rc.d layout in Slack (and its hybrids - eg. Zenwalk) is clean and almost intuitive. Another bonus was learning that Slackware doesn't use PAM. Let's look at Slack 12.0 install.

    Older Machines


    1. boot with non-smp kernel big.s
    2. cfdisk, mke2fs, and mkswap per taste.
    3."setup"
    4. activate disks, including swapon. Skip formatting (done in #2)
    5. install from CD's or DVD but don't configure the network
    6. reboot, run the patch for non-smp.
    7. add group 1000 and user 1000, do a genfstab, etc.
    8. reboot, login, and further configure users, groups, fstab, inittab, profile, visudo, modules, other initialization.
    9. build nvidia drivers if necessary
    10. build wifi drivers if necessary (madwifi, ndiswrapper, other)
    11. a second look at modules to /etc/rc.d/rc.modules and any associated commands to /etc/rc.d/rc.local
    12. reboot, check dmesg -tail, verify wifi or eth0 (eg. with "route"). To make permanent see here. If box is dual-homed, alter network files appropriately.
    13. download and configure xorg.conf or copy premade to /etc/X11/
    14. copy /etc/X11/xinit/xinitrc to ~.xinitrc and add desired Windows Manager line at end, eg exec dbus-launch twm
    15. reboot, attempt $ startx and tune.

    Wireless

    No need to download and compile a driver module if one came with distro: Check here:
    ls /lib/modules/2.6.23.12/kernel/drivers/net/wireless/

    Atheros AR242x 64 (5007 chipset)

    Memory location on my card for this is 53100000. The instructions here were crucial. The ath5k module doesn't apparently work well in Satellites, however it's described here, and it appears the ath5k will eventually be the way to go. For now, the steps seem to be:
    1. in /etc/modprobe.d/blacklist, blacklist the "ath5k" module
    2. reboot and lsmod - verify ath5k is gone
    3. download madwifi-hal-0.10.5.6-r3861-20080903.tar.gz , or the newest one there, make, and install.
    4. reboot again and lsmod again
    5. # iwconfig ath0

    Atheros AR5005G

    download latest madwifi, eg madwifi-0.9.9.3, then the usual
    $ tar -xzvf madwifi*
    $ cd madwifi*
    $ make
    # make install
    # modprobe ath-pci

    RaLink RT2600 802.11 MIMO
    1. download latest ralink rt61 driver from ralink support.
    2. $tar -xzvf 2008*
    3. $cd RT61_Linux*
    4. $cp Makefile.6 Makefile [kernel 2.6.x]
    5. Alter module rtmp_main.c , by commenting out (around the bottom, line ~900):
    return pci_module_init(&rt61_driver);
    and replace it with:
    return pci_register_driver(&rt61_driver)
    6. Their "configure" file is not executable, so change it, then configure and make the module.
    $chmod 755 Configure
    $./Configure
    $make

    7. Make a directory where the module will locate configuration info and put these info files in it.
    # mkdir /etc/Wireless/RT61STA
    # cp rt2561.bin /etc/Wireless/RT61STA/
    # cp rt2561s.bin /etc/Wireless/RT61STA/
    # cp rt2661.bin /etc/Wireless/RT61STA/
    8. The last file to go into that config directory may have CTRL+L line ends and we have to be sure these are eliminated: Use $dos2unix rt61sta.dat (or use sed). This file has the particulars for our LAN and WEP.
    9. Copy that file to where the others are at:
    #cp rt61sta.dat /etc/Wireless/RT61STA/
    10. Send the module to the kernel's module folder:
    #cp rt61.ko /lib/modules//misc/
    11. Tell the kernel where to find the module by adding a line in /lib/modules//modprobe.dep
    : "/lib/modules//misc/rt61.ko:"
    12. Load the kernel:
    #modprobe rt61

    AFTER INSTALLING WIRELESS
    1. provide permanence via /sbin/modprobe ath-pci to /etc/rc.d/rc.modules and any configuration for it (eg. iwconfig ath0 essid "loser") to /etc/rc.d/rc.local.
    1b: in the case of Ralink /sbin/modprobe rt61 to /etc/rc.d/rc.modules.
    2. further modify /etc/rc.d/rc.local to be sure card comes up. Last line for the card: iwconfig ra0 up or iwconfig ath0 up
    3. reboot and "dhcpcd ra0" or ath0, check with "route" and a ping.

    A NOTE ON PACKAGES

    In Slackware, packages typically need to be individually compiled and installed. This leads to dependency problems because individual applications might overwrite or otherwise break dependencies from other packates. Slackware has pkgtool and users are urged to use it whenever possible.