Contributed by jose on from the get-up-and-get-down dept.
I wanted to tell people about two neat new teaks in -current that affect laptop users. Tedu did most of the first, while I did the second. These are not yet fully documented, I am hoping to make time for that soon..."
"Laptop cpu speed control works on some laptops. If you have support
for this you will see:
# sysctl hw
hw.machine = i386
hw.model = Intel(R) Pentium(R) M processor 1600MHz ("GenuineIntel" 686-class)
hw.ncpu = 1
hw.byteorder = 1234
hw.physmem = 535801856
hw.usermem = 535277568
hw.pagesize = 4096
hw.disknames = wd0,cd0
hw.diskcount = 2
hw.cpuspeed = 1600
<----- speed in MHz
hw.setperf = 100 <----- rough % of maximum speed
The latter two lines show up. Right now it is running at 100% speed
of speed, which is 1600MHz. OK, let's fiddle:
# sysctl -w hw.setperf=0
hw.setperf: 100 -> 0
# sysctl hw | tail -2
hw.cpuspeed = 600
hw.setperf = 0
Now it is running at 600MHz. That can save quite a bit of battery.
I could have given a value other than 0, but since 600MHz is the slowest it can go to... understand?
Of course, only some laptops support this, and different variants of slowdown technology too. Transmeta machines have one way of slowing down, Celerons another, and Pentium M's another way. And then it varies based on how the motherboard is setup. On some laptops we cannot yet do it because it is too esoteric. Work on this will continue.
Another new feature is in dhclient(1). Of course you are normally at home on your own regular net, but from time time you travel onto another net and do:
# dhclient wi0And voila, you are now on the new net. But if you move to yet another net, you normally had to hunt the running dhclient down and kill it; before starting a new one. Not anymore. Running dhclient processes now notice if anyone fiddling with the interface (ie. changing an address). So to move to another network that has dhcp as well, simply do:
# dhclient wi0When this happens, the old one will cleanup and terminate. Even nicer, since dhclient now terminates nicely, it will always try to properly save and restore your resolv.conf file.
Finally, the /etc/netstart script has undergone some cleanup. If you find yourself back home, where your network is static, just type
# sh /etc/netstartThe currently running dhclient will notice the tap on it's back, and terminate --- thereby restoring your resolv.conf. And everything will be restored to your home configuration. And of course, the netstart script now runs quietly.
(Comments are closed)