Bug 69331 - sleep and wake up does not work on 64 bit OS - Lenovo 3000 N500, model 4233-5MG
Summary: sleep and wake up does not work on 64 bit OS - Lenovo 3000 N500, model 4233-5MG
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Power Management
Classification: Unclassified
Component: Hibernation/Suspend (show other bugs)
Hardware: All Linux
: P1 blocking
Assignee: Zhang Rui
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-23 18:09 UTC by Edmund Laugasson
Modified: 2015-06-26 14:14 UTC (History)
5 users (show)

See Also:
Kernel Version: 3.13.0-031300-generic
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg (62.19 KB, text/plain)
2014-01-23 18:09 UTC, Edmund Laugasson
Details
kernel log (1.21 MB, text/plain)
2014-01-23 18:10 UTC, Edmund Laugasson
Details
pm-powersave.log (271.04 KB, text/plain)
2014-01-23 18:10 UTC, Edmund Laugasson
Details
pm-suspend.log (81.54 KB, text/plain)
2014-01-23 18:11 UTC, Edmund Laugasson
Details
syslog (737.33 KB, text/plain)
2014-01-23 18:11 UTC, Edmund Laugasson
Details
udev (293.45 KB, text/plain)
2014-01-23 18:11 UTC, Edmund Laugasson
Details
Xorg.0.log (34.03 KB, text/plain)
2014-01-23 18:12 UTC, Edmund Laugasson
Details
dmesg and other output files of testing with Ubuntu 15.04 (868.72 KB, application/x-compressed-tar)
2015-02-16 09:54 UTC, Tadas Slotkus
Details

Description Edmund Laugasson 2014-01-23 18:09:00 UTC
Using 64-bit Ubuntu 12.04 LTS.

Sleep and hibernate will not work. Now with 3.13 kernel sometimes very rarely sleep even works.

