August 2007


I’ve used this configuration, with minor tweaks on 3 different laptops, with 3 different OSes (if not 4) with great success. There’s so little good Linux info on evdoforums.com (at least I have a hard time finding it), and the posts I made link to a site that’s non-existant now, so I realized I had to repost this info. I’ve had both the Merlin S620 Sprint PCS EVDO card, and the Sierra Mobile AirCard 575, and now have a Dell built-in EVDO modem.

For all 3 of them, the only difference was the modprobe line, for vendor and product ID, as noted below.
Merlin S620:
modprobe usbserial vendor=0x1410 product=0x1110
Sierra 575:
modprobe usbserial vendor=0x1199 product=0x0019
Dell Sprint 5720 PCI-Express Modem
modprobe usbserial vendor=0x413c product=0x8134

I saved the appropriate PPP files at /etc/ppp/peers/1xevdo and at /etc/chatscripts/1xevdo_chat. In this post, I’ve blanked out the parts that are particular to my install (phone number), but it should be pretty easy to recreate your settings.

/etc/ppp/peers/1xevdo:

-detach
ttyUSB0
115200
debug
noauth
defaultroute
usepeerdns
user $(full-phone-number)@sprintpcs.com
show-password
crtscts
lock
lcp-echo-failure 4
lcp-echo-interval 65535
connect '/usr/sbin/chat -v -t3 -f /etc/chatscripts/1xevdo_chat'

/etc/chatscripts/1xevdo_chat:

'' 'AT'
'OK' 'ATZ'
'OK' 'ATE0V1&F&D2&C1&C2S0=0'
'OK' 'ATE0V1'
'OK' 'ATS7=60'
'OK' 'ATDT#777'
CONNECT CLIENT

Since I do several bits of work through the console, including accessing my Cisco VPN, and in some cases naim and tmsnc (console AOL and MSN chat) inside a screen session, scripts for these setups work great for me. I wrapped the whole thing up inside a bash script called $HOME/bin/evdo.sh – and I just call that when I want to get online, after inserting the card.
~/bin/evdo.sh:

sudo /sbin/modprobe usbserial vendor=0x1199 product=0x0019
sleep 5
sudo /usr/sbin/pppd call 1xevdo

The sleep statement helps make sure that the modprobe has completed, scanned the device, and settled before calling PPP.

My Dell D620 arrived, and I was able to quickly determine the changes for an “always there” card, vs. a pluggable PCMCIA card.
First I created /etc/modprobe.d/usbserial with the line:
options usbserial vendor=0x413c product=0x8134
and added “usbserial” to the end of /etc/modules so that the card would always come up at boot (sudo lspci -v | less to find the exact product ID and vendor – I only have 2 “Dell” devices on my laptop). I set my radio kill switch to affect only my EVDO and bluetooth radios, letting the software (~/bin/rfkill.sh in Linux and the Dell software in Windows) handle the WiFi – I use WiFi all the time, but only want the battery-draining EVDO in a few specific instances. So I added “cat 0 > /sys/bus/pci/devices/0000\:03\:00.0\rf_kill” to my “evdo.sh” file to kill the wireless when I wanted to use EVDO – no need to ever have them both on.

EDIT Dec. 4, 2012: Update!  I’ve written a new update to the configuration files referenced in the post below, over here: http://www.totalnetsolutions.net/2012/12/09/lenovo-t430-running-kubuntu-12-10-for-extreme-battery-life/ so please check out the CPU and battery sections of that post.

Thanks!
/EDIT

With the popularity of the last How To on Domain Controllers, I thought we should do some more. So here�s how I�ve nearly doubled my battery life on my laptop (2 hours max with Windows to 3:30 average with Ubuntu, which was originally 2:30). I used to use a series of programs on Debian Etch which are also available in Ubuntu. However, probably because of their lack of nice GUI interfaces, they�re not installed by default. If you are more interested in increasing your battery time, however, follow along.

  1. Install laptop-mode-tools and cpufreqd
    sudo apt-get install laptop-mode cpufreqd cpufrequtils
  2. Make sure that the proper CPU governers are installed for your processor. I have an Intel Centrino Duo 1.6Ghz (which clocks down to 1Ghz).
    sudo modprobe acpi-cpufreq (or speedstep-centrino or powernow-k8|k7|k6 or longhaul, depending on architecture – acpi-cpufreq should be the most compatible)
    sudo modprobe cpufreq-conservative
    sudo modprobe cpufreq-ondemand
    sudo modprobe cpufreq-powersave

    I use ondemand and conservative – ondemand for when I�m plugged in – no point running at 1.6Ghz when I�m idle – it just heats up the system and overworks the fan – and conservative on battery life – it only steps up slowly as requires, and I can still limit it well with cpufreqd. However, having powersave available on a moments notice to keep the processor locked at 1ghz is nice.

 

  1. Add acpi-cpufreq or whichever cpufreq driver you picked in the previous step to the end of /etc/modules to force the system to load them at bootup. Ubuntu didn�t pick this up properly for me on any install yet (Dapper, Edgy or Feisty), but Debian did in Sid and Etch
  2. Now open up a terminal (or Konsole) window and edit the files (or replace them with my versions). I�ve attached my versions below.
    laptop-mode.conf
    cpufreqd.conf
  3. A few things to look out for when editing these files
    1. set your cpufreqd.conf to the proper CPU speed limits. You can get the hardware limits for your processor from
      cpufreq-info -l
      Mine are obviously (when you read my
      cpufreqd.conf) 1000000 to 1667000
    2. Note which steps are available to you. On my Centrino Core Duo, I only have 3 steps, but on one Celeron processor I saw 10 steps from 2GHz down to133MHz.
    3. Make sure in this configuration that you�re disabling CPU monitoring in laptop-mode.conf. Laptop-mode-tools seem to do this well, but when I last read the man pages, it does all its switching with the usermode driver, which is a more expensive operation than kernel mode – where cpufreqd runs at; letting the speedstep operations run as intended in the core is much more efficient, cpu-cycle-wise� which saves even more battery life. Yes, every second counts.
    4. I personally set �noatime� as a default mount option in /etc/fstab for every physical drive in my laptop. However, you�ll also see my laptop-mode.conf has �control_noatime=1� set, in case I forget, or edit fstab. This does a mount -o remount on all drives when you unplug from the wall, setting the noatime mount option ONLY on battery power. This got confusing to me, having access timestamps sometimes, so I just disabled it completely, and know that my access timestamps are 100% worthless, rather than 50% worthless.
    5. Look closely at the cpufreqd.conf that I�ve created – you�ll see several different scenarios for how to control the CPU limits, based on utilization, battery life, AC status, and even which programs are running. These are settings that work very well for me – I doubt they�ll work well for everyone, but they do cover pretty much every situation I�ve been in on battery power, from doing a presentation out of VMWare to taking notes in a 4 hour meeting. I rarely play games in Linux, much less on battery power, so I can�t speak much to that. But I can get a full DVD easily, and 2 movies if they�re ripped to DivX on the HDD.
  4. Last step is to check the brightness of your laptop. In mine, I can set the brightness on battery power vs. AC power in the BIOS. I also have controls for it. Lowering your brightness by half increases your battery life a HUGE amount. I try to keep it as low as required to see it – in a dark meeting room, that means �as low as it goes�. Being a touch-typist becomes important here, cause that�s not bright enough to see the keyboard on my system.

That�s it. For reference, this whole post written on battery power tonight, while doing other things (like cooking dinner and going for a walk), never in sleep mode. Percentage battery remaing thanks to bat-stats.sh

robert@laptop:~$ bat-stats.sh
# Using governor powersave
# Battery max design 5100 mWh, last 4321 mWh
# Using last max for percentages.
22.0319

robert@laptop:~$ uptime
23:00:51 up 3:09, 4 users, load average: 0.20, 0.14, 0.10

I found this in the news today and hunted down the original paper at Archives of Pediatric and Adolescent Medicine. It shows that children as young as 3 years old are greatly affected by marketing and brand loyalty, with as many as 73% of kids 3-6 preferring food in McDonald’s wrappings to the same food in plain paper. Even if that item was a carrot, kids preferred it significantly over the generic item.

Reading further, the stats get more interesting.  The more TVs in the house, or the more times the kids ate at McDonald’s per month, the greater the preference for the branded food. The whole paper is a really fascinating read, but it does get (as most scientific publications do) pretty stats-heavy, so if you don’t follow statistics very well, just plow through it and check out the graphs and findings.

Moral of the story?

For parents: Remove TVs from the house, and eat healthy at home more often.

For businesses: your branding can be extremely powerful.  Even the kids who NEVER ate McDonald’s preferred the branded food.

Tonight we fixed my friend’s network – see this post for history. It turns out that after changing IPs on the first server, the servers lost communication long enough for the password on one of the 2 of them to expire. This was causing replication to fail, which caused DNS to fail to update, and the 2nd DC stopped answering client requests.

Thanks to cyrilliano at Neowin Forums I was reminded of all the fun that is netdom.

I just had to run netdom resetpwd /server:dc2 /userd:FOOBAR\administrator /passwordd:admin_password and wait 15 minutes. His post suggests disabling the KDC service, but I found it unneccessary. However, the 10 minute wait was not quite enough in my situation. Yet another reminder that patience is the first requirement for DC troubleshooting.