Bug 10293 - VGN-BX297XP fails to suspends to ram
VGN-BX297XP fails to suspends to ram
Status: CLOSED DOCUMENTED
Product: IO/Storage
Classification: Unclassified
Component: Serial ATA
All Linux
: P1 normal
Assigned To: Jeff Garzik
:
Depends on:
Blocks: 7216 56331
  Show dependency treegraph
 
Reported: 2008-03-20 12:36 UTC by GNUtoo
Modified: 2013-04-09 06:23 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.25-rc6
Tree: Mainline
Regression: No


Attachments
dmesg fails with ptyx8 abd ptyub (68.22 KB, application/octet-stream)
2008-03-20 12:56 UTC, GNUtoo
Details
lsof before suspend (36.72 KB, application/octet-stream)
2008-03-20 12:57 UTC, GNUtoo
Details
vgn-bx297xp-brokensuspend.patch (471 bytes, patch)
2009-03-30 07:21 UTC, Tejun Heo
Details | Diff

Description GNUtoo 2008-03-20 12:36:02 UTC
Latest working kernel version:?
Earliest failing kernel version:?
Distribution:gentoo
Hardware Environment:VGN-BX297XP(sony laptop)
Software Environment:
Problem Description:the computer can't go into suspend mode...
i tried pm_trace with the latest kernel but if i wait long enough  before shutting down the computer,i don't have a match:
>PM: Adding info for No Bus:network_throughput
>  Magic number: 0:767:443
>PM: Adding info for No Bus:md0

i also tried the different pm_test from the kernel:
only freezer works fine


Steps to reproduce:
don't start x,
echo 1 >/sys/power/pm_trace
echo mem > /sys/power/state
Comment 1 Rafael J. Wysocki 2008-03-20 12:51:16 UTC
Please try with init=/bin/bash and pm_test set to "devices".
Comment 2 GNUtoo 2008-03-20 12:56:43 UTC
Created attachment 15355 [details]
dmesg fails with ptyx8 abd ptyub
Comment 3 GNUtoo 2008-03-20 12:57:09 UTC
Created attachment 15356 [details]
lsof before suspend
Comment 4 GNUtoo 2008-03-20 12:58:26 UTC
otherwise i get things such as :
  hash matches device ptyx8
  hash matches device ptyub