Last working version was Ubuntu 10.04 LTS but after clean installing Ubuntu 12.04 LTS it never worked anymore.
Comment 1 Edmund Laugasson 2014-01-23 18:09:38 UTC
Created attachment 123131 [details]
dmesg
Comment 2 Edmund Laugasson 2014-01-23 18:10:05 UTC
Created attachment 123141 [details]
kernel log
Comment 3 Edmund Laugasson 2014-01-23 18:10:37 UTC
Created attachment 123151 [details]
pm-powersave.log
Comment 4 Edmund Laugasson 2014-01-23 18:11:03 UTC
Created attachment 123161 [details]
pm-suspend.log
Comment 5 Edmund Laugasson 2014-01-23 18:11:27 UTC
Created attachment 123171 [details]
syslog
Comment 6 Edmund Laugasson 2014-01-23 18:11:45 UTC
Created attachment 123181 [details]
udev
Comment 7 Edmund Laugasson 2014-01-23 18:12:45 UTC
Created attachment 123191 [details]
Xorg.0.log
Comment 8 Edmund Laugasson 2014-01-23 18:22:36 UTC
about laptop:
Lenovo 3000 N500                           NS75M##     4233     5MG
 (15.4" WXGA (1280x800) Glossy display,
 Integrated Camera ,
 Intel Pentium Dual Core processor T3400,
 Mobile Intel GL40 Express Chipset,
 Intel Graphics Media Accelerator 4500M,
 250 GB / 5400 rpm, DVD Recordable, 1 GB,
 Intel Wireless WiFi Link 5100 AGN (1 x 2),
 Modem, Mini-PCIe, 4-in-1 Media Card Reader,
 Express Card,
 Bluetooth wireless, 6-cell battery,
Comment 9 Aaron Lu 2014-01-27 07:28:37 UTC
Please follow https://www.kernel.org/doc/Documentation/power/basic-pm-debugging.txt to do some debugging.
Comment 10 Edmund Laugasson 2014-01-30 18:19:04 UTC
I installed 3.13.1-031301-generic kernel and now it works.

I tried:
# echo reboot > /sys/power/disk
# echo disk > /sys/power/state
and
# echo platform > /sys/power/disk
# echo disk > /sys/power/state
...everything worked - laptop resumed correctly.

Then I used Gnome sleep and hibernate choices from "ratchet" menu top right corner and also these worked.

So - thank you all for good work, I appreciate that!!!
Comment 11 Edmund Laugasson 2014-02-02 08:45:34 UTC
Later usage - I have to say, that sometimes it works and sometimes not. Especially when at evening put to sleep then in the morning sometimes it makes full startup like it was shut down and not sleep. If to shortly after sleep wake up again - it usually works.

Last time when everything worked - Ubuntu 10.04 LTS - as I said in my first post.
I uploaded my log files, tried these power management debugging suggestions - I do not know, what else to do. I guess just wait for better future. I do not have such coding skills to fix it myself.
Comment 12 Aaron Lu 2014-02-07 01:51:11 UTC
(In reply to Edmund Laugasson from comment #11)
> Later usage - I have to say, that sometimes it works and sometimes not.
> Especially when at evening put to sleep then in the morning sometimes it

Is the sleep 'suspend to ram' or 'suspend to disk'?

> makes full startup like it was shut down and not sleep. If to shortly after
> sleep wake up again - it usually works.
Comment 13 Edmund Laugasson 2014-02-07 10:18:28 UTC
As I wrote - I tested manually by entering:
# echo reboot > /sys/power/disk
# echo disk > /sys/power/state
and
# echo platform > /sys/power/disk
# echo disk > /sys/power/state

Then I used Unity/Gnome sleep and hibernate choices from "ratchet" menu top right corner and also these worked. As I wrote later - it sometimes works and sometimes not. Especially when to put sleep for longer time, e.g. for night.

I am not aware about commands behind these choices in Ubuntu but I guess this is 'suspend to ram'.

I guess 'suspend to disk' is called 'hibernate' in other words. Correct me if I am wrong.
Comment 14 Aaron Lu 2014-02-08 01:11:00 UTC
That's correct. So for the problem you have described, i.e. sleep doesn't work after a whole night, I suppose it is just for sleep, not hibernate.

Hmm...it is usually related to firmware if all those tests are passed. Do you have Windows installed, does it work well?
Comment 15 Edmund Laugasson 2014-02-08 08:02:30 UTC
I do not have Windows on that laptop. I actually bought it officially with Vista licence but I never installed it - Ubuntu was the first operating system on that machine.

This is my wife's laptop actually and I asked her to use now hibernate with opened programs and we will see how it works for longer period.

When I tested hibernate for couple of minutes - it worked, both by commands manually and using Gnome hibernate function.
Comment 16 Aaron Lu 2014-03-12 02:58:18 UTC
Does everything work well now?

If not, since we know the kernel shipped with 10.04 LTS works, we will need to do a git bisect to find the offending commit.
Comment 17 Edmund Laugasson 2014-05-18 18:58:22 UTC
Currently using already:

$ uname -r
3.14.4-031404-generic

$ uname -a
Linux hostname 3.14.4-031404-generic #201405130853 SMP Tue May 13 12:54:33 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise

... still same situation - sometimes work and sometimes not. In summer 2014 I guess I try to switch Ubuntu 14.04 LTS but I am afraid, that this does not help.

I repeat situation:
* hibernate will crash before it ends and mentioned computer does restart
* sleep goes to end but after waking up, computer starts from scratch

Some other computers works, e.g. http://www.asus.com/Notebooks_Ultrabooks/ASUS_ZENBOOK_UX32VD/

So - it sounds like that Lenovo N500 has specific hardware issue with kernel.
Comment 18 Aaron Lu 2014-10-17 08:16:10 UTC
What's the status of hibernation and sleep on later kernels?
Comment 19 Edmund Laugasson 2014-10-22 09:11:43 UTC
Still using 64-bit Ubuntu 12.04 LTS with all updates. Recently installed newest kernel 3.17.1 and same situation - sometimes hibernate and sleep works, sometimes not. Sometimes resuming from hibernate/sleep computer just restarts. Or putting to hibernate/sleep it might also restart. This is common behaviour in case the hibernation/sleep does not work.
But as I experienced - under Ubuntu 14.04 LTS the hibernation is disabled by default and even under Asus Zenbook the hibernation does not work when I enabled it :(
Comment 20 Tadas Slotkus 2014-12-28 20:38:54 UTC
Have you tried 32-bit Ubuntu? I have Lenovo n500 with nvidia chip, and suspend to ram works fine with 32bit OS and proprietary Nvidia drivers.
Comment 21 Edmund Laugasson 2014-12-28 22:21:04 UTC
Well - this might be an idea. Currently using 64-bit kernel version 3.18.1 on Ubuntu 12.04 LTS with all latest updates and still no changes. Reinstalling whole system takes some time to prepare. Not sure - can I use whole home folder to easily transfer settings. Also question is - which Linux distro to choose. Is it worth to choose 32-bit Ubuntu 14.04.1 LTS or something else - that's the question. I would probably remain onto Debian-based distro and have ability to use latest apps for internet and communication. Also hardware support is important. But if there are better choices I would probably try - if someone knows - you may suggest. Ubuntu has usually easy way to install drivers and even newer repositories (PPA-s) for that.
Comment 22 Tadas Slotkus 2014-12-28 22:35:51 UTC
You could probably launch some LIVE USB to resize filesystem and partition, say with gparted, of your main OS. Then you could install the other OS alongside for testing. I run Lubuntu on n500, planning to upgrade to Lubuntu 14.04.1.
Comment 23 Tadas Slotkus 2014-12-29 13:27:44 UTC
My machine has 4GB of RAM. I have specifically removed 2GB module and tried 64-bit Fedora 21 Live USB. Tried to suspend multiple times and there was no problem. So I guess there is a problem with RAM or some kind of memory corruption. Running memtest now on all 4GB.
Comment 24 Tadas Slotkus 2014-12-29 14:59:14 UTC
memtest passed without errors.

Added "memmap=99G$0x100000000" to kernel line and it resumes correctly now (tested about 20 times). Though only 3GB of RAM is usable/seen in output of free -m. Took from:
https://bugs.freedesktop.org/show_bug.cgi?id=78530

So I suspect this is BIOS/firmware bug?

Just to remind, my machine has Nvidia gpu.
Comment 25 Edmund Laugasson 2014-12-31 13:03:21 UTC
My machine has Intel GPU and I reinstalled whole laptop with 32-bit Estobuntu 14.04 LTS (http://estobuntu.org/estobuntu-english). Two days it has been worked. So far it works. Estobuntu is just Estonian customized Lubuntu with some minor localized additions like ID-card software etc. Core system is the same as Lubuntu.
This might be RAM error even I tested with memtest several times. But how this RAM-error explains, that 32-bit version works?
Comment 26 Edmund Laugasson 2014-12-31 15:26:06 UTC
I forgot to mention, that I use the latest kernel, what came with system and did not install any newer kernel extra. As I see from APT there is linux-image-3.13.0-43-generic the latest currently.
Comment 27 Zhang Rui 2015-02-15 03:32:07 UTC
Tadas, I didn't see there is any problem on your laptop, did I miss something?

Edmund,
For 64 bit ubuntu. please update the latest kernel you have tried. please also try the latest upstream kernel, and if the problem still exists, please try again with CONFIG_DRM_I915 cleared (you may have a black screen after resume, but we just need to check if the system is still alive, we can try ssh to the machine, or try to suspend in a console and type "dmesg > dmesg.out & reboot" after resume to see if the system can response to the command).
Comment 28 Edmund Laugasson 2015-02-15 08:34:17 UTC
Thank you for paying attention to the mentioned bug. I actually tried each new kernel version until I installed 32-bit version of Lubuntu 14.04 LTS as in #20 post suggested. Actually I used Estobuntu 14.04 which is Lubuntu 14.04 plus added some Estonian-specific packages like ID-card, dictionaries but also multimedia packages, LibreOffice etc to make it comfortable for everyday usage. Then computer's sleep functionality started to work.

I use there stock kernel which is coming through official repositories. This is also for reason that there is no repository for the latest stable kernel in Ubuntu Kernel Team. They only provide downloading .deb packages manually which is also good - otherwise it would not be possible to install newest kernels in such fast way. But manually you do not have much time to update all machine kernels if you have a lot of machines to take care of like I have.

This N500 computer is under active use by user and I cannot just change operating system and reconfigure all programs again - too time consuming - ca 1 day goes for that. Changing kernel was easy but whole operating system is not just few minutes like installing new kernel.

I need separate hard disk drive then for that to install different Linux distros and test it when the computer is not used. In this way there would be possible test 32-bit and 64-bit and possibly even different Ubuntu flavors or even other distros.

I assume there would be possible to install several distros onto same hard drive as there should be possible to create up to 3 primary partition and one extended partition with up to 128 logical volumes. So there can be up to 131 partitions on one hard drive.

As there is possible to use same swap partition then there would be possible up to 130 different Linux distributions to install onto one hard drive if to install onto one partition whole Linux. As it is for testing purposes then it would be not so important to create separate partitions (like /home etc).

I assume you may also have the same hardware (or ability to get it) to test it - this would be much easier and faster than use the computer which is pretty heavily used and even remotely.
Comment 29 Zhang Rui 2015-02-15 09:57:08 UTC
Hi, Edmund,

I totally understand your concern, but unfortunately I don't have such platform thus I can not debug locally.
Trust me, I know it's painful as I have to handle tens of bugs, and I don't have access to any of them. :-)
It is okay that you can not debug this issue at the moment. I just want to know that you're still active in debugging this issue, and you can provide the information require when you have time.

So I will leave the status as it is. Please provide the information requested when it is available. But usually, please keep in sync every month. Our rule is to close a bug if there is no response from the bug reporter for more than a month, and bug reporter can re-open it whenever the requested information can be provided.
Comment 30 Tadas Slotkus 2015-02-15 17:55:55 UTC
Hi Zhang,

I have similar laptop, 42336NG, with Nvidia GPU. And I experienced same issues with 64-bit Linux OS as Edmund described:
* sleep goes to end but after waking up, computer starts from scratch.

On my machine when I run pm-suspend - computer goes to sleep, and you won't notice that there is a problem. Suspend led is blinking. After some time you press some button to wake the computer from sleep and here the issue is that instead of resuming your session it boots like it was turned off completely.

Till know I have few options as workaround:
* Use 32-bit Linux
* add memmap=99G$0x100000000 to kernel line (Only 3GB RAM visible)
* add mem=4096M to kernel line (Only 3GB RAM visible, not tested much)

Maybe it is some sort of memory allocations for PCI devices problem in BIOS?
Comment 31 Tadas Slotkus 2015-02-15 22:57:48 UTC
Tried amd64 Ubuntu 15.04 alpha daily with kernel 3.18.3. Issue is still there. BTW sometimes the computer resumes correctly (without this cold start). But it is random.
Comment 32 Zhang Rui 2015-02-16 01:52:00 UTC
then can you please attach the dmesg output both with and without the mem=4096M kernel option?
Comment 33 Tadas Slotkus 2015-02-16 09:54:10 UTC
Created attachment 167061 [details]
dmesg and other output files of testing with Ubuntu 15.04

With default Kernel command line:
normalboot.dmesg
normalboot.iomem
normalboot.ioports
normalresume.dmesg.1
normalresume.dmesg.2
normalresume.dmesg.3
normalresume.dmesg.4
normalresume.dmesg.5
normalresume.dmesg.6 after this, ran pm-suspend again. But this time resume was same as cold boot.


Added mem=4096M to Kernel command line:
4096mboot.dmesg
4096mboot.iomem
4096mboot.ioports
4096mresume.dmesg.1
4096mresume.dmesg.2
4096mresume.dmesg.3
4096mresume.dmesg.4
4096mresume.dmesg.5
4096mresume.dmesg.6
4096mresume.dmesg.7
4096mresume.dmesg.8
4096mresume.dmesg.9
4096mresume.dmesg.10
4096mresume.dmesg.11
4096mresume.dmesg.12
4096mresume.dmesg.13
4096mresume.dmesg.14
4096mresume.dmesg.15
4096mresume.dmesg.16
4096mresume.dmesg.17
4096mresume.dmesg.18
4096mresume.dmesg.19
4096mresume.dmesg.20
4096mresume.dmesg.21
4096mresume.dmesg.22
4096mresume.dmesg.23
4096mresume.dmesg.24
4096mresume.dmesg.25
4096mresume.dmesg.26
4096mresume.dmesg.27 (suspend resume worked well so I stopped trying)
lsmod
lspci
dmidecode
Comment 34 Zhang Rui 2015-03-16 03:25:20 UTC
can you please rebuild your kernel with i915 disabled, and do S3/S4 in console and see if the problem still exists?
In case you get a black screen after resume, you can check if the system is still alive by
1. remote access, say, ssh
2. type "reboot" use your keyboard and see if the system can response and reboot as expected.
Comment 35 Zhang Rui 2015-03-29 13:15:28 UTC
ping...
Comment 36 Edmund Laugasson 2015-06-26 14:14:25 UTC
As I wrote in comment#28 (https://bugzilla.kernel.org/show_bug.cgi?id=69331#c28) then I installed 32-bit kernel (using linux-image-generic-lts-vivid, linux-headers-generic-lts-vivid metapackages currently) and its based Lubuntu 14.04 LTS with all updates and currently sleep works.
As the machine has 4 GB RAM then 64-bit kernel is not mandatory even some applications are already available only as 64-bit version.
Actually as before 64-bit Ubuntu 12.04 there was also 32-bit Ubuntu 10.04 LTS when everything worked. So - possibly that bug started earlier in 64-bit branch than we know. As long as there is available 32-bit Linux and apps then there is possible to use them.

Note You need to log in before you can comment on or make changes to this bug.