Bug 293662

Summary: Acer Aspire 1691 - resume from ram hanging
Product: [openSUSE] openSUSE 10.3 Reporter: Carlos Gonçalves <cgoncalves>
Component: Mobile DevicesAssignee: Forgotten User ZhJd0F0L3x <forgotten_ZhJd0F0L3x>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: behlert, felix
Version: Alpha 6   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: System Test Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: pm-suspend log
/var/log/messages log (a part of)
s2ram -n log
lspci log

Description Carlos Gonçalves 2007-07-20 22:31:54 UTC
I've installed openSUSE 10.3 a6 (KDE CD) in my laptop Acer Aspire 1691WLMi.

I can suspend the system to RAM without setting vga=0 (on openSUSE 10.2 I can't suspend if I don't change it). The problem is that the machine hangs on resuming - the fan runs (and doesn't stop), the screen doesn't turn on. I also tried to leave the Konsole open to try to execute "find /" to see if I heard the hard drive running but no, it doesn't.

With vga=0 set I don't have troubles with it - can suspend and resume nicely.
Comment 1 Carlos Gonçalves 2007-07-20 22:32:27 UTC
Created attachment 152267 [details]
pm-suspend log
Comment 2 Carlos Gonçalves 2007-07-20 22:36:21 UTC
Created attachment 152269 [details]
/var/log/messages log (a part of)
Comment 3 Stefan Behlert 2007-07-23 09:16:14 UTC
Carlos, the problem only occurs with suspend to ram, not with suspend to disk, correct?
Comment 4 Carlos Gonçalves 2007-07-23 09:35:53 UTC
Yes, correct.
Comment 5 Forgotten User ZhJd0F0L3x 2007-07-23 14:57:37 UTC
Ok, the summary i gathered, please correct me if anything is wrong:
- suspend to ram works on 10.2 with vga=0
- 10.2 does not even suspend without vga=0
- suspend to ram works on 10.3 with vga=0
- 10.3 does suspend, but not resume without vga=0

Some questions:
- did you need to configure anything to make suspend to ram work?
  unfortunately the part of pm-suspend.log which is telling us the options
  s2ram is called with is missing due to the crash
- could you please provide the output of "s2ram -n" run as root on 10.3?
- what graphics card does this machine have? Maybe just post the output
  of "lspci"

These will help in narrowing down the issue.
Comment 6 Carlos Gonçalves 2007-07-23 16:27:59 UTC
Yes, nothing wrong.

1) No, didn't need to configure anything
2 & 3) will attach now
Comment 7 Carlos Gonçalves 2007-07-23 16:29:22 UTC
Created attachment 152466 [details]
s2ram -n log
Comment 8 Carlos Gonçalves 2007-07-23 16:29:43 UTC
Created attachment 152467 [details]
lspci log
Comment 9 Forgotten User ZhJd0F0L3x 2007-07-23 18:16:01 UTC
Ok, we have a similar machine here in the office. I just need to find out where and reproduce the problem.

The reason it did not suspend in 10.2 is, that this machine is listed with "DOES NOT SUSPEND WITH FRAMEBUFFER!", so 10.2 refused to suspend.
10.3 should have done the same, but apparently didn't, so i need to find out where it fails.
=> This is a s2ram bug, it apparently does not notice that a framebuffer is active.
Comment 11 Carlos Gonçalves 2007-07-23 18:33:55 UTC
So, that means that you are tracking the bug to fix it to not allow suspend to ram? If so, that's a bad politic IMHO.

P.S.: *Ubuntu suspends to ram without any troubles and modifications - out of the box (no vga=0 either)
Comment 12 Forgotten User ZhJd0F0L3x 2007-07-23 18:40:56 UTC
Ok, i tested the relevant code on another machine, and it did detect that the framebuffer was there.
Carlos, could you please post the output of "ls -l /sys/class/graphics/" after booting with vga=0x317 (or whatever was used by the installer originally)?

Basically, the s2ram code just checks if "/sys/class/graphics/fb0" is present, if it is, it assumes a framebuffer is there. So if the machine is listed with NOFB and this file/link is present, it should refuse to suspend.

The message in my testcase is (i have listed my machine as NOFB):
root@strolchi:/tmp# ./s2ram -n
Machine matched entry 128:
    sys_vendor   = 'Hewlett-Packard*'
    sys_product  = 'Compaq nx5000 *'
    sys_version  = ''
    bios_version = '68BCU*'
Fixes: 0xc8  VBE_POST VBE_MODE NOFB
This machine can be identified by:
    sys_vendor   = "Hewlett-Packard"
    sys_product  = "Compaq nx5000 (DW806AA#ABA)     "
    sys_version  = "F.0D"
    bios_version = "68BCU Ver. F.0D"
See http://en.opensuse.org/S2ram for details.

