LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 04-28-2005, 09:49 AM   #1
rpz
Member
 
Registered: Mar 2005
Posts: 126

Rep: Reputation: 15
ACPI Sleep ?


When I reinstalled my laptop I tried getting ACPI sleep to work with no success. Now I decided to try again. I have upgraded some software in the hope that it would solve the problems but unfortunately not. Can anyone point me in the right direction here?
Problem:
# echo 3 > /proc/acpi/sleep
puts computer to sleep. Powering it up again causes it to crash badly. Not even caps lock LED:s are working. Screen is blank, etc.
I don't even know how to find out where the crash did occur. Without any error message it's like a needle in a haystack.
I know that the last time I tried I got the computer to wake up and respond to ping but then the graphics was totally corrupted until I cycled power to the computer.
Why is it so damn hard to get this seemingly trivial function to work? For mobile users it is a major factor in switching over to linux.

My setup:

System: Dell Inspiron 8600 (P-M 1.4 GHz, ATI Radeon 9600)

uname -r
2.6.10-1.770_FC3

dmesg | grep -i acpi
Code:
ACPI: RSDP (v000 DELL                                  ) @ 0x000fdf00
ACPI: RSDT (v001 DELL    CPi R   0x27d40a19 ASL  0x00000061) @ 0x1fff0000
ACPI: FADT (v001 DELL    CPi R   0x27d40a19 ASL  0x00000061) @ 0x1fff0400
ACPI: DSDT (v001 INT430 SYSFexxx 0x00001001 MSFT 0x0100000e) @ 0x00000000
ACPI: PM-Timer IO Port: 0x808
ACPI: setting ELCR to 0200 (from 0800)
ACPI: Subsystem revision 20041105
ACPI: Interpreter enabled
ACPI: Using PIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (00:00)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Link [LNKA] (IRQs 9 10 *11)
ACPI: PCI Interrupt Link [LNKB] (IRQs 5 7) *11
ACPI: PCI Interrupt Link [LNKC] (IRQs 9 10 *11)
ACPI: PCI Interrupt Link [LNKD] (IRQs 5 7 9 10 *11)
ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.AGP_._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCIE._PRT]
pnp: PnP ACPI init
pnp: PnP ACPI: found 13 devices
PCI: Using ACPI for IRQ routing
ACPI: Processor [CPU0] (supports C1 C2 C3)
ACPI: Processor [CPU0] (supports 8 throttling states)
ACPI: Thermal Zone [THM] (56 C)
ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 5
ACPI: PCI interrupt 0000:00:1f.6[B] -> GSI 5 (level, low) -> IRQ 5
ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11
ACPI: PCI interrupt 0000:00:1f.1[A] -> GSI 11 (level, low) -> IRQ 11
ACPI wakeup devices:
ACPI: (supports S0 S1 S3 S4 S4bios S5)
ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
ACPI: PCI interrupt 0000:02:00.0[A] -> GSI 11 (level, low) -> IRQ 11
ACPI: PCI interrupt 0000:02:03.0[A] -> GSI 5 (level, low) -> IRQ 5
ACPI: PCI interrupt 0000:00:1f.5[B] -> GSI 5 (level, low) -> IRQ 5
ACPI: PCI interrupt 0000:00:1f.6[B] -> GSI 5 (level, low) -> IRQ 5
ACPI: PCI Interrupt Link [LNKH] enabled at IRQ 11
ACPI: PCI interrupt 0000:00:1d.7[D] -> GSI 11 (level, low) -> IRQ 11
ACPI: PCI interrupt 0000:00:1d.0[A] -> GSI 11 (level, low) -> IRQ 11
ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11
ACPI: PCI interrupt 0000:00:1d.1[B] -> GSI 11 (level, low) -> IRQ 11
ACPI: PCI interrupt 0000:00:1d.2[C] -> GSI 11 (level, low) -> IRQ 11
ACPI: PCI interrupt 0000:02:01.0[A] -> GSI 11 (level, low) -> IRQ 11
ACPI: PCI interrupt 0000:02:01.1[A] -> GSI 11 (level, low) -> IRQ 11
ACPI: AC Adapter [AC] (on-line)
ACPI: Battery Slot [BAT0] (battery present)
ACPI: Battery Slot [BAT1] (battery absent)
ACPI: Lid Switch [LID]
ACPI: Power Button (CM) [PBTN]
ACPI: Sleep Button (CM) [SBTN]
ibm_acpi: ec object not found
ACPI: Video Device [VID] (multi-head: yes  rom: no  post: no)
ACPI: PCI interrupt 0000:01:00.0[A] -> GSI 11 (level, low) -> IRQ 11
 
