Acer Aspire 5720 hangs on second resume from suspend, i.e. suspends only once [BIOS PROBLEM]

Bug #160763 reported by Enrico Gueli on 2007-11-07
84
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Linux
Fix Released
Medium
Ubuntu
Undecided
Unassigned
Declined for Lucid by Tim Gardner
Maverick
Undecided
Unassigned
linux (Ubuntu)
Medium
Unassigned
Declined for Lucid by Tim Gardner
Maverick
Medium
Unassigned
linux-source-2.6.22 (Ubuntu)
Undecided
Tim Gardner
Declined for Lucid by Tim Gardner
Maverick
Undecided
Tim Gardner

Bug Description

This problem has been posted in Ubuntuforums (http://ubuntuforums.org/showthread.php?t=600450), but got no answer.

My Acer Aspire 5720 running Ubuntu Gutsy 7.10 is unable to resume from a standby when another standby/resume has occurred. The power LED turns from blinking orange to stable green, but screen backlight remains off and - I suppose - the processor fan stays off too. I can hear the hard drive and CD-ROM spinning up, but the system is completely unresponsive. I have to turn it off pressing the power key long enough.

On Windows XP and Vista, standby works OK.

*UPDATE*

this is BIOS problem. system hangs early and doesn't pass control to Linux.
Linux has no chance to bring system back.

The BIOS hangs due to a bug that windows doesn't trip over due to its ACPI noncompliance.
There is a reserved memory region called ACPI NVS, which belongs to BIOS
and supposed to be saved/restored during suspend to disk.

However, Windows *against* the ACPI spec, saves/restores this region on suspend to ram too.

BIOS changes this region slightly on resume, and this change,
 (more precisely a single byte change at <region start> + 0x29010 00->0xFF)
makes it hang on second resume. Since windows restores this region, this change is also restored and thus masks this bug.

Its likely that next version of linux kernel will adopt same behavior.

Latest BIOS to have this bug is 1.42 (and updating to semi-official(doesn't show up on all acer sites) 1.45 BIOS, was reported to keep this bug)

These are the attempts made so far. Where not specified, nothing changed in the behaviour.
- adding "ec_intr=0" to the boot cmdline;
- adding "acpi_osi=!Linux";
- executing Ubuntu in single-user mode, using /etc/acpi/sleep.sh to sleep;
toggling the following flags in /etc/default/acpi-support, one by one:
- ACPI_SLEEP_MODE=standby -> the script stops and says "echo: write: No such device" writing 'standby' to /sys/power/state
- SAVE_VBE_STATE=false
- POST_VIDEO=false
- USE_DPMS=false
- DISABLE_DMA=true
- RESET_DRIVE=true
- ENABLE_LAPTOP_MODE=true
- DOUBLE_CONSOLE_SW=true
- toggling more than one flag like described here: http://de.wikibooks.org/wiki/Asus_W3N-Kompendium:_Ubuntu_Suspend_to_Ram -> hangs on first resume
- disabling all services in /etc/rcS.d, then killing most of the processes, then removing most of the modules;
- adding "noapic nolapic" to the boot cmdline -> hangs on first resume;
- adding "pci=routeirq" to the boot cmdline;
- toggling BIOS SATA emulation from AHCI to PATA;
- disabling all scripts in /etc/acpi/{suspend,resume}.d -> apart from the screen unable to work at first resume, nothing changed;
- upgrading BIOS from 1.14 to 1.19;

Any help is VERY appreciated! This is definitely the bug that keeps me to using Linux for everyday work...

Enrico Gueli (e-gueli) wrote :
Enrico Gueli (e-gueli) wrote :
Enrico Gueli (e-gueli) wrote :
Enrico Gueli (e-gueli) wrote :

Here is uname -a output:
Linux ris8-laptop 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686 GNU/Linux

Thinking about something changed in the ACPI configuration, I tried to get a sort of dump from /sys, then getting the differences just before and just after the first standby.

It made three successive dumps via "cp -a /sys sys1N" where N is 1 to 3 (to see the constantly changing elements, mainly /sys/slab/) and another three dumps via "cp -a sys sys2N". For all dumps I deleted each symlink to let diff work. The attached file is the diff between sys13 and sys21 (the dumps "nearest" to the standby period), with the constantly changed elements removed.

I hoped I could see something useful to identify the problem, but I'm not expert in this field. So I hope it could mean anything to you.

Enrico Gueli (e-gueli) wrote :

filing to linux-source-2.6.22

The Hardy Heron Alpha2 release will be coming out soon. It will have an updated version of the kernel. It would be great if you could test with this new release and verify if this issue still exists. I'll be sure to update this report when Alpha2 is available. Thanks!

Changed in linux:
status: New → Incomplete

I'm opened a new task against the actively developed kernel and am closing the report against linux-source-2.6.22. Thanks!

Enrico Gueli (e-gueli) wrote :

Thank you very much, I'll stay tuned and give news as soon as I can.
Where can I found other info about the task you opened?

Enrico Gueli (e-gueli) wrote :

I downloaded and tried alpha2. At live run, it hangs exactly the same way :(

Hi, I have a Acer Aspire 5720 and this happens with me too.
Temperature is very high and fans seems not work.

Enrico Gueli (e-gueli) wrote :

AFAIK, other three people have the same problem as mine; one of them have exactly my laptop model, the other two are the ones who posted in the parallel Ubuntuforums.com thread.
Davis, the only thing I can tell about your temperature problem is that I heard about this problem in another bug, maybe you'll have luck.

Last night I compiled acer-acpi (http://code.google.com/p/aceracpi/) and the problem with CPU frequency that I have was solved.
But lost brightness control. Fans aren't working yet, soon I will do eggs in my keyboard (temp is very high).

Huh, now suspend and hibernate works ok too!

Enrico Gueli (e-gueli) wrote :

Davis, I got acer_acpi too but nothing about suspend changed here :(

Thanks for testing ris8_allo_zen0. After you attempt to suspend/resume, can you capture and then attach your dmesg output for the newer kernel. Thanks!

I'm opened a new task against the actively developed kernel and am closing the report against linux-source-2.6.22. Thanks!

Changed in linux-source-2.6.22:
status: New → Won't Fix
Enrico Gueli (e-gueli) wrote :

Here is the dmesg you requested. I marked the point where/when I wrote the sleep command (/etc/acpi/sleep.sh).

Should I do something to keep myself updated about the bug progress? Is this bug report still available?

ris8_allo_zen0, thanks for the update. The following might actually help debug when you attempt to suspend for a second time:

https://wiki.ubuntu.com/DebuggingKernelSuspend

Care to see if anything useful shows up in your dmesg output and if so attach that as well.

Also, it looks like you are subscribed to this bug report so you should receive email whenever anything changes about this report (a new comment is added, status is updated etc). Hope that helps. Thanks!

Hi,

My Acer have some problems too.
Your fans are working???

Here my cpu arrives 75 degrees and ubuntu turn off.
At the windows or BIOS setup fans are working.

Cheers!

Em Sex, 2007-12-28 às 20:26 +0000, ris8_allo_zen0 escreveu:
> Here is the dmesg you requested. I marked the point where/when I wrote
> the sleep command (/etc/acpi/sleep.sh).
>
> Should I do something to keep myself updated about the bug progress? Is
> this bug report still available?
>
> ** Attachment added: "dmesg output after first suspend/resume"
> http://launchpadlibrarian.net/11085123/dmesg.txt.gz

Davis Zanetti Cabral wrote:
> Hi,
>
> My Acer have some problems too.
> Your fans are working???
>
> Here my cpu arrives 75 degrees and ubuntu turn off.
> At the windows or BIOS setup fans are working.
>
Hi,
my fans usually work OK, either in Gutsy and in Hardy-alpha2 (both 32-bit).
They stop working after an hibernation and don't work at all in 64-bit
Gutsy (which I now removed).
After the laptop turns off due to over-heat, when I return into Ubuntu
Gutsy the temp is reported always 85° and the fans are always on until
next reboot.
That's what happens to me.

However I suggest you to look in another bug report, here we're trying
to solve the "second suspend" issue.

Greetings & happy new year
Enrico

Leann Ogasawara wrote:
> ris8_allo_zen0, thanks for the update. The following might actually
> help debug when you attempt to suspend for a second time:
>
> https://wiki.ubuntu.com/DebuggingKernelSuspend
>
> Care to see if anything useful shows up in your dmesg output and if so
> attach that as well.
>
Thank *you* for the help :)
I did that procedure some time ago with Gutsy, but I see that nothing
really changed with Hardy:
[ 22.532421] NET: Registered protocol family 1
[ 22.532499] Using IPI No-Shortcut mode
[ 22.532668] Magic number: 3:980:787
[ 22.532752] hash matches device ptyq9
[ 22.532995] Freeing unused kernel memory: 364k freed
[ 22.558652] input: AT Translated Set 2 keyboard as
/devices/platform/i8042/serio0/input/input1

The row "hash matches device" is always different for each run, and the
time wasn't messed up as that page said.
My hypothesis is that the CPU didn't boot at all, although the power Led
turns green and something starts to spin up (maybe the hard drive).
Indeed, while frozen, the machine makes less noise than normal.

ris8_allo_zen0 escreveu:
> However I suggest you to look in another bug report, here we're trying
> to solve the "second suspend" issue.
>
> Greetings & happy new year
> Enrico
I found some problems with ACPI on kernel 2.6.22.

Quote from: http://gentoo-wiki.com/HARDWARE_Acer_Aspire_5720#coretemp
*
> *Warning:* There is a bug in kernel 2.6.22-23: ACPI thermal_zone is
> not updated after boot, so CPU fan is not started to cool CPU down.
> This seems to affect only x86_64 arch, so please be warned to avoid
> serious hardware damages!
> (You can track this bug here: http://bugzilla.kernel.org/show_bug.cgi,
> bug number 9167)
I will t*ry recompile the kernel with 2.6.23.12 (steps here:
http://www.portugal-a-programar.org/forum/index.php/topic,17259.0.html).
Thanks and happy new year to you too!

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: Incomplete → Triaged

This bug is still present with Hardy and 2.6.24-16 kernel...

Thanks for the update. I'll try to get the kernel teams attention on this. You may also want to test the Intrepid kernel once it is available (most likely soon). I'll try to let you know.

I'm also removing the linux-source-2.6.24 task since beginning with the Hardy release cycle kernel bugs should be reported against the "linux" package which this report already is. Thanks.

Changed in linux-source-2.6.24:
status: New → Invalid

Hi Guys,

Care to test the Intrepid Ibex 8.10 kernel, it is currently available in the following PPA:

https://edge.launchpad.net/~kernel-ppa/+archive

If you are not familiar with how to install packages from a PPA basically do the following:

Create the file /etc/apt/sources.list.d/kernel-ppa.list to include the following two lines:

deb http://ppa.launchpad.net/kernel-ppa/ubuntu hardy main
deb-src http://ppa.launchpad.net/kernel-ppa/ubuntu hardy main

Then run the command:

sudo apt-get update

You should then be able to install the linux-image-2.6.25 kernel package. Please let us know your results. Thanks.

Enrico Gueli (e-gueli) wrote :

Hello,
I've successfully installed linux-image-2.6.25-1-generic, and run it in recovery mode (i.e. root shell, no X).
Executed sync; echo 1 > /sys/power/pm_trace; /etc/acpi/sleep.sh force (it complains pm_trace doesn't exist; maybe it was removed in 2.6.25?)

Nothing changed, I still can do suspend-resume only once :(

I've read https://wiki.ubuntu.com/UnderstandingSuspend. Since the backlight doesn't turn on, I suppose it's something related to video BIOS. My graphics card is an Intel X3100/GM965.

In the meanwhile, I've already upgraded the system BIOS from 1.19 to 1.34.

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Enrico Gueli (e-gueli) wrote :

I upgraded my distro with "apt-get update" / "apt-get dist-upgrade". The bug is still there.
In the meanwhile, I upgraded the BIOS to version 1.40 and tried to avoid loading as many modules as possible, keeping just ext3 and the ones it needs (jbd, mbcache...), by editing /etc/initramfs-conf/{initramfs.conf,modules} and running mkinitramfs. The bug is still there.

:-(

Anything else I can do?

Many thanks

Boris Kazakov (boris-kazakov) wrote :

I'm also experiencing similar problems on aser acpire 7720. System hangs after second resume. I'm running Ubuntu 8.10

uname -a:
Linux boris-laptop 2.6.27-4-generic #1 SMP Mon Sep 22 04:40:44 UTC 2008 i686 GNU/Linux

Boris Kazakov (boris-kazakov) wrote :

I've also noticed that after first suspend if i press ctrl+alt+f1 to switch to the text console, the video memory seems to be corrupt (some parts of screen are flickering, all fonts are messed - can't distinguish single character).

Philippe Chabbert (p-chabbert) wrote :

Same problem for me with the following configuration:
Ubuntu 8.04.1 with kernel 2.6.24.21, M2N-E motherboard and NVIDIA GeForce 7600 GS

I also noticed that if I disabled the screen saver but in the energy management windows enable the shutdown of the screen the screen shutdown afer the specified time, resume if I move the mouse but never shutdown again until the next reboot.

florian (afschneidt) wrote :

I have the same problem on an Acer 5715Z, second resume doesn´t work.
(Doesn work with Mandriva or Suse either..)

Enrico Gueli (e-gueli) wrote :

With BIOS version 1.42 and Intrepid released (kernel 2.6.27-7), nothing changed.

nickolai (nickolai) wrote :

A long shot, but do you have Intel's TXT feature enabled in your BIOS? If so, you may want to try disabling it. I have found that to cause problems resuming a second time on an IBM Thinkpad.

Enrico Gueli (e-gueli) wrote :

No, such a feature isn't even mentioned in the BIOS settings.

I found that bug #206952 (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/206952) is quite similar, although it refers to a different model.
Also, http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-09/msg06715.html talks about the same bug with a 5720G laptop. Also that thread showed no solutions so far.

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

Exactly same issue.

Just exactly, and no solution.

I found out that on second resume bios doesn't pass control to the system

Maybe we all should fill a complain to acer support?

(Remember how foxconn (if I remember correctly) motherboards got fixed?)

For them it is trivial to fix this bug, all they need is to see where their bios hangs

I guess that many if not all 5720 systems (not only -G) are affected.

Enrico Gueli (e-gueli) wrote :

Maxim,
thank you for your effort in trying to find out the problem, as you reported in the other mailing list. It definitely looks like it's a BIOS bug, not a Linux one. Instead of fixing it with a BIOS upgrade (there were so many since the initial release), the Acer guys wrote a workaround in the Windows drivers so that only Windows users can freely suspend their machines. I think it's an unfair discrimination against non-Windows users.
I agree with you in writing a complain to Acer support. I'll try in the next days to call their tech support to report the problem and get some info about a "collective" complain.

It'd be nice to know if there's any 5720 without this bug...

florian (afschneidt) wrote :

Enrico
Please make also sure to tell them that the Aspire 1715Z is having exactly the same bug!
Greetings, Florian

jonp (jonandmeg) wrote :

Ditto for Aspire 7720

mud4d0 (mmudado) wrote :

Same machine (Aspire 5720z), same problem. After second suspend never wakes up again.

But I Solved the other problem of acpi temperature (fans not starting) by doing a bios update to 1.42 (see acer update site).

Maxim Levitsky (maximlevitsky) wrote :

Exactly same thing, I also use 1.42 now, fans fixed, resume no.

I also double checked everything, this is just straight, no control is passed to Linux on resume.

pramsay13 (forums-pramsay13) wrote :

Same for me and my 5720, first suspend resumes fine, but second one totally hangs. Nothing for it but to restart laptop.
Bummer.

jordanp123 (jarose6) wrote :

Same here, first resume is fine, but second just hangs with a gray screen. Acer 5720.

Maxim Levitsky (maximlevitsky) wrote :

It might be connected to usb.

Look at my thread,
http://www.gossamer-threads.com/lists/linux/kernel/1057978?page=last

Note that now, in 2.6.30-rc same happens as what I described in this thread, but with old ehci code.

This means that something else triggered same behavior. I bisect when have time.

There really is a need for some creative thinking.

Acer Aspire 5720Z, Ubuntu 9.04., unfortunately the same issue - hangs on second resume. Flashed BIOS (1.42 -> 1.45), but no change.

mrrusof (ruslanledesmagarza) wrote :

I've got an aceer 5720 and have the same problem here.

Enrico: what is the fix that was written for windows? do you know? maybe we can try to fix it.

Enrico Gueli (e-gueli) wrote :

mrrusof, there was no "fix" for windows. There, the suspend/resume worked just out of the box.

mrrusof (ruslanledesmagarza) wrote :

I'm confused. You mentioned earlier that there is a workaround in software for windows. I wonder if you wanted to say that you know there (evidently) exists this workaround but you don't know how to implement it.

mrrusof (ruslanledesmagarza) wrote :

Hi again,

I'm using I've tried several things since last time. I'm using ubuntu 9.04 64 bits...

- Tried using quirks, but didn't try all of them.
- Tried using some grub kernel options (taken from http://people.freedesktop.org/~hughsient/quirk/quirk-suspend-advanced.html):
    * maxcpus=1
    * noapic
    * nolapic
    * noapic nolapic
    * nolapic_timer
    * nohz=off
    * ec_burst=1
- Tried debugging the suspend proccess, but all I got was:

mrrusof@mrrusof-laptop:~$ cat dmesg.txt | grep "hash matches"
[ 3.995026] hash matches /build/buildd/linux-2.6.28/drivers/base/power/main.c:390

and

mrrusof@mrrusof-laptop:~$ cat dmesg.txt | grep "resume"
[ 5.203097] PM: Starting manual resume from disk
[ 14.361930] synaptics was reset on resume, see synaptics_resume_reset if you have trouble on resume

I cannot find any clue about a driver interfering with the resume proccess.

- I can hibernate. Suspension works once, but not twice in a row. However, if I alternate hibernations with suspensions, the system resumes after both hibernation and suspension.

- I see that Maxim Letvisky got some hint about modifying kernel itself. I wonder if he tried (and in that case, succeeded). See http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-09/msg06756.html .

I just need to be pointed in the right direction to bring this bug down, come on guys!

mrrusof (ruslanledesmagarza) wrote :

btw, one of the quirks "s3 bios" or "s3 mode" causes the system to hang on the first resume from suspend. This (obviously) happens if one uses both.

Also, you can find my dmesg.txt obtained after a failed resume from suspend.

Maxim Levitsky (maximlevitsky) wrote :

Nope, I have tried everything.

Pretty much it is very simple, bios expects something from the system on resume. I am pretty sure it is something that is very OS specific. It is almost impossible to do anything about it, except somehow find a contact with acer bios team.

Btw, do anybody of you have a installed bluetooch module, and this problem?

(I thought that maybe bios pokes at USB at resume, and it expects some state from it?)

Of course I must repeat, that using a minimal kernel with absolutely nothing doesn't help at all

mrrusof (ruslanledesmagarza) wrote :

I wonder if it is possible to get the bios into the same state as if the computer had just booted by either (1) resetting the bios somehow via software or (2) reset registers or whatever in the bios. Option two would work if there could be a way of looking at the "state" of the bios before the system goes to suspension and after it resumes the first time.

Also, I would greatly appreciate any suggested literature about this.

Maxim: So, did the patch in comment #18 for the brightness control work? (http://bugzilla.kernel.org/show_bug.cgi?id=13121). Thanks.

Enrico Gueli (e-gueli) wrote :

Sorry to reply so late to post #50, I thought I did it already. mrrusof, my hypotesis is that the Acer developers wrote a driver that ebmeds the workaround, and shipped it with the preinstalled Windows, thus without releasing any subsequent patch.
Another hypotesis is that the BIOS developers tested the suspend/resume only on Windows. Since Windows is not ACPI compliant (otherwise, life for non-Windows users would be much easier), neither is the BIOS. We could ask Acer to release another BIOS version, but wouldn't that break suspend/resume on Windows systems?

mrrusof (ruslanledesmagarza) wrote :

Enrico,

By BIOS version do you mean BIOS firmware? If that is the case, then if it were possible for this update to be ACPI compliant and preserve backwards compatibility I don't see why it would break suspend/resume on windows. But, of course, this is an uninformed guess.

I wish I had time to go and look for your hypothetical driver and reverse engineer it.

Maxim Levitsky (maximlevitsky) wrote :

@mrrusof, sure acpi brightness works correctly with this, but yet, it is still badly broken
see my post about this:
http://www.nabble.com/Mess-with-hardware-brightness-keys-td23244488.html

I nowadays just use acer-wmi, since it works.

@Enrico Gueli, there is no such driver, or it is included by default in vista.

I didn't like default language, and thus reinstalled vista from clean disk.
I did then install 'drivers', but only very minimal subset of them (althought I did install their video drivers, you know, maybe I do need to reinstall vista, and see how it works without anything added)

As for state reset, it isn't easy. just look at /proc/iomem

7fcfd000-7fd07fff : reserved
7fd08000-7fd51fff : System RAM
7fd52000-7fd54fff : reserved
7fd55000-7fdbafff : System RAM
7fdbb000-7fdbefff : reserved
7fdbf000-7fe6ffff : System RAM
7fe70000-7febefff : ACPI Non-volatile Storage
7febf000-7fefffff : ACPI Tables
7ff00000-7fffffff : reserved

as you see these regions are reserved for bios, and they aren't small. It is a good idea, to try to resote 'em, and you know, I give it another try. don't hold your breath though, I already did plenty of things like that, and nothing seems to help

Can Koy (cankoy) wrote :
hepaly (hurezi) wrote :

Same problem in karmic beta.

luke (luca-a-e-cimmino) wrote :

Same problem als in ubuntu 9.10

kronoszx (kronoszx) wrote :

Same problem in ubuntu 10.04 beta. When will be fixed?!

Dave Cabot (dave-cabot) wrote :

I'm experiencing the same. Acer Aspire 5720Z locks up on return from suspend. Ubuntu 10.04 released.

Maxim Levitsky (maximlevitsky) wrote :

Any progress on writing a mail to acer on that?

summary: Acer Aspire 5720 hangs on second resume from suspend, i.e. suspends only
- once
+ once [BIOS PROBLEM]
Enrico Gueli (e-gueli) wrote :

Maxim,
some months ago I've tried to both write a mail in Italian to the official Acer's euro support address, but they just replied (in Italian) with something like "we can't offer support for linux-related problems" (although I said in my mail that some BIOS updates solved issues related to Linux too :-/).

Maxim Levitsky (maximlevitsky) wrote :

Well that is obvious, thats why I never bothered to contact their support in first place.
However if we were to act together, it might work.

I remember a story about one motherboard vendor that placed anti-linux checks (due to stupidity though) in the ACPI tables.
This prevented suspend, became public, and they eventually fixed it.

Remember, the only way to fix that bug is to make acer fix the BIOS, because it hands on resume, not linux!.

description: updated
description: updated
Maxim Levitsky (maximlevitsky) wrote :

Like I said in kernel bug report I always fix a problem, it just sometimes takes awfull amount of time.

Enjoy!

(This is not exactly a fix, more a workaround, but it makes suspend to ram work always on my acer aspire 5720G)

Download full text (3.4 KiB)

How i can apply this fix.diff?

Un saludo

    Luis e. Castro

El 19/05/2010, a las 23:27, Maxim Levitsky <email address hidden>
escribió:

> Like I said in kernel bug report I always fix a problem, it just
> sometimes takes awfull amount of time.
>
> Enjoy!
>
> (This is not exactly a fix, more a workaround, but it makes suspend to
> ram work always on my acer aspire 5720G)
>
> ** Patch added: "fix.diff"
> http://launchpadlibrarian.net/48777450/fix.diff
>
> --
> Acer Aspire 5720 hangs on second resume from suspend, i.e. suspends
> only once [BIOS PROBLEM]
> https://bugs.launchpad.net/bugs/160763
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in The Linux Kernel: Unknown
> Status in Ubuntu: Invalid
> Status in “linux” package in Ubuntu: Triaged
> Status in “linux-source-2.6.22” package in Ubuntu: Won't Fix
>
> Bug description:
> This problem has been posted in Ubuntuforums (http://ubuntuforums.org/showthread.php?t=600450
> ), but got no answer.
>
> My Acer Aspire 5720 running Ubuntu Gutsy 7.10 is unable to resume
> from a standby when another standby/resume has occurred. The power
> LED turns from blinking orange to stable green, but screen backlight
> remains off and - I suppose - the processor fan stays off too. I can
> hear the hard drive and CD-ROM spinning up, but the system is
> completely unresponsive. I have to turn it off pressing the power
> key long enough.
>
> On Windows XP and Vista, standby works OK.
>
> *UPDATE*
>
> this is BIOS problem. system hangs early and doesn't pass control to
> Linux.
> Linux has no chance to bring system back.
>
> It not possible to understand what triggers that BIOS hang.
> It probably is some bug that by chance doesn't trigger on windows.
>
> These are the attempts made so far. Where not specified, nothing
> changed in the behaviour.
> - adding "ec_intr=0" to the boot cmdline;
> - adding "acpi_osi=!Linux";
> - executing Ubuntu in single-user mode, using /etc/acpi/sleep.sh to
> sleep;
> toggling the following flags in /etc/default/acpi-support, one by one:
> - ACPI_SLEEP_MODE=standby -> the script stops and says "echo: write:
> No such device" writing 'standby' to /sys/power/state
> - SAVE_VBE_STATE=false
> - POST_VIDEO=false
> - USE_DPMS=false
> - DISABLE_DMA=true
> - RESET_DRIVE=true
> - ENABLE_LAPTOP_MODE=true
> - DOUBLE_CONSOLE_SW=true
> - toggling more than one flag like described here: http://de.wikibooks.org/wiki/Asus_W3N-Kompendium:_Ubuntu_Suspend_to_Ram
> -> hangs on first resume
> - disabling all services in /etc/rcS.d, then killing most of the
> processes, then removing most of the modules;
> - adding "noapic nolapic" to the boot cmdline -> hangs on first
> resume;
> - adding "pci=routeirq" to the boot cmdline;
> - toggling BIOS SATA emulation from AHCI to PATA;
> - disabling all scripts in /etc/acpi/{suspend,resume}.d -> apart
> from the screen unable to work at first resume, nothing changed;
> - upgrading BIOS from 1.14 to 1.19;
>
> I followed the instructions at https://wiki.ubuntu.com/DebuggingKernelSuspend
> . If I execute that command even for first standby, at next reboot I
> have thes...

Read more...

Maxim Levitsky (maximlevitsky) wrote :

@krnoszx. You will need kernel source

then you apply it with 'patch -p1 < fix.diff'

Download full text (3.5 KiB)

Im new using ubuntu (and linux) I have the kernel source but when I tryed to
apply the patch:

patch -p1 <fix.diff or sudo patch -p1 < fix.diff

Hunk #1 FAILED at 216.
Hunk #2 FAILED at 295.
2 out of 2 hunks FAILED -- saving rejects to file drivers/acpi/sleep.c.rej

This is the output...

What I doing wrong?

(sorry, Im spanish and I dont use english for years)

Un Saludo

  Eduardo Castro

web: www.ecdesign.es
mail: <email address hidden>

2010/5/19 Maxim Levitsky <email address hidden>

> @krnoszx. You will need kernel source
>
> then you apply it with 'patch -p1 < fix.diff'
>
> --
> Acer Aspire 5720 hangs on second resume from suspend, i.e. suspends only
> once [BIOS PROBLEM]
> https://bugs.launchpad.net/bugs/160763
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in The Linux Kernel: Unknown
> Status in Ubuntu: Invalid
> Status in “linux” package in Ubuntu: Triaged
> Status in “linux-source-2.6.22” package in Ubuntu: Won't Fix
>
> Bug description:
> This problem has been posted in Ubuntuforums (
> http://ubuntuforums.org/showthread.php?t=600450), but got no answer.
>
> My Acer Aspire 5720 running Ubuntu Gutsy 7.10 is unable to resume from a
> standby when another standby/resume has occurred. The power LED turns from
> blinking orange to stable green, but screen backlight remains off and - I
> suppose - the processor fan stays off too. I can hear the hard drive and
> CD-ROM spinning up, but the system is completely unresponsive. I have to
> turn it off pressing the power key long enough.
>
> On Windows XP and Vista, standby works OK.
>
> *UPDATE*
>
> this is BIOS problem. system hangs early and doesn't pass control to Linux.
> Linux has no chance to bring system back.
>
> It not possible to understand what triggers that BIOS hang.
> It probably is some bug that by chance doesn't trigger on windows.
>
> These are the attempts made so far. Where not specified, nothing changed in
> the behaviour.
> - adding "ec_intr=0" to the boot cmdline;
> - adding "acpi_osi=!Linux";
> - executing Ubuntu in single-user mode, using /etc/acpi/sleep.sh to sleep;
> toggling the following flags in /etc/default/acpi-support, one by one:
> - ACPI_SLEEP_MODE=standby -> the script stops and says "echo: write: No
> such device" writing 'standby' to /sys/power/state
> - SAVE_VBE_STATE=false
> - POST_VIDEO=false
> - USE_DPMS=false
> - DISABLE_DMA=true
> - RESET_DRIVE=true
> - ENABLE_LAPTOP_MODE=true
> - DOUBLE_CONSOLE_SW=true
> - toggling more than one flag like described here:
> http://de.wikibooks.org/wiki/Asus_W3N-Kompendium:_Ubuntu_Suspend_to_Ram ->
> hangs on first resume
> - disabling all services in /etc/rcS.d, then killing most of the processes,
> then removing most of the modules;
> - adding "noapic nolapic" to the boot cmdline -> hangs on first resume;
> - adding "pci=routeirq" to the boot cmdline;
> - toggling BIOS SATA emulation from AHCI to PATA;
> - disabling all scripts in /etc/acpi/{suspend,resume}.d -> apart from the
> screen unable to work at first resume, nothing changed;
> - upgrading BIOS from 1.14 to 1.19;
>
> I followed the instructions at
> https://wiki.ubuntu.com/DebuggingKernel...

Read more...

On Thu, 2010-05-20 at 01:36 +0000, kronoszx wrote:
> Im new using ubuntu (and linux) I have the kernel source but when I tryed to
> apply the patch:
>
> patch -p1 <fix.diff or sudo patch -p1 < fix.diff
>
> Hunk #1 FAILED at 216.
> Hunk #2 FAILED at 295.
> 2 out of 2 hunks FAILED -- saving rejects to file drivers/acpi/sleep.c.rej
>
> This is the output...
>
> What I doing wrong?
You seems to do everything right.
You are likely to have older kernel.

This patch is against 2.6.34

Best regards,
Maxim Levitsky

kronoszx (kronoszx) wrote :

in what folder you have to execute that patch or... how i can apply it
manually?

El jue, 20-05-2010 a las 03:08 +0000, Maxim Levitsky escribió:
> On Thu, 2010-05-20 at 01:36 +0000, kronoszx wrote:
> > Im new using ubuntu (and linux) I have the kernel source but when I tryed to
> > apply the patch:
> >
> > patch -p1 <fix.diff or sudo patch -p1 < fix.diff
> >
> > Hunk #1 FAILED at 216.
> > Hunk #2 FAILED at 295.
> > 2 out of 2 hunks FAILED -- saving rejects to file drivers/acpi/sleep.c.rej
> >
> > This is the output...
> >
> > What I doing wrong?
> You seems to do everything right.
> You are likely to have older kernel.
>
> This patch is against 2.6.34
>
> Best regards,
> Maxim Levitsky
>

Maxim Levitsky (maximlevitsky) wrote :

On Thu, 2010-05-20 at 18:07 +0000, kronoszx wrote:
> in what folder you have to execute that patch or... how i can apply it
> manually?

in root of kernel tree.

Since you have to compile the kernel anyway, just grab 2.6.34,
and patch it.

Best regards,
Maxim Levitsky

>
>
> El jue, 20-05-2010 a las 03:08 +0000, Maxim Levitsky escribió:
> > On Thu, 2010-05-20 at 01:36 +0000, kronoszx wrote:
> > > Im new using ubuntu (and linux) I have the kernel source but when I tryed to
> > > apply the patch:
> > >
> > > patch -p1 <fix.diff or sudo patch -p1 < fix.diff
> > >
> > > Hunk #1 FAILED at 216.
> > > Hunk #2 FAILED at 295.
> > > 2 out of 2 hunks FAILED -- saving rejects to file drivers/acpi/sleep.c.rej
> > >
> > > This is the output...
> > >
> > > What I doing wrong?
> > You seems to do everything right.
> > You are likely to have older kernel.
> >
> > This patch is against 2.6.34
> >
> > Best regards,
> > Maxim Levitsky
> >
>

Enrico Gueli (e-gueli) wrote :

Maxim... you're AWESOME!! Thanks for the effort!!

I've tried to apply the patch against the 2.6.34 kernel from git, but patch prints a strange output:

Hunk #1 succeeded at 213 (offset -3 lines).
Hunk #2 succeeded at 590 with fuzz 2 (offset 292 lines).

Indeed, it applies the hunk #2 to a completely different function (acpi_hibernation_finish()) rather than acpi_suspend_finish(), that simply doesn't exist in my sleep.c. Obviolusly, that doesn't work

Are you currently using some unofficial kernel branch?

Thanks!

Maxim Levitsky (maximlevitsky) wrote :

On Fri, 2010-05-21 at 18:21 +0000, Enrico Gueli wrote:
> Maxim... you're AWESOME!! Thanks for the effort!!
>
> I've tried to apply the patch against the 2.6.34 kernel from git, but
> patch prints a strange output:
>
> Hunk #1 succeeded at 213 (offset -3 lines).
> Hunk #2 succeeded at 590 with fuzz 2 (offset 292 lines).

2.6.34 from git it no longer 2.6.34...
now merge window is open, and lot of stuff was merged it.
Still its strange, because I just switched to that kernel now, and my
patch applies.

To be honest I used wireless-testing + nouveau master + few my own
patches.
But I really don't think this matters.

This is the patch I use now:

Best regards,
Maxim Levitsky

commit 5084e5abd66fa7d2cd77390d4708bb2c8a543f40
Author: Maxim Levitsky <email address hidden>
Date: Thu May 20 00:18:28 2010 +0300

    power: store/restore NVS area on suspend to ram too

    This fixes suspend on my notebook.

    This is probably workaround around bug in bios,
    but maybe The Other OS also does that?

    Signed-off-by: Maxim Levitsky <email address hidden>

diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 24741ac..f1920ed 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -216,6 +216,9 @@ static int acpi_suspend_begin(suspend_state_t pm_state)
    pm_state);
   error = -ENOSYS;
  }
+
+ hibernate_nvs_alloc();
+ hibernate_nvs_save();
  return error;
 }

@@ -295,6 +298,8 @@ static void acpi_suspend_finish(void)
 {
  acpi_ec_resume_transactions();
  acpi_pm_finish();
+ hibernate_nvs_restore();
+ hibernate_nvs_free();
 }

 static int acpi_suspend_state_valid(suspend_state_t pm_state)

Maxim Levitsky (maximlevitsky) wrote :

On Fri, 2010-05-21 at 18:21 +0000, Enrico Gueli wrote:
> Maxim... you're AWESOME!! Thanks for the effort!!
>
> I've tried to apply the patch against the 2.6.34 kernel from git, but
> patch prints a strange output:
>
> Hunk #1 succeeded at 213 (offset -3 lines).
> Hunk #2 succeeded at 590 with fuzz 2 (offset 292 lines).
>
> Indeed, it applies the hunk #2 to a completely different function
> (acpi_hibernation_finish()) rather than acpi_suspend_finish(), that
> simply doesn't exist in my sleep.c. Obviolusly, that doesn't work
>
> Are you currently using some unofficial kernel branch?
>
> Thanks!
>
Aha, sorry for confusion.
I missed a local patch that is supposed to be upstream,
I attach it here.

In general this patch solves rare hand on resume from disk.

Best regards,
Maxim Levitsky

Enrico Gueli (e-gueli) wrote :

OK, applying acpi-ec-pm-fix-race-between-ec.patch first and the suspend patch to the Ubuntu Maverick kernel makes an happy patching.
Now, time for compiling... I hope I can give good news soon :)

Best regards, Enrico

Enrico Gueli (e-gueli) wrote :

No good news for now :( With 2.6.34 kernel (with no patches applied), suspend doesn't even work once. Even with a raw "echo mem > /sys/power/state", the kernel freezes somewhere just before entering suspend state. But this problem is outside this bug, I hope to solve it soon.

Best regards, Enrico

Maxim Levitsky (maximlevitsky) wrote :

@Enrico Gueli, this is strange because I never had that problem.
What graphical card you have?

Enrico Gueli (e-gueli) wrote :

It's an Intel GMA X3100, included in the GM965 chipset. Any clue?

Maxim Levitsky (maximlevitsky) wrote :

On Sat, 2010-05-22 at 21:56 +0000, Enrico Gueli wrote:
> It's an Intel GMA X3100, included in the GM965 chipset. Any clue?
>
Don't know really,

Changed in linux (Ubuntu):
assignee: nobody → Maxim Levitsky (maximlevitsky)
Maxim Levitsky (maximlevitsky) wrote :

For these of you who are too lazy/busy/... compiling the kernel, here is userspace workaround.
Compile attached program writereg.c (gcc -owritereg writereg.c), put it in /usr/local/bin, and then use attached script,
make_s2ram_work after first resume.

If the output is something like (you see FF):
writing 0 to <address> (current value = FF)

Then its likely that my fix works.
Try to suspend again. If works then you can use this script after each suspend to clear the state that causes the hang on following resume

Maxim Levitsky (maximlevitsky) wrote :
Maxim Levitsky (maximlevitsky) wrote :

oops, this is source

Maxim Levitsky (maximlevitsky) wrote :
description: updated
Enrico Gueli (e-gueli) wrote :

Maxim, the userspace program works for me!
I successfully suspended the laptop three times in a row.

Now I'm trying to put the command on a resume script, so I won't need to think about it anymore :)

Maxim Levitsky (maximlevitsky) wrote :

just put in to /etc/pm/sleep.d/

Enrico Gueli (e-gueli) wrote :

Just my little contribution:
1- copy writereg and make_s2ram_work to /usr/sbin
2- copy the attached script to /usr/lib/pm-utils/sleep.d

This will make make_s2ram_work everytime the system is resumed.

description: updated
description: updated
description: updated
Maxim Levitsky (maximlevitsky) wrote :

The fix for this problem is conceptually accepted upstream, and I hope soon will appear in 2.6.35 kernel and therefore in 10.10

Any pointers to the discussion? I can't see anything new on the upstream report.

Maxim Levitsky (maximlevitsky) wrote :

The fix will be present upstream very soon, the pull request is already sent to Linus
http://lkml.org/lkml/2010/6/12/7

Maxim Levitsky (maximlevitsky) wrote :

And now that Linus is back from vacation, the fix is finally in he's tree.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2a6b69765ad794389f2fc3e14a0afa1a995221c2

Now, its just a matter of time before Maveric picks the fix.

I mark this as fix released therefore

Changed in linux (Ubuntu):
status: Triaged → Fix Released

Cool, much thanks Maxim!

The bug should not be closed though, since it's not fixed in Maverick yet. I've also opened a task for Lucid since the patch could be backported to benefit Acer users.

For kernel developers, here's the commit message:

ACPI: Store NVS state even when entering suspend to RAM

https://bugzilla.kernel.org/show_bug.cgi?id=13931 describes a bug where
a system fails to successfully resume after the second suspend. Maxim
Levitsky discovered that this could be rectified by forcibly saving
and restoring the ACPI non-volatile state. The spec indicates that this
is only required for S4, but testing the behaviour of Windows by adding
an ACPI NVS region to qemu's e820 map and registering a custom memory
read/write handler reveals that it's saved and restored even over suspend
to RAM. We should mimic that behaviour to avoid other broken platforms.

Changed in linux (Ubuntu):
status: Fix Released → Triaged
assignee: Maxim Levitsky (maximlevitsky) → nobody
Tim Gardner (timg-tpi) wrote :

The patches required for a backport to Lucid 2.6.32 are a bit more then are appropriate for stable updates. Therefore, I'm declining to fix this in Lucid.

David Lucas (david-lucas) wrote :

Maxim and Enrico,

Many thanks for pursuing this bug. The workaround scripts works very well on the Acer 7720G as well.

Joshua Kugler (jkugler) wrote :

Just to note: while this *may* not be the same bug, the scripts/workarounds posted do not fix the problem on a Dell Insprion E1705/9400.

tags: added: patch
Tim Gardner (timg-tpi) wrote :

The fix was contained in 2.6.35-rc4 which is linux-2.6.35-7.10

Changed in linux-source-2.6.22 (Ubuntu Maverick):
assignee: nobody → Tim Gardner (timg-tpi)
status: Won't Fix → Fix Released
Changed in linux (Ubuntu Maverick):
status: Triaged → Fix Released
Frodon (frodon) wrote :

Same issue here with Lucid Lynx and a acer 5720G, i tried the script proposed by Maxim and Enrico but still no luck for the moment. Like others i have this issue since the beginning (before 8.04) with this laptop.

Can we expect a backport of the fix for Lucid Lynx for those who use LTS releases only ?

Frodon (frodon) wrote :

My bad, please ignore previous post (i forgot to give +x rights to some of the scripts)

The scripts work like a charm and i can get suspend working more than once for the first time on lucid lynx, i am so grateful for the time you spent fixing this issue.

Maxim & Enrico, you both rock !

Changed in linux:
status: Unknown → Fix Released
Changed in linux:
importance: Unknown → Medium
Olcay Korkmaz (olci) wrote :

lastest bios updates fix fan issue on models such as Aspire 5315, Aspire 5320, Aspire 5715Z, Aspire 5720, Aspire 7320, Aspire 7720

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.