If you report a problem, please include the complete output above.
root@strolchi:/tmp# ./s2ram
This machine can only suspend without framebuffer.
root@strolchi:/tmp#
Comment 13 Forgotten User ZhJd0F0L3x 2007-07-23 18:44:35 UTC
(In reply to comment #11 from Carlos Goncalves)
> So, that means that you are tracking the bug to fix it to not allow suspend to
> ram? If so, that's a bad politic IMHO.

Not really. I'll fix it to not suspend with a framebuffer, since we know that it won't resume. The perfect solution would be that you get a popup saying "i cannot suspend, because your machine needs vga=0 at the boot command line", ideally with a link to a yast module to enable this parameter, and after the next boot it will suspend.

> P.S.: *Ubuntu suspends to ram without any troubles and modifications - out of
> the box (no vga=0 either)

Yes, ubuntu uses vga16fb, which is different from vesafb, and more like vgacon (vga=0) wrt. suspend. Vesafb and the other chip specific framebuffers must not be used on your machine.

Comment 14 Carlos Gonçalves 2007-07-23 19:35:31 UTC
acernux:~ # ls -l /sys/class/graphics
total 0
lrwxrwxrwx 1 root root 0 2007-07-23 21:45 fb0 -> ../../devices/platform/vesafb.0/graphics/fb0
drwxr-xr-x 2 root root 0 2007-07-23 21:48 fbcon


With vga=0, boot looks horrible because it doesn't display the bootsplash AND the resolution is sets to 640x480 which result in an ugly & bigger boot-interface...
Comment 15 Felix Möller 2007-07-25 13:37:48 UTC
(In reply to comment #11 from Carlos Goncalves)
> P.S.: *Ubuntu suspends to ram without any troubles and modifications - out of
> the box (no vga=0 either)

Carlos you might want to have a look at bug #281798. Ubuntu's suspend scripts are available under http://archive.ubuntu.com/ubuntu/pool/main/a/acpi-support/.
Comment 16 Carlos Gonçalves 2007-07-25 15:22:59 UTC
Tt worked out of the box, after install vbetool package.

Before installing vbetool, the laptop tried to resume without success, but it only ran the fan for a while instead of non-stop as it was doing - some improvements...
Then, after have installed vbetool package, everything worked like a charm!

Now the next step is to integrate your script into kpowersave/powersave/s2ram to also auto load the modules, etc - Stefan, what do you say?! :-)

A big thanks!!
Comment 17 Felix Möller 2007-07-25 16:25:36 UTC
Carlos: 
I am glad that worked!

I added a script integrated into the openSUSE pm-utils framework to my bugreport. You might want to try that too.
Comment 18 Forgotten User ZhJd0F0L3x 2007-07-26 16:53:50 UTC
Carlos: this works now with framebuffer activated? If yes, i could integrate this directly into s2ram.
Unfortunately "my" aspire 1694 is out of town right now, so i cannot reproduce and test here :-(
Comment 19 Carlos Gonçalves 2007-07-26 21:51:40 UTC
Stefan, yes. I just need to execute the Felix's script and it suspends & resumes correctly.
Don't forget that vbetool (rpm 23K) is required so add it to s2ram/powersave as a required package - also, please note that s2ram isn't included on 10.3 KDE CD (probably neither on Gnome CD) so or s2ram (rpm=98K) should be included or integrate the script into powersave (already present in the media).

BTW, didn't tested the second Felix's script because don't know how to proceed - yeah, I know... copy it to /etc/pm/sleep.d/99video but and then what?
Comment 20 Felix Möller 2007-07-26 23:19:50 UTC
(In reply to comment #19 from Carlos Goncalves)
> BTW, didn't tested the second Felix's script because don't know how to proceed
> - yeah, I know... copy it to /etc/pm/sleep.d/99video but and then what?
you have to copy the script to /etc/pm/sleep.d/99video and then it should work from the kde-menu and from the context-menu of kpowersave. 
You may test this on the commandline with pm-suspend.
Comment 21 Carlos Gonçalves 2007-07-27 00:40:39 UTC
Bad news :-(
After chmod +x 99video (needed) it doesn't even suspend.


Part of /var/log/pm-suspend.log:

===== Sex Jul 27 00:22:42 WEST 2007: running hook: /usr/lib/pm-utils/sleep.d/99info =====
===== Sex Jul 27 00:22:42 WEST 2007: running hook: /etc/pm/sleep.d/99video =====
===== Sex Jul 27 00:22:42 WEST 2007: running hook: /etc/pm/sleep.d/99video =====
Sex Jul 27 00:22:42 WEST 2007: done running suspend hooks.
+ /usr/sbin/s2ram
This machine can only suspend without framebuffer.
+ RET=126
+ set +x
Sex Jul 27 00:22:44 WEST 2007: running resume hooks.
Comment 22 Forgotten User ZhJd0F0L3x 2007-07-27 11:28:54 UTC
you need to create a config file in /etc/pm/config.d, for example named
/etc/pm/config.d/config
which only needs to contain one single line:

S2RAM_OPTS="-f -p -s"

This does override the s2ram internal database, which right now still lists this machine as "does not suspend with framebuffer".

So, simply doing (as root)

echo 'S2RAM_OPTS="-f -p -s"' > /etc/pm/config.d/config

should make the machine suspend again.
The s2ram binary is in the "suspend" package, i have to check if that is included on the 1-CD-Media. This would be a severe bug if it wasn't.
Comment 23 Forgotten User ZhJd0F0L3x 2007-07-27 12:29:02 UTC
sidenote: the suspend package is indeed missing from the KDE and GNOME 1-CD-installations. this is tracked in but 295092
Comment 24 Carlos Gonçalves 2007-07-27 16:05:20 UTC
100% working! Thank you guys!!

Closing this bug report...
Comment 25 Forgotten User ZhJd0F0L3x 2007-07-27 16:33:05 UTC
Unfortunately i have to reopen the bug, since i still need to implement this correctly in s2ram, so you don't have to use a special script and configuration, but it will work out of the box.

Thanks to your debugging, this will be easy now :-)
Comment 26 Forgotten User ZhJd0F0L3x 2007-07-30 14:45:56 UTC
Carlos, i'd like to ask you to test my (now hopefully working :-) implementation in s2ram.
Please get the "suspend" package from http://download.opensuse.org/repositories/home:/seife/openSUSE_Factory/i586/
install it (with "rpm -hFv suspend*.rpm" as root), move away /etc/pm/sleep.d/99video (to /tmp/, for example) and try again.
s2ram should now have everything included that was done in your 99video script before and it should just work.
Closing important documents before the test will still be a good idea :-)

Thanks for testing!
Comment 27 Carlos Gonçalves 2007-07-30 15:19:29 UTC
Working a 100%. You rock!

P.S.: I just didn't figured out correcly yet why some times suspend to ram/disk is unavailable to user (those options in KPowersave and Kickoff are disabled/hidden). powersave -u says "User is not allowed for hal-power-suspend according to PolicyKit" - bug #295341 ?! Maybe...
Comment 28 Forgotten User ZhJd0F0L3x 2007-07-30 17:48:22 UTC
Might be, but PolicyKit is outside of my scope - lucky me :-)

The next alpha will have the package with this function. I have not yet changed the whitelist entry of your machine (this will come next, but probably too late for the next alpha), so you'll still need this S2RAM_OPTS config file until then, but after that, everything will just work out of the box.
Comment 29 Forgotten User ZhJd0F0L3x 2007-07-31 17:20:54 UTC
I was wrong, alpha7 will have the correct whitelist entry (due to another severe bug i needed to fix, i was able to sneak it in :-)

Have fun!
Comment 30 Carlos Gonçalves 2007-08-07 02:30:00 UTC
Sorry for not report sooner but I simply had no time to do so.
I'm currently running 10.3 alpha7 and suspend to ram is ok. Although I tried to activate the suspend bootsplash just like Holger Macht says in his blog post (http://blog.homac.de/?p=53) but now resume from ram hangs and the simptoms are the same like I previous reported, before your fix (fan running non-stop, black screen).
Comment 31 Carlos Gonçalves 2007-08-11 13:42:53 UTC
Since it now comes with splash enabled by default I have to specify splash = n manually.

Stefan, can you patch it to resume properly in this machines without having to hack /etc/suspend.conf (I think it's a kind of impossible to display splash in this cases...)
Comment 32 Carlos Gonçalves 2007-08-16 16:11:33 UTC
Updated from alpha7 + factory to beta1 and seems it's fixed.
Closing...
Comment 33 Carlos Gonçalves 2007-08-23 18:52:52 UTC
Now with Beta 2, cannot resume from RAM, again.
Comment 34 Felix Möller 2007-08-23 19:37:58 UTC
(In reply to comment #33 from Carlos Gonçalves)
> Now with Beta 2, cannot resume from RAM, again.
Did you wait a few minutes?

My MacBook takes 3 minutes at the moment to resume. I get the following in the logs when pressing the power button immediately after suspending.
===== Thu Aug 23 20:35:40 CEST 2007: running hook: /usr/lib/pm-utils/sleep.d/99info =====
Thu Aug 23 20:35:40 CEST 2007: done running suspend hooks.
+ /usr/sbin/s2ram
Allocated buffer at 0x2010 (base is 0x0)
ES: 0x0201 EBX: 0x0000
Function not supported?
Switching from vt7 to vt1
Calling save_state
fbcon fb0 state 1
Calling restore_state_from
fbcon fb0 state 0
switching back to vt7
+ RET=0
+ set +x
Thu Aug 23 20:38:03 CEST 2007: running resume hooks.
===== Thu Aug 23 20:38:03 CEST 2007: running hook: /usr/lib/pm-utils/sleep.d/99info =====
Comment 35 Carlos Gonçalves 2007-08-23 21:11:22 UTC
(In reply to comment #34 from Felix Möller)
> (In reply to comment #33 from Carlos Gonçalves)
> > Now with Beta 2, cannot resume from RAM, again.
> Did you wait a few minutes?

Yes, but got nothing :-/

Comment 36 Carlos Gonçalves 2007-08-26 16:59:51 UTC
Have just updated my laptop BIOS for the latest version and everything works again. Thanks all!

Closing (again and hope not reopen it :)