Old 04-28-2005, 09:48 PM   #2
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
hmmm first of all, have you tried to put it on sleep using /sys instead of /proc?
Putting my laptop to sleep using /proc/acpi/sleep was leading my laptop into problem but it works fine if I do this with /sys/power/state. Try echo "standby" > /sys/power/state

Hmmm also, you were using "S3" sleep, which is "suspend to ram" if I remember right. This is probably less reliable than the good ol' "standby". If you want something "better" I suggest you to download and install "swsusp2" which is the new version of "suspend-to-disk". It was quite reliable with kernel < 2.6.8 (there seem to be some bug in earlier kernel).
ACPI is really complex, very few laptop are exactly following the standard so kernel developper have hard time supporting every single model, since very few company release strong specifications of their ACPI implementation.
 
Old 04-29-2005, 06:57 AM   #3
rpz
Member
 
Registered: Mar 2005
Posts: 126

Original Poster
Rep: Reputation: 15
Thank you for the tip. I will try /sys/power/state when I'm get to my own computer.

I don't know what you mean by "the good ol' standby", but yes it is suspend to ram I want. Suspend to disk (S5) would be acceptable but it doesn't work at all on my laptop (nothing happens -- could be that I have upgraded the HD so the "Dell" partition is now gone). I have never heard of other sleep modes (not counting the powersave that just turns off the LCD panel and HD).
 
Old 04-29-2005, 07:14 AM   #4
rpz
Member
 
Registered: Mar 2005
Posts: 126

Original Poster
Rep: Reputation: 15
Update: I wanted to try echo standby > /sys/power/state so I hurried to my computer . What happened was that my power LED started flashing in a strange way (short, "hard" flashes instead of the ordinary fading-style flash like in sleep mode). And the computer didn't turn off (maybe the harddrive turned off but not the LCD). Pressing the power button made it crash (it outputted something that looked like a kernel stacktrace containing calls like acpi_wakeup or something like that -- by the way are these stacktraces stored somewhere in case of a crash? I would really want to have a look at where the crash happened). I also tried echoing mem to /sys/power/state. Then it went to sleep as usual but didn't wake up (exactly the same as with the /proc counterpart).
 
Old 04-29-2005, 08:52 AM   #5
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
Hmmmm look like you have some broken ACPI or some unsupported one.
There's not much you could do.... I suggest you to post a bug report to ACPI developper ( try : http://bugme.osdl.org/enter_bug.cgi?product=ACPI ). If you want to try, you might be able to use suspend-to-disk anyways.

Btw, sometime ACPI failed because of some hardwares... if you really want to give a try, you could recompilate your kernel removing every optionnal feature to see if that help
 
Old 04-29-2005, 10:04 AM   #6
rpz
Member
 
Registered: Mar 2005
Posts: 126

Original Poster
Rep: Reputation: 15
If I should even consider writing a bug report, I need at least some kind of info. Which brings me back to the question, can I save that stackdump somehow? I guess the suspend-to-ram wakeup produces the same or a similar output but I cannot see it because the LCD is turned off.
The thing is, I know people with Dell laptops that have succeeded in putting their computers to sleep (or more importantly, waking them up afterwards!), so I don't think this is a bug. Some driver incompatibility maybe? In that case, I need to know which driver so I can try to upgrade it or even disable it.
 
Old 04-29-2005, 12:09 PM   #7
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
I dont think stacktrace are wrote into a log file.... you could try to raise up your kernel logging in /etc/syslog.conf (assuming you are running syslogd) (create a line like *.* /var/log/all ) but I doubt it will do it... can't you just copy and paste it to a file?

About the driver incompatibility... well, unless the stacktrace gave you some info, the only thing you can do is guess... like disabling all device (by removing these from kernel) and trying to sleep. Then adding few one and trying again... there's no miracle :s
 
