Tips, Tricks, Scripts, etc
IPW3945 Drivers
Fedora 7 and 8 both ship iwl3945, an arguably better driver for the Intel 3945ABG wireless cards. However, I find that ipw3945 works more reliably and has the wifi light indicator which works. To use the ipw3945 drivers, you can use the ATRPMs repository. ATRPMs keeps up pretty well with the FC kernel release schedule, and provides drivers to use. I was afraid the wireless would be hit and miss, but so far it works wonderfully.
Install Drivers
Simply add ATRPMs to your /etc/yum.repos.d directory, set it to DISABLED (**), then run the following as root in a terminal/console:
yum --enablerepo=atrpms install ipw3945
This should install only the following files (the two noted in bold will need updating with every new kernel as mentioned later). If for some reason it doesn't install the following, you may try listing each one on the yum install line, so instead of just ipw3945d also specify the other files below:
- ieee80211-kmdl
- ipw3945-kmdl
- ipw3945-ucode
- ipw3945
- ipw3945d
The kernel modules and userspace module, firmware, etc, should now be downloaded.
Easy Configuration
I've found using an init script is easier to use and more reliable than the original solution I found for loading the daemon/modules, so I created the following from some other similar stuff: Get it here. However, I'm leaving the following information as it might be useful to some people.
Less easy Configuration
Edit /etc/modprobe.conf as root and add the following lines (preceeded by numbers so you can see the individual 3 lines):
- alias eth1 ipw3945
- install ipw3945 /sbin/modprobe --ignore-install ipw3945; sleep 0.5; /sbin/ipw394d --quiet
- remove ipw3945 /sbin/ipw3945d --kill; /sbin/modprobe -r --ignore-remove ipw3945
This will get the modules loaded at boot, and automatically run the ipw3945d daemon. The only quirk you'll see is that at boot the network startup will fail because it's delayed, but by the time it boots everything is working. You can then run system-config-network and set everything up as usual.
Note: On my particular laptop, the wireless card shows as eth1. Yours may not. The way to check is to run modprobe ipw3945 after installing the drivers above, then run iwconfig and see which interface shows wireless information. If yours is not eth1, make sure you modify the first line of the three lines you've inserted into modprobe.conf (noted above) to match your particular network interface.
Another note: If you fark around with some timings, and maybe disable 'start at boot' for a device, particularly when using wpa_supplicant, you can get it to not error at boot and keep the pretty graphical boot. Either way, the device is functional by the time you get into X.
Kernel Updates
Next time you see a new kernel upgrade, try the following to install matching ipw3945 drivers. I haven't yet tried this, but it should work. Until you do this, your new kernel won't have wireless available, so I suggest you make sure you do this before rebooting so you can download the update. The updates will go into the appropriate kernel and when you reboot it should be ready for use. It might even be a good idea to do this nightly in a cron, that's up to you. If you reboot into a new kernel and realize you have no wireless drivers, the easiest thing to do would be to boot into your old kernel, do the following, then reboot again into the new kernel.
yum --enablerepo=atrpms update ipw3945-kmdl
** There are concerns about using atrpms at all. I have used it on multiple different kernel updates in FC6, F7, and F8 and all have worked flawlessly. This does not over-write any core information, it only installs some files which are not included in Fedora Core 6/7/8 (or Extras) by default. If you do not feel you should use atpms at all, feel free to follow these alternative instructions requiring some additional configuration, compiling, and tinkering. Your call.
(Last Modified 11/16/2007 21:44)
Kernel config
I'm still working on the perfect kernel config, but here's what I have so far. This is a kernel derived from a few sources and tweaked by me, hopefully nothing unecessary within. If you use any type of external USB devices you might have to add them back in.
The main reason for this is to reduce the number of modules and to give me more flexability with drivers such as IPW3945. You still need to have an initrd for this kernel, so probably best to do the final installation of the kernel using the built-in make install when finished doing make bzImage modules modules_install as normal.
The config is here for 2.6.23.1. (Last updated 11/12/2007)
One caveat, and I'm not sure how to fix it yet. You might need to set root=/dev/device instead of root=LABEL=/ in grub.conf with this kernel, but other labels in fstab are fine. Not sure yet why this is, the parred-down Redhat config I was using was fine, so there must be some option somewhere I'm missing. This might not longer be a problem, but I used to have to do this every time; now a label works fine. Go figure.
Just to be clear, this is not necessary for proper function of the V100 under Fedora Core 6/7/8. However, if you like to tweak your kernel, compile in modules, use different kernel patches, etc, you can start with this basic config. I still plan on compiling in more modules (IMO if it's used 100%, compile it in, so long as it doesn't need unloading for suspend etc).
(Last Modified 11/11/2007 19:08)
ACPI Suspend
Gathering some various information on the web, I've put together a ACPI Suspend script which seems to work pretty well, and even works perfect on the stock Fedora Core 6 kernel. Basically just need to stop a few services and unload a few modules before suspending.
Suspend to ram and disk seems to work rather well. Speed is very acceptable for suspend to disk, and suspend to ram happens almost immediately.
Only caveat is gkrellm crashes sometimes on restore, I think it is the CPU monitor plugin I am using. This was most definitely a CPU plugin, I've disabled it and no gkrellm problems since.
The script can be downloaded here and should hopefully work for you without any caveats. It defaults to suspend to ram, but if you pass it an argument of hibernate it will suspend to disk. I can run this from X or console and it should work fine. If you run this from console, you'll want to edit the last commands in the script to perhaps go to vt 2 and back rather than vt 7 (where X is for me). If you have any suggestions, send them on.
The script does a few various things that I want it to do which you might have no interest in... I've commented those types of things in the script itself.
(Last Modified 10/11/2007 20:26)
Media key assignments
The V100 has multimedia keys on the top of the keyboard as well as on some Fn key combinations, and below is how I'm using them. You can then assign these keys in your favorite programs as the associated F key listed, such as the Stop key is F15.
# Decrease Vol key near LCD
xmodmap -e 'keycode 174 = F13'
# Increase Vol key near LCD
xmodmap -e 'keycode 176 = F14'
# Stop (Fn-Up)
xmodmap -e 'keycode 164 = F15'
# Play (Fn-Down)
xmodmap -e 'keycode 162 = F16'
# Back (Fn-Left)
xmodmap -e 'keycode 144 = F17'
# Forward (Fn-Right)
xmodmap -e 'keycode 153 = F18'
# Mute (Fn-Esc)
xmodmap -e 'keycode 160 = F19'
And if the caps lock key annoys you as it does me, you can convert it into a control key with the following:
xmodmap -e 'remove Lock = Caps_Lock'
xmodmap -e 'keysym Caps_Lock = Control_L'
xmodmap -e 'add Control = Control_L'
Easiest way to use this is to put the commands into your .Xclients, .xinitrc, or a Desktop Environment startup script (such as ~/.kde/Autostart/startup for an example)
(Last Modified 3/8/2007 21:51)
ACPI Event script
I've had an ACPI event script for several years now to automagically tweak the CPU speed, brightness, hard drive APM, etc. I've tweaked it to work nicer with the V100. Unfortunately even with the 6 hour battery, I don't quite get 4 hours under light use (wireless, ssh, a little web browsing). There might be additional things to tweak to help in this regard. The V100 seems to let me spin the disks down better than my old laptop, a Sony SRX87, not sure what the differences are. The Sony would spin back up all the time, where the V100 seems to stay completely off until I force something to load. I haven't left the machine idle and watched it to see how long it'll stay inactive, but so far it seems good.
So this script turns down the max CPU (to 1ghz) when off AC, turns the brightness down to 30 (minimum, but usable) and turns on hard drive APM, restores them when back on AC, turns everything down as much as possible when the lid is closed (see bootnote), suspends the laptop when the power button is pressed and Hibernates when the Suspend (Fn+F4) sequence is pressed (see my Suspend script). In case you're wondering, the Fn+F12 (Hibernate) sequence doesn't seem to create an ACPI event, so this setup works for me and is very easy to change.
You can grab the file here which is the action.sh and an event file. They should go into your /etc/acpi directory. Please make sure the script matches your laptop in terms of where the CPU information is, batteries, etc. Beyond that, run tail -f /var/log/acpid and see if the script works. If you need help tweaking it, let me know.
As a bootnote, here's the other keys which do not create ACPI events:
- Lid open event (the lid close event "completes" but I can't seem to catch this in my ACPI action script?) -- CORRECTION, had conflicting scripts, this is fine now!
- Fn-F12 (Hibernate) - Does not seem to create an ACPI or XEV event
- Fn-F7 (switch monitor) - Does not seem to create an ACPI or XEV event
(Last Modified 3/8/2007 21:47)
Battery shutdown script
Don't miss my script in the parent of this section, Linux, as it contains a nice battery script tailored for the V100 to shut down nicely when the battery gets too low. Currently it's set to shut down, but I'll be modifying it for hibernation soon.
If you run a DE like Gnome or KDE, they can handle this themselves but not in a very flexible way. For instance if I am not paying attention and my battery level gets critical, KDE will immediately shut the laptop down. With my script, I have some minutes of warning before this happens and if I plug it into the AC the machine doesn't shut down on me.
(Last Modified 3/7/2007 11:30)