# issues with dell xps m1210, nvidia, suspend2, acpi s3.

## Lloeki

well, that makes some nice title. so, here we go with a sum-up:

hardware:

dell xps m1210

intel core 2 T7200 @ 2.00GHz

1GB ram DDR2@533MHz

hd sata 80Go

nvidia geforce go 7400 64Mb dedicated, 256mb w/ turbocache

ipw3945

bluetooth

software:

gentoo x86 (not 64, haha)

kernel suspend2-sources-2.6.18

nvidia-drivers-1.0.9625 (advice all nvidia users: if you use sharedmem/turbocache, upgrade to this version, it fixes daunting texturing issues)

current status:

everything works, except:

- snd_hda_intel sometimes switches to singe_cmd_mode when inserted. no obvious consequences.

- system (sometimes) hangs at boot when coldplugging. it seems related to inserting ipw3945 module. as someone suggested, /etc/hotplug/blacklist'ing it and modprobing it in /etc/conf.d/local.start seems to fix that. my gf's asus w7j (with the same hardware, except cpu and some internals) seems to suffer the same problem.

- sometimes, when using either vesafb/vesafb-tng, when X (kdm) starts, mouse is displayed and moves correctly, but nothing is drawn besides that lil' cursor. kdm starts and is inputtable since I can login, but still, nothing drawn, so what. at that point switching to another vt brings only a blank console. if fbsplash is set up (either verbose or silent), and when this bug occurs, then the background is not solid black but stripped diagonally with deformed background of framebuffer. at that point switching to vt has this deformed background too. when the bug does not occur, and when it occurs, before x is started, everything looks fine. my next step is to try vbetool post when it happens again (for now I disabled fb in the long run, to see if it's really fb-tied, and it really seems so). this also occurs on the w7j. because of randomness, not tested against nv driver.

- suspend2 works when no X (but nvidia module inserted) or with nv driver. suspend2 crashes (freeze/reboot) when X started. it was working before, but I obviously changed things. downgrading nvidia-drivers does not help. when it worked, a brief screen sync flash (as when changing resolutions) could be seen at the "doing atomic copy". now it flashes but never comes back. extra_pages_allowance immediately suspected, but not helping. nvidia/suspend2 guides do not help.

- acpi s3 (echo mem > /sys/power/state) was always resulting in blank consoles: I used hibernate-ram to tweak settings. tried vbetool save/restore: vbetool segfaults. vbetool post setting of hibernate script doesn't work (looks like a noop), I had to add "OnResume 20 vbetool post". adding "OnResume 10 vbetool dpms on" gives an even cleaner console. now, it's 100% fine unless X started, where it results in blank consoles only, and X restores fine. console input still responsive. not tested against nv driver.

so, I need some help in:

- debunking this fb issue

- making suspend2 work again with X/nvidia started

- making consoles work with X/nvidia/s3 combination

thanks in advance

----------

## Lloeki

update:

- s3 consoles with X started is ok when I use framebuffer consoles (had vesafb:off previously). enabling scrollback in sys ram may help. this is the first time having fb enabled actually fixes something  :Wink: 

- the x corruption starting problem seems unlinked with having fb enabled. I encountered it with vesafb:off. as vt was responsive (caps lock test), I tried to do vbetool post, but it resulted in a complete lockup.

other issues still pending.

----------

## c0bblers

I've personally found that suspend2 messes something rotten with the nvidia driver, have you tried using swsusp from the standard kernel?  I've had more success with that.  I also found that for things to work I had to use vesafb (NOT vesa-tng), and having no framebuffer was a no-go.  Suspend to Disk/Ram are pretty temperamental, running certain apps at the time of suspend will mess things up ('specially GLX apps), as will having certain modules loaded.  With much fiddling I got my lappy (previous generation centrino Asus) to do both ram and disk using the hibernate scripts to help things along.

----------

## Lloeki

late update:

- swsusp is no help. it exhibits the same behaviour as suspend2

- with gentoo-sources-2.6.18, and nvidia-drivers-1.0.9629, I can reliably suspend to ram, using hibernate scripts (with a twist) without vbetool.

for the record:

1. if you're using you sleep button, be sure you're actually using 'hibernate-ram' (or 'hibernate' with only ram method in hibernate.conf), some (kde and/or gnome) power managers hijack acpi events and use their method instead. you might need to go to gconf-editor or edit some file to disable the button hijacking. this way I'm sure the acpi event is processed and handled by acpid.

2. common.conf has defaults, but with switchtotextmode enabled

3. ram.conf has this:

```

OnSuspend 20 /etc/init.d/ipw3945d stop

OnSuspend 30 sleep 2

OnResume 30 sleep 2

OnResume 20 echo -n 2000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

OnResume 20 echo -n 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

OnResume 20 echo -n ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

OnResume 20 echo -n 2000000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq

OnResume 20 echo -n 1000000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq

OnResume 20 echo -n ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

```

the sleeps were necessary, as without them, X would be recovering the display before vcard/screen was ready, resulting in messiness.

cpu policies/frequs were messed up after resuming (freq not changing despite load, wrong min/max freqs, etc...) and cpufreq-set was unreliable (didn't want to set things), so I did things by hand. it seems the sleep helped there too.

anyway, the sleeps are barely noticeable, and help for debugging in case of failure (which has yet to occur  :Wink:  )

----------

## theturtle123

Hi, I have the same laptop as yours and i'm trying to make suspend2 work on it.

Do you manage to use suspend2 with kernel 2.6.21 (suspend2-sources) ?

My laptop correctly unloads modules, starts going to sleep and i end up

with the screen black but cpu fan still blowing and power still on. Laptop

doesn't answer anymore to ping. 

Could you post your .config, and your /etc/powersave/sleep /etc/powersave/events

and /etc/powersave/common ? It would perhaps help me and others to solve 

sleep problems...

Relevant configuration :

/etc/powersave/sleep :

```

UNLOAD_MODULES_BEFORE_SUSPEND2RAM="usb_storage sbp2 ehci_hcd uhci_hcd stir4200 ohci1394 button usb_snd_audio b44 ipw3945 uvcvideo nvidia"

SUSPEND2RAM_RESTART_SERVICES="ipw3945d"

```

----------