Old 04-29-2005, 03:14 PM   #8
rpz
Member
 
Registered: Mar 2005
Posts: 126

Original Poster
Rep: Reputation: 15
Problem is, the interesting lines fall off the screen. And there is nothing I can do since the computer has crashed by then and won't respond to keyboard. Otherwise I could always use my digital camera to take a picture of it but the bottom of the stack isn't that interesting as the last line shown is still some generic acpi function and not anything specific.
Also about syslog, I think that service is pretty much terminated when this happens. I was thinking of something more low-level. Isn't there some way of forcing kernel output to a file (for example, adding something like insanedebugoutput=/var/log/lotsoftext.log to the grub command line) ?
It is easily worth recompiling the kernel to fix this problem but I am in the blind right now, I don't even know what to google for

Last edited by rpz; 04-29-2005 at 03:15 PM.
 
Old 04-29-2005, 03:31 PM   #9
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
there is probably a way to get some lowlevel "debug" from kernel but I don't know how, it is mostly some developper stuff.

Hmmm and about kernel recompilation... have you done it before? If you want to try I could give you some basic instruction, but there's no step by step instruction, you will probably need 'guess and tries'
 
Old 04-29-2005, 03:37 PM   #10
rpz
Member
 
Registered: Mar 2005
Posts: 126

Original Poster
Rep: Reputation: 15
Yes I have recompiled a kernel before but then I knew what I wanted to accomplish, what config options to set and so on. Now I don't have a clue of what to change so I'm open to suggestions as to what I could try to change. I guess I should go for the modules first, since I can just chmod 000 them or whatever and I don't have to wait like 40 minutes for the kernel to compile. Any suggestions as to what can be causing this? WLAN? Radeon graphics? USB?
 
Old 04-29-2005, 03:42 PM   #11
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
USB is pretty buggy in the last few kernels, that would be my first guess. Then the graphic card indeed.
But as I told you, my guess would be to desactivate EVERYTHING that is not essential. No network, not wlan, no USB, desactivate EVERYTHING that you don't need to boot (except ACPI of course). Then try to sleep. If it fails, dont give yourself an headache, it's worthless, it's not a drivers causing the trouble. But if it suceed, the you can start reenabling each feature one by one, 'til you find the failing one.
Btw, compiling kernel take 40 min the first time you do it, but then it should be faster (since it wont compile thing that are already compiled)
 
Old 04-29-2005, 04:38 PM   #12
rpz
Member
 
Registered: Mar 2005
Posts: 126

Original Poster
Rep: Reputation: 15
OK so this is what I tried:
Booting in initlevel 3, disable graphical boot.
Removed the following:
USB (ehci, uhci, hid), Bluetooth, ieee1394, ipw2100 (WLAN), fglrx (ATI driver) and some more (ALSA etc).
echo standby > /sys/power/state
Same thing, goes into this quasi standby state where the LCD +backlight is kept on but the computer thinks it is sleeping (no keyboard response, power button wakes it up). When waking up, the kernel stacktrace is printed as before. The topmost lines I see has something to do with memory allocation (_kmalloc etc). The lines below that are ACPI functions.

echo mem > /sys/power/state
This time the computer wakes up (responds to Ctrl+Alt+Del, Soft power off, caps log LED:s working etc) but no LCD. I even tried blind typing "radeontool light on" which is supposed to turn on the LCD (I have verified that it works when the computer is awake). Didn't work.
Note that this is when Xorg is killed or in runlevel 3. I also tried when in X, but then I think the graphics card crashed or something. The computer totally hanged.

echo disk > /sys/power/state
Still nothing happens. I guess I need that Dell partition, the RAM has to go somewhere...


Conclusion: The best bet seems to be the "mem" mode, which is the only mode I have in Windows, probably meaning it is the only one supported by Dell. If I just could get the LCD panel back on.

Has anyone had a similar problem? It must be something I'm doing wrong since some people succeed. See for example these links
http://www.eleves.ens.fr/home/labatu...iron_8600.html
http://www.koeniglich.de/dell_8600.html
http://www.jelmoni.com/linux/dell_8600_install.html
And some of them have even older kernels...
 