but no correspondance in lsof before standby
Comment 5 GNUtoo 2008-03-20 13:01:52 UTC
(In reply to comment #1)
> Please try with init=/bin/bash and pm_test set to "devices".
> 

ok i'll try with init=/bin/bash
i already tried pm_test set to device...it fails differently:
before:
the screen doesn't shuts down and there is a _ that freeze
pm_test set to device:
screen shuts itself down...but cpu doesn't and it doesn't want to come back like with freezer.
even pressing the power button doesn't change anything...

i'll re-run it and pay attention if the hdd is acceded after the screen shutdown
(cause my memory isn't great)
Comment 6 GNUtoo 2008-03-20 13:18:07 UTC
no hdd runninng after screen suspension and no messages...
but my usb mouse was powered
(In reply to comment #5)
> (In reply to comment #1)
> > Please try with init=/bin/bash and pm_test set to "devices".
> > 
> 
> ok i'll try with init=/bin/bash
> i already tried pm_test set to device...it fails differently:
> before:
> the screen doesn't shuts down and there is a _ that freeze
> pm_test set to device:
> screen shuts itself down...but cpu doesn't and it doesn't want to come back
> like with freezer.
> even pressing the power button doesn't change anything...
> 
> i'll re-run it and pay attention if the hdd is acceded after the screen
> shutdown
> (cause my memory isn't great)
> 
no hdd runninng after screen suspension and no messages...
>  Magic number: 0:65:749
but my usb mouse was powered

Comment 7 GNUtoo 2008-09-05 13:34:50 UTC
i've retried once more but i've still the same result:
$ dmesg | grep -i magic -C 4
[    6.310494] Using IPI Shortcut mode
[    6.310567] PM: Adding info for No Bus:cpu_dma_latency
[    6.310608] PM: Adding info for No Bus:network_latency
[    6.310645] PM: Adding info for No Bus:network_throughput
[    6.310851]   Magic number: 8:241:97
[    6.311317] Freeing unused kernel memory: 328k freed
[    6.311413] PM: Adding info for No Bus:vcs1
[    6.311489] PM: Adding info for No Bus:vcsa1
[    6.324337] ata1: soft resetting link

but this time i've found that:
http://devresources.linux-foundation.org/dev/robustmutexes/src/fusyn.hg/Documentation/power/video.txt

and i've used a text console(no framebuffer)

and in theses modes the video fails to come back...
*platform
*processor
*core

when i startx in theses cases i don't have a desktop but a blank screen with lines...


could the fact that the computer refuses to goes in standby be related to the video?
Comment 8 Rafael J. Wysocki 2008-09-05 13:38:15 UTC
Yes, it could.

Have you tried s2ram (http://en.opensuse.org/s2ram) already?
Comment 9 GNUtoo 2008-09-06 09:16:01 UTC
I think that vbetool segfaults:
# s2ram --vbe_save --vbe_post --vbe_mode --force
Switching from vt7 to vt1                                    
Calling save_state                                           

Segmentation fault

if i call it only with --force the same problem appears,that is to say:
It refuses to suspend... with a _ blinking on the top left of the screen
Comment 10 Rafael J. Wysocki 2008-09-06 09:20:44 UTC
Which kernel did you test it with?
Comment 11 GNUtoo 2008-09-07 02:37:04 UTC
Linux port4 2.6.26_port4 #4 PREEMPT Fri Sep 5 21:15:46 CEST 2008 i686 Intel(R) Pentium(R) M processor 2.00GHz GenuineIntel GNU/Linux

it's a vanilla kernel...that is to say the kernel from kenrel.org without patches
Comment 12 Zhang Rui 2008-11-20 19:43:01 UTC
seems like driver problem.
does the problem still exist in 2.6.27 kernel?
please build device drivers as modules if possible. then re-do the test in comment #1.
Comment 13 GNUtoo 2008-11-21 08:05:42 UTC
yes it does...
I tested it but not with evrythings as modules...
i'll retry...with modules...
I'll also do init=/bin/bash,that will do it inside initrd...so I will be able to remove hdd's support and similar
Comment 14 GNUtoo 2008-12-02 08:23:58 UTC
I've tried the following(in busybox of the intrd):
lsmod | sed 's/ .*//' > modules
for x in modules:
do
rmmod $x
done

and I rmmodded the modules that were lasting...
then i did an echo mem > /sys/power/state
and...it worked...it suspended!!!
but when it came out of suspend i didn't have my screen back...so I did a reboot
Comment 15 GNUtoo 2008-12-02 08:25:31 UTC
by the way I did a perl script for converting my kernel .config in modules...so every thing that could be as module is as module(even the filesystems)...
Comment 16 Zhang Rui 2008-12-02 18:01:45 UTC
you don't need to compile everything as modules,
this time, please try to remove some device drivers.
how about just removing all pci device drivers except the harddisk?
Comment 17 Zhang Rui 2009-03-18 19:17:32 UTC
ping GNUtoo. :)
plus you'd better do the test in 2.6.28
Comment 18 GNUtoo 2009-03-25 20:16:52 UTC
I tested my usual config(that is nearly evrything as =y) and it didn't suspend as usual...
Maybe I should make a script for loading and unloading the modules and testing suspend...but it would be very time consuming

I'll also try radeonfb to see if it can restore the screen.
Comment 19 GNUtoo 2009-03-25 20:17:10 UTC
(In reply to comment #18)
> I tested my usual config(that is nearly evrything as =y) and it didn't suspend
> as usual...
> Maybe I should make a script for loading and unloading the modules and testing
> suspend...but it would be very time consuming
> 
> I'll also try radeonfb to see if it can restore the screen.

with 2.6.29
Comment 20 GNUtoo 2009-03-25 22:33:54 UTC
I found the module that prevented suspend...it's ata_piix
unfortunately:
*I haven't ahci in my bios
*my hdds reside on the ata_piix controller
so I bet I'd have to wait for a fix
Comment 21 GNUtoo 2009-03-25 22:37:47 UTC
(by the way my screen comes back as black with vesafb and without framebuffer(I don't see the logo) and I wasn't able to make radeonfb work maybe the pci id issue  is still present i'll investigate for radeonfb)
Comment 22 GNUtoo 2009-03-25 22:39:49 UTC
(In reply to comment #20)
> I found the module that prevented suspend...it's ata_piix
> unfortunately:
> *I haven't ahci in my bios
> *my hdds reside on the ata_piix controller
> so I bet I'd have to wait for a fix
more precisely:
with:
rmmod ata_piix
echo mem > /sys/power/state
I can suspend
and without the rmmod ata_piix I can't
Comment 23 Zhang Rui 2009-03-26 00:54:21 UTC
Re-assign to Tejun.
Comment 24 Tejun Heo 2009-03-26 01:42:39 UTC
Hmmm... Can you please post the output of dmidecode?
Comment 25 GNUtoo 2009-03-26 14:09:29 UTC
(In reply to comment #24)
> Hmmm... Can you please post the output of dmidecode?

 # dmidecode
# dmidecode 2.9
SMBIOS 2.31 present.
18 structures occupying 717 bytes.
Table at 0x000DB810.

Handle 0x0000, DMI type 0, 20 bytes
BIOS Information
	Vendor: Phoenix Technologies LTD
	Version: R0190X5
	Release Date: 07/10/2006
	Address: 0xE1BF0
	Runtime Size: 123920 bytes
	ROM Size: 1024 kB
	Characteristics:
		ISA is supported
		PCI is supported
		PC Card (PCMCIA) is supported
		PNP is supported
		APM is supported
		BIOS is upgradeable
		BIOS shadowing is allowed
		ESCD support is available
		Boot from CD is supported
		Selectable boot is supported
		EDD is supported
		8042 keyboard services are supported (int 9h)
		CGA/mono video services are supported (int 10h)
		ACPI is supported
		USB legacy is supported
		AGP is supported
		IEEE 1394 boot is supported
		Smart battery is supported
		BIOS boot specification is supported
		Function key-initiated network boot is supported

Handle 0x0001, DMI type 1, 25 bytes
System Information
	Manufacturer: Sony Corporation
	Product Name: VGN-BX297XP
	Version: C1016CKZ
	Serial Number: 28242164-5000945
	UUID: 76D200E0-38D5-11DA-8138-0013A9A909D4
	Wake-up Type: Power Switch

Handle 0x0002, DMI type 2, 8 bytes
Base Board Information
	Manufacturer: Sony Corporation
	Product Name: Q-Project
	Version: 01
	Serial Number: 12345678-12345678

Handle 0x0003, DMI type 3, 17 bytes
Chassis Information
	Manufacturer: Reserved
	Type: Notebook
	Lock: Not Present
	Version: Reserved
	Serial Number: Reserved
	Asset Tag: Reserved
	Boot-up State: Unknown
	Power Supply State: Unknown
	Thermal State: Unknown
	Security Status: Unknown
	OEM Information: 0x00000000

Handle 0x0004, DMI type 4, 35 bytes
Processor Information
	Socket Designation: N/A
	Type: Central Processor
	Family: Other
	Manufacturer: GenuineIntel
	ID: D8 06 00 00 FF FB E9 AF
	Version: Intel(R) Pentium(R) M processor
	Voltage: 3.3 V
	External Clock: 133 MHz
	Max Speed: 2000 MHz
	Current Speed: 2000 MHz
	Status: Populated, Enabled
	Upgrade: None
	L1 Cache Handle: 0x0005
	L2 Cache Handle: 0x0006
	L3 Cache Handle: 0x0007
	Serial Number: N/A
	Asset Tag: N/A
	Part Number: N/A

Handle 0x0005, DMI type 7, 19 bytes
Cache Information
	Socket Designation: L1 Cache
	Configuration: Enabled, Socketed, Level 1
	Operational Mode: Write Back
	Location: Internal
	Installed Size: 32 KB
	Maximum Size: 32 KB
	Supported SRAM Types:
		Burst
		Pipeline Burst
		Asynchronous
	Installed SRAM Type: Asynchronous
	Speed: Unknown
	Error Correction Type: Unknown
	System Type: Other
	Associativity: 8-way Set-associative

Handle 0x0006, DMI type 7, 19 bytes
Cache Information
	Socket Designation: L2 Cache
	Configuration: Enabled, Socketed, Level 2
	Operational Mode: Write Back
	Location: Internal
	Installed Size: 2048 KB
	Maximum Size: 2048 KB
	Supported SRAM Types:
		Burst
		Pipeline Burst
		Asynchronous
	Installed SRAM Type: Burst
	Speed: Unknown
	Error Correction Type: Unknown
	System Type: Data
	Associativity: 8-way Set-associative

Handle 0x0007, DMI type 7, 19 bytes
Cache Information
	Socket Designation: L3 Cache
	Configuration: Enabled, Socketed, Level 3
	Operational Mode: Write Back
	Location: Internal
	Installed Size: 0 KB
	Maximum Size: 0 KB
	Supported SRAM Types:
		Unknown
	Installed SRAM Type: Unknown
	Speed: Unknown
	Error Correction Type: Unknown
	System Type: Unknown
	Associativity: Unknown

Handle 0x0008, DMI type 9, 13 bytes
System Slot Information
	Designation: PCCARD1
	Type: 32-bit PC Card (PCMCIA)
	Current Usage: Available
	Length: Other
	ID: Adapter 0, Socket 1
	Characteristics:
		5.0 V is provided
		3.3 V is provided
		PC Card-16 is supported
		Cardbus is supported
		PME signal is supported

Handle 0x0009, DMI type 11, 5 bytes
OEM Strings
	String 1: JPBL-001918
	String 2: FNC-EXTB
	String 3: 9W1M00000000907FB04D4EA54D48
	String 4: Reserved 
	String 5: Reserved 

Handle 0x000A, DMI type 16, 15 bytes
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: Unknown
	Maximum Capacity: 2048 GB
	Error Information Handle: Not Provided
	Number Of Devices: 2

Handle 0x000B, DMI type 17, 21 bytes
Memory Device
	Array Handle: 0x000A
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 1024 MB
	Form Factor: SODIMM
	Set: None
	Locator: SODIMM1
	Bank Locator: Bank 0
	Type: DDR
	Type Detail: Unknown

Handle 0x000C, DMI type 17, 21 bytes
Memory Device
	Array Handle: 0x000A
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 512 MB
	Form Factor: SODIMM
	Set: None
	Locator: SODIMM2
	Bank Locator: Bank 1
	Type: DDR
	Type Detail: Unknown

Handle 0x000D, DMI type 19, 15 bytes
Memory Array Mapped Address
	Starting Address: 0x00000000000
	Ending Address: 0x0005FFFFFFF
	Range Size: 1536 MB
	Physical Array Handle: 0x000A
	Partition Width: 0

Handle 0x000E, DMI type 20, 19 bytes
Memory Device Mapped Address
	Starting Address: 0x00000000000
	Ending Address: 0x0003FFFFFFF
	Range Size: 1 GB
	Physical Device Handle: 0x000B
	Memory Array Mapped Address Handle: 0x000D
	Partition Row Position: Unknown
	Interleave Position: Unknown
	Interleaved Data Depth: Unknown

Handle 0x000F, DMI type 20, 19 bytes
Memory Device Mapped Address
	Starting Address: 0x00040000000
	Ending Address: 0x0005FFFFFFF
	Range Size: 512 MB
	Physical Device Handle: 0x000C
	Memory Array Mapped Address Handle: 0x000D
	Partition Row Position: Unknown
	Interleave Position: Unknown
	Interleaved Data Depth: Unknown

Handle 0x0010, DMI type 32, 20 bytes
System Boot Information
	Status: No errors detected

Handle 0x0011, DMI type 127, 4 bytes
End Of Table
Comment 26 Tejun Heo 2009-03-30 07:21:14 UTC
Created attachment 20730 [details]
vgn-bx297xp-brokensuspend.patch

Sorry about the delay.  Does the attached patch make any difference?
Comment 27 GNUtoo 2009-03-30 21:50:06 UTC
thanks a lot!!! 
it works now...even with X and everything
(I had to use vbetools)(I only have a little problem at resume:my real tty console doesn't use all the screen)
(I used: vbetool vbestate save > /tmp/delme; echo 3 > /proc/acpi/sleep; vbetool post; vbetool vbestate restore < /tmp/delme; setfont drdos8x16)
The only thing is that I have to switch to a tty before suspend otherwise I've got garbage on the screen...
Comment 28 Tejun Heo 2009-03-31 01:38:31 UTC
Thanks for testing, so the BIOS expects the ATA controller to be powered when the OS calls in for ACPI sleep state.  Rafael, I think we talked about this before but is it necessary to power of a PCI device at all for suspend?  Anyways, I'll forward the patch upstream.

For the video related problems, yeah, unfortunately, video suspend/resume is still a bit of black magic but with coming KMS I think it will get better.  Distros usually ship some sort of assorted black magic suspend/resume helper which usually includes switching VTs, so you might wanna try to find out if there's any for whatever you're using.

Resolving as FIXED.  Thanks.
Comment 29 Tejun Heo 2009-03-31 01:39:04 UTC
Hmm... I can't change the status or reassign the bug to me.  Jeff, can you please close it?

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