FreeBSD clock problem

Mon, 10 Nov 2008 @ 19:47:49 UT
added by Edoardo in clock compaq presario 1694 freebsd laptosauro
1 comment

A few days after I installed FreeBSD 7.1 BETA, with lots of help from ferz on my old and trustworthy laptop, I noticed a problem with the clock.

The time was running too fast!

I was debugging something in cron because it wasn't executed, and while having a look at the time in top, I noticed that the seconds were incremented the double at each refresh.

I asked around, then I remembered gq was working with some BSD distros, so I sent him an e-mail explaining my problem, and in a few hours it was fixed! :)

These were the steps:

1) run sysctl and find out the relevant information about the kernel clock source:
> sysctl -a | grep kern.timecounter.choice

My output is:
kern.timecounter.choice: TSC(800) ACPI-safe(850) i8254(0) dummy(-1000000)

2) try to change the value of kern.timecounter.hardware using the ones listed by the previous command, with
> sysctl kern.timecounter.hardware=[new value]
(ie. > sysctl kern.timecounter.hardware=i8254) and check if the clock works correctly after that.
If yes, good, problem solved :)
If no try with the other possible values.

What worked for me was i8254.

3) read some relevant information and learn how to make the changes permanent.

4) profit!

Many thanks to ferz and gq for all the help!

Save to del.icio.us

Netgear WG511T on a Compaq Presario 1694

Sat, 28 Jul 2007 @ 18:02:53 UT
added by Edoardo in compaq presario 1694 linux netgear WG511T wireless
no comments

Recently I bought a Netgear WG511T 108 Mbps Wireless PC Card to use with my Compaq Presario 1694 old laptop.

Of course I had to struggle a bit with the drivers and the configuration, and this is a little HOWTO that hopefully can be useful to someone else.

I must thank Bunker who pointed me in the right direction.
You can find him, together with some other funny guys, on the perl.it IRC channel on irc.freenode.net.

Preamble

My box runs a Slackware flavoured distro called Zenwalk and the installed version is Core 3.0.
uname -sr returns: Linux 2.6.17.11.

MadWifi is an Open Source project and offers a Linux kernel device driver for Wireless LAN chipsets from Atheros.
I recommend to read the page dedicated to the MadWifi installation on Slackware.

Getting the drivers

In my case I didn't found a binary package ready for my kernel version, so I built it from the sources.
For this you need to download the latest version of the driver (mine is 0.9.3.1).

Building the package

Follow the instructions in the online documentation from this point.
Documentation is good and the installation works as expected even if I found a few problems.

Problems

The building process ended with an error, because tried to move the file slack-desc which didn't exists.
I've just created it in the working directory and the build process completed correctly.
At this point you have a package called madwifi-0.9.3.1_KERNELVERSION-i486-1.tgz in /tmp where KERNELVERSION is your kernel version (see above).
You have to install this package before configure the network.

rc.wireless.conf

As well explained in the documentation, in this file you must add the configuration for the wireless card.
I've added the entry with the full MAC address of the card just below the section to comment.
The keys I've used are: INFO, ESSID and KEY, since I've a wireless network with WEP encryption.

rc.inet1.conf

In this file I've added a new section for the ath0 interface, by copying the one already present for eth0 and of course changing the interface index.
I use DHCP so the address is automatically assigned by my wireless router.

Starting the network

At this point all should be ready and you can try to start the new ath0 wireless interface with the usual command: /etc/rc.d/rc.inet1 restart.
The 2 green leds on the wireless card should start blinking together and you should be wirelessly connected to your LAN!

Notes

Make sure that the /etc/rc.d/rc.wireless file has execution permissions, thus each time you boot your box or you plug your wireless card, the ath0 interface will start automagically! Cool!

Enclosure:

netgear.jpg

image preview

Save to del.icio.us