Old 04-29-2005, 04:47 PM   #13
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
hmmm my laptop have a fn key to turn on the LCD. When I go to sleep and come back, with older kernel ( < 2.6.8.1 I think ) I had to manually restore the LCD ( with the fn key... the combinaison is fn-F1 on my laptop but I doubt it is the same on your ). Newer kernel fixed this bug for me. If you have a function key like this, you might want to try...

By the way, these links you gave me... 2 on 3 were running kernel 2.6.9, you might want to try the exact same one. I think I remember there is a special option in kernel about "NVIDIA chipset" laptop... make sure you have this on.
oh and, from these links again :
Quote:
Suspend/Sleep and hibernate work, for restore need readeonfb patch
fb == framebuffer... might this be why your LCD doesn't turn back on on resume?
 
Old 04-29-2005, 07:36 PM   #14
rpz
Member
 
Registered: Mar 2005
Posts: 126

Original Poster
Rep: Reputation: 15
Hmmm... some more hacking done. No good result yet

Quote:
Originally posted by Half_Elf
hmmm my laptop have a fn key to turn on the LCD. When I go to sleep and come back, with older kernel ( < 2.6.8.1 I think ) I had to manually restore the LCD ( with the fn key... the combinaison is fn-F1 on my laptop but I doubt it is the same on your ). Newer kernel fixed this bug for me. If you have a function key like this, you might want to try...

I have Fn+F8 = CRT/LCD. Doesn't work.
I will try and see if I get a picture on the TV when I find the necessary cables.

Quote:
By the way, these links you gave me... 2 on 3 were running kernel 2.6.9, you might want to try the exact same one.
I was afraid of that.... I am very reluctant to this. My choice of kernel was the result of hours of hacking to get the Radeon OpenGL acceleration to work satisfactory (actually, X will not work at all without it). Messing around too much will probably ruin this. I have 2.6.10, can things really worsen that much? I was kind of hoping that problems like mine were fixed eventually given enough patience....

Quote:
I remember there is a special option in kernel about "NVIDIA chipset" laptop... make sure you have this on.
I don't have anything nvidia on my computer.

Quote:
fb == framebuffer... might this be why your LCD doesn't turn back on on resume?
Yes, I read this too but it was for an older kernel. I did not find anything similar for the newer kernel so I kind of assumed it had made its way into the main kernel code. Anyway, I don't feel sure enough what I'm doing to start editing the kernel source manually (especially not that kind of low-level code) ... Also I just remembered that compiling a new kernel is a lot more work than I first anticipated, since all the modules need to be recompiled even if I stick to the same kernel version. And as mentioned, the ATI modules are a mix of some ATI closed-source binaries and some c files that needed to be patched, and I don't remember all the steps... (yes I know, I should have written them down). If I waste my graphics driver I have a non-functional computer (well, winxp...), so I'm not quite that desperate yet.

Anyway, thank you very much for your help ... although my computer fails to respond to common sense so far
 
Old 05-06-2005, 01:39 PM   #15
rpz
Member
 
Registered: Mar 2005
Posts: 126

Original Poster
Rep: Reputation: 15
I finally got it to work!!
I upgraded to the latest FC3 kernel (2.6.11-1.14_FC3) and it worked straight from the beginning. Graphics driver had to go though, since as soon as I reinstalled it the graphics got all corrupted after wakeup (same problem as everyone's having but not the same as I had before when the everything just died). The weird thing is the vesa driver only lets me have about 1024x768 or so, while my lcd (and I... :P) want 1680x1050. I'll try to find a hack someday until ATI gets this problem fixed (I assume the problem is with their driver).
ACPI sleep was my #1 priority since I carry my computer around and Linux takes EONS to boot, even after I disable all non-essential services.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ACPI sleep states slinky2004 Linux - General 3 10-30-2005 12:40 AM
ACPI Standby/Sleep modes ValidiusMaximus Linux - Hardware 0 01-17-2005 01:26 PM
acpi sleep reboots computer... djib Linux - Software 2 12-12-2004 10:17 AM
How to use ACPI to sleep/suspend? manueljose Linux - Laptop and Netbook 2 09-28-2004 10:33 AM
ACPI Sleep aaa Linux - General 9 10-01-2003 11:54 AM


All times are GMT -5. The time now is 04:31 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration