Three Year Struggle Over

Since owning this Dell Latitude C840, I’ve been in a constant struggle with various aspects of it’s use. I’ve had nvidia driver issues, wireless issues, modem issues, fan issues, docking station issues and external monitor issues. But no issue has driven me crazy more than the fact that I couldn’t suspend the laptop. At one point when I first got the laptop and was running Red Hat Linux I think it would suspend using APM but that’s so long ago I no longer remember if that is truth or fantasy.

But recently this year I started mucking around with suspend again. It was the first time I’d really tried since I last wrote about my troubles. The problem with trouble shooting suspend problems is that it’s very disruptive to doing actual work; if things go bad (which they inevitably did) you end up rebooting and trying again. I spent a few hours trying in early July while on holiday at North Buck Lake without success and given the age of the laptop decided that it was simply time to give up. The machine would suspend and resume just fine now, but on resume the LCD backlight would fail to come back on. And without that backlight, reading the LCD is next to impossible.

But I absolutely hate unsolved problems; it’s a curse for me. If something doesn’t work, I think about it until it gets solved. So this morning, I tried again. I did a bunch of research with Google and discovered that various people had been successful, using xset or vbetool or combination thereof. So I wrote a shell script to run on suspend, which was a mish-mash of various things people had tried, but again no backlight.

That is until, I tried using those tools to first turn off the backlight (via dpms) before the suspend. And, that did the trick. As such, my three year struggle with suspend/resume on my Dell Latitude C840 is over.

Here’s the script I use to suspend the laptop:

#!/bin/sh

#------------------------------------------------------------
# ACPI - suspend script
#  - enhanced by Douglas Robertson
#
# To Do:
#  - track what networks were brought down and bring back up
#  - track what modules were loaded and reload on resume
#  - ???
#------------------------------------------------------------

if which fgconsole > /dev/null 2>&1 ; then
    XHACKS_ORIGINAL_VT=`fgconsole`
else
    XHACKS_ORIGINAL_VT=1
fi

chvt 1
VBEMODE=`vbetool vbemode get`
vbetool dpms suspend


# down with the network!
ifconfig eth0 down
ifconfig eth1 down
ifconfig eth2 down
ifconfig wlan0 down

# remove usb modules
rmmod uhci_hcd
rmmod ehci_hcd

# remove any other modules that are known to wreak havoc
rmmod tg3
rmmod ide-cd
# ???

sync

echo mem > /sys/power/state

sleep 1

modprobe uhci_hcd
modprobe ehci_hcd
modprobe tg3
modprobe ide-cd
modprobe ndiswrapper

chvt $XHACKS_ORIGINAL_VT

vbetool dpms on
vbetool vbemode set $VBEMODE
xset dpms force on

# up with the network!
ifconfig wlan0 up
#ifconfig eth2 up
ifconfig eth1 up
ifconfig eth0 up

It works for me; hopefully it helps those who have also struggled in the quest to suspend/resume with a working backlight. If you have issues you can try contacting me, but I’ll warn you that I’m no expert. Not at all. Though after thre years you think I would be.

Sat, 22 Jul 2006 17:52 Posted in

  1. By Graham Stratton 5 days later:


    I've been struggling for a similar length of time with this laptop. I keep hoping that some new distro will work out of the box, but no luck so far. Which distribution are you using?

Comment Three Year Struggle Over


RSS