black screen during sleep resuming

Hello,

I have a Sony laptop and sometimes I would like to make it sleep on closing the lid. In fact it works, however when I reopen the lid, resuming doesn't works. The laptop does something (I hear it wake up) but the screen stays black. Does someone know how to fix it? The problem is the same if I use the sleep button in Gnome.

# sysctl -a | grep hw.acpi

Code:
hw.acpi.supported_sleep_state: S3 S4 S5
hw.acpi.power_button_state: S5
hw.acpi.sleep_button_state: S3
hw.acpi.lid_switch_state: S3
hw.acpi.standby_state: NONE
hw.acpi.suspend_state: S3
hw.acpi.sleep_delay: 1
hw.acpi.s4bios: 0
hw.acpi.verbose: 0
hw.acpi.disable_on_reboot: 0
hw.acpi.handle_reboot: 1
hw.acpi.reset_video: 0
hw.acpi.cpu.cx_lowest: C1
hw.acpi.thermal.min_runtime: 0
hw.acpi.thermal.polling_rate: 10
hw.acpi.thermal.user_override: 0
hw.acpi.thermal.tz0.temperature: 46,0C
hw.acpi.thermal.tz0.active: -1
hw.acpi.thermal.tz0.passive_cooling: 0
hw.acpi.thermal.tz0.thermal_flags: 0
hw.acpi.thermal.tz0._PSV: 100,0C
hw.acpi.thermal.tz0._HOT: -1
hw.acpi.thermal.tz0._CRT: 102,0C
hw.acpi.thermal.tz0._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
hw.acpi.thermal.tz0._TC1: 0
hw.acpi.thermal.tz0._TC2: 50
hw.acpi.thermal.tz0._TSP: 0
hw.acpi.thermal.tz1.temperature: 23,0C
hw.acpi.thermal.tz1.active: -1
hw.acpi.thermal.tz1.passive_cooling: 0
hw.acpi.thermal.tz1.thermal_flags: 0
hw.acpi.thermal.tz1._PSV: -1
hw.acpi.thermal.tz1._HOT: -1
hw.acpi.thermal.tz1._CRT: 90,0C
hw.acpi.thermal.tz1._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
hw.acpi.thermal.tz1._TC1: -1
hw.acpi.thermal.tz1._TC2: -1
hw.acpi.thermal.tz1._TSP: -1
hw.acpi.battery.life: 100
hw.acpi.battery.time: -1
hw.acpi.battery.state: 0
hw.acpi.battery.units: 1
hw.acpi.battery.info_expire: 5
hw.acpi.acline: 1

Thanks.
 
I got this issue too, but with a Lenovo v100 laptop. Until now I couldn't find the solution yet.
 
This is my dmesg output after a black screen during resume and a 'hard' reboot :

Code:
Copyright (c) 1992-2011 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.2-RELEASE-p2 #0 r221583M: Thu Jun 16 20:06:25 CEST 2011
    heavenboy@heavenboy-freebsd:/usr/obj/usr/src/sys/GENERIC amd64
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Core(TM) i5 CPU       U 470  @ 1.33GHz (1330.01-MHz K8-class CPU)
  Origin = "GenuineIntel"  Id = 0x20655  Family = 6  Model = 25  Stepping = 5
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x9ae3bd<SSE3,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT>
  AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
  AMD Features2=0x1<LAHF>
  TSC: P-state invariant
real memory  = 4294967296 (4096 MB)
avail memory = 3752390656 (3578 MB)
ACPI APIC Table: <Sony VAIO>
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 SMT threads
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  4
 cpu3 (AP): APIC ID:  5
ioapic0: Changing APIC ID to 2
ioapic0 <Version 2.0> irqs 0-23 on motherboard
Cuse4BSD v0.1.14 @ /dev/cuse
kbd1 at kbdmux0
ichwd module loaded
acpi0: <Sony> on motherboard
acpi0: [ITHREAD]
ACPI Error: No handler for Region [RAM_] (0xffffff0001b6ca00) [EmbeddedControl] (20101013/evregion-487)
ACPI Error: Region EmbeddedControl(0x3) has no handler (20101013/exfldio-382)
ACPI Error: Method parse/execution failed [\\_SB_.PCI0.LPCB.SNC_.SBRT] (Node 0xffffff0001b93240), AE_NOT_EXIST (20101013/psparse-633)
ACPI Error: Method parse/execution failed [\\_SB_.PCI0.LPCB.EC0_._REG] (Node 0xffffff0001b8fac0), AE_NOT_EXIST (20101013/psparse-633)
acpi0: Power Button (fixed)
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
cpu2: <ACPI CPU> on acpi0
cpu3: <ACPI CPU> on acpi0
acpi_ec0: <Embedded Controller: GPE 0x17> port 0x62,0x66 on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0x3050-0x3057 mem 0xd0000000-0xd03fffff,0xc0000000-0xcfffffff irq 16 at device 2.0 on pci0
agp0: <Intel Ironlake (M) SVGA controller> on vgapci0
agp0: detected 131068k stolen memory
agp0: aperture size is 256M
pci0: <simple comms> at device 22.0 (no driver attached)
ehci0: <Intel PCH USB 2.0 controller USB-B> mem 0xd4405c00-0xd4405fff irq 16 at device 26.0 on pci0
ehci0: [ITHREAD]
usbus0: EHCI version 1.0
usbus0: <Intel PCH USB 2.0 controller USB-B> on ehci0
hdac0: <Intel PCH High Definition Audio Controller> mem 0xd4400000-0xd4403fff irq 22 at device 27.0 on pci0
hdac0: HDA Driver Revision: 20100226_0142
hdac0: [ITHREAD]
pcib1: <ACPI PCI-PCI bridge> at device 28.0 on pci0
pci2: <ACPI PCI bus> on pcib1
ath0: <Atheros 9285> mem 0xd3400000-0xd340ffff irq 16 at device 0.0 on pci2
ath0: [ITHREAD]
ath0: AR9285 mac 192.2 RF5133 phy 14.0
pcib2: <ACPI PCI-PCI bridge> at device 28.2 on pci0
pci3: <ACPI PCI bus> on pcib2
alc0: <Atheros AR8131 PCIe Gigabit Ethernet> port 0x1000-0x107f mem 0xd2400000-0xd243ffff irq 18 at device 0.0 on pci3
alc0: 15872 Tx FIFO, 15360 Rx FIFO
alc0: Using 1 MSI message(s).
miibus0: <MII bus> on alc0
atphy0: <Atheros F1 10/100/1000 PHY> PHY 0 on miibus0
atphy0:  10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master,
 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
alc0: Ethernet address: 54:42:49:a2:41:53
alc0: [FILTER]
ehci1: <Intel PCH USB 2.0 controller USB-A> mem 0xd4405800-0xd4405bff irq 23 at device 29.0 on pci0
ehci1: [ITHREAD]
usbus1: EHCI version 1.0
usbus1: <Intel PCH USB 2.0 controller USB-A> on ehci1
pcib3: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci4: <ACPI PCI bus> on pcib3
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel 5 Series/3400 Series PCH SATA300 controller> port 0x3048-0x304f,0x305c-0x305f,0x3040-0x3047,0x3058-0x305b,0x3020-0x303f
 mem 0xd4405000-0xd44057ff irq 19 at device 31.2 on pci0
atapci0: [ITHREAD]
atapci0: AHCI called from vendor specific driver
atapci0: AHCI v1.30 controller with 4 3Gbps ports, PM not supported
ata2: <ATA channel 0> on atapci0
ata2: [ITHREAD]
ichsmb0: <Intel PCH SMBus controller> port 0x3000-0x301f mem 0xd4406000-0xd44060ff irq 19 at device 31.3 on pci0
ichsmb0: [ITHREAD]
smbus0: <System Management Bus> on ichsmb0
pci0: <dasp> at device 31.6 (no driver attached)
pcib4: <ACPI Host-PCI bridge> on acpi0
pci255: <ACPI PCI bus> on pcib4
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_button0: <Sleep Button> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
acpi_tz1: <Thermal Zone> on acpi0
acpi_hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 900
atrtc0: <AT realtime clock> port 0x70-0x77 irq 8 on acpi0
atrtc0: Warning: Couldn't map I/O.
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: [ITHREAD]
psm0: model IntelliMouse, device ID 3
battery0: <ACPI Control Method Battery> on acpi0
acpi_acad0: <AC Adapter> on acpi0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ppc0: cannot reserve I/O port range
est0: <Enhanced SpeedStep Frequency Control> on cpu0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
est1: <Enhanced SpeedStep Frequency Control> on cpu1
p4tcc1: <CPU Frequency Thermal Control> on cpu1
est2: <Enhanced SpeedStep Frequency Control> on cpu2
p4tcc2: <CPU Frequency Thermal Control> on cpu2
est3: <Enhanced SpeedStep Frequency Control> on cpu3
p4tcc3: <CPU Frequency Thermal Control> on cpu3
Timecounters tick every 1.000 msec
usbus0: 480Mbps High Speed USB v2.0
usbus1: 480Mbps High Speed USB v2.0
ad4: 305245MB <SAMSUNG HM321HI 2AJ100P5> at ata2-master UDMA100 SATA 3Gb/s
ugen0.1: <Intel> at usbus0
uhub0: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
ugen1.1: <Intel> at usbus1
uhub1: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
hdac0: HDA Codec #0: Realtek ALC269
hdac0: HDA Codec #3: Intel G45 HDMI
pcm0: <HDA Realtek ALC269 PCM #0 Analog> at cad 0 nid 1 on hdac0
pcm1: <HDA Realtek ALC269 PCM #1 Analog> at cad 0 nid 1 on hdac0
pcm2: <HDA Intel G45 HDMI PCM #0 DisplayPort> at cad 3 nid 1 on hdac0
SMP: AP CPU #1 Launched!
SMP: AP CPU #3 Launched!
SMP: AP CPU #2 Launched!
GEOM: ad4: partition 2 does not start on a track boundary.
GEOM: ad4: partition 2 does not end on a track boundary.
GEOM: ad4: partition 1 does not start on a track boundary.
GEOM: ad4: partition 1 does not end on a track boundary.
Root mount waiting for: usbus1 usbus0
Root mount waiting for: usbus1 usbus0
uhub0: 3 ports with 3 removable, self powered
uhub1: 3 ports with 3 removable, self powered
Root mount waiting for: usbus1 usbus0
ugen1.2: <vendor 0x8087> at usbus1ugen0.2: <vendor 0x8087> at usbus0

uhub2: <vendor 0x8087 product 0x0020, class 9/0, rev 2.00/0.00, addr 2> on usbus1
uhub3: <vendor 0x8087 product 0x0020, class 9/0, rev 2.00/0.00, addr 2> on usbus0
uhub3: 6 ports with 6 removable, self powered
Root mount waiting for: usbus1 usbus0
ugen0.3: <Chicony Electronics Co., Ltd.> at usbus0
Root mount waiting for: usbus1 usbus0
ugen0.4: <Broadcom Corp> at usbus0
ubt0: <Broadcom Corp Broadcom Bluetooth Device, class 224/1, rev 2.00/5.96, addr 4> on usbus0
Root mount waiting for: usbus1
Root mount waiting for: usbus1
uhub_attach: Getting USB 2.0 HUB descriptor failed,error=USB_ERR_TIMEOUT
device_attach: uhub2 attach returned 6
uhub2: <vendor 0x8087 product 0x0020, class 9/0, rev 2.00/0.00, addr 2> on usbus1
Root mount waiting for: usbus1
uhub2: 8 ports with 8 removable, self powered
Root mount waiting for: usbus1
Root mount waiting for: usbus1
ugen1.3: <Generic> at usbus1
umass0: <Bulk-In, Bulk-Out, Interface> on usbus1
umass0:  SCSI over Bulk-Only; quirks = 0x0000
Root mount waiting for: usbus1
umass0:1:0:-1: Attached to scbus1
Trying to mount root from ufs:/dev/ad4s2a
WARNING: / was not properly dismounted
(probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 
(probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI status: Check Condition
(probe0:umass-sim0:0:0:0): SCSI sense: NOT READY asc:3a,0 (Medium not present)
da0 at umass-sim0 bus 0 scbus1 target 0 lun 0
da0: <Generic 2.0 Reader   -SD 1.00> Removable Direct Access SCSI-0 device 
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
(probe0:umass-sim0:0:0:1): TEST UNIT READY. CDB: 0 20 0 0 0 0 
(probe0:umass-sim0:0:0:1): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:1): SCSI status: Check Condition
(probe0:umass-sim0:0:0:1): SCSI sense: NOT READY asc:3a,0 (Medium not present)
da1 at umass-sim0 bus 0 scbus1 target 0 lun 1
da1: <Generic 2.0 Reader   -MS 1.00> Removable Direct Access SCSI-0 device 
da1: 40.000MB/s transfers
da1: Attempt to query device size failed: NOT READY, Medium not present
WARNING: /home was not properly dismounted
/home: mount pending error: blocks 148 files 2
wlan0: Ethernet address: 4c:0f:6e:d9:7c:14
WARNING: attempt to domain_add(bluetooth) after domainfinalize()
WARNING: attempt to domain_add(netgraph) after domainfinalize()
 
Moreover, there is no more information in /var/log/messages:

Code:
391 Jun 24 20:11:57 heavenboy-freebsd wpa_supplicant[378]: CTRL-EVENT-SCAN-RESULTS 
[B]392 Jun 24 20:14:15 heavenboy-freebsd acpi: suspend at 20110624 20:14:15            [/B]                                          
393 Jun 24 20:18:24 heavenboy-freebsd syslogd: kernel boot file is /boot/kernel/kernel
394 Jun 24 20:18:24 heavenboy-freebsd kernel: Copyright (c) 1992-2011 The FreeBSD Project.
395 Jun 24 20:18:24 heavenboy-freebsd kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
396 Jun 24 20:18:24 heavenboy-freebsd kernel: The Regents of the University of California. All rights reserved.
397 Jun 24 20:18:24 heavenboy-freebsd kernel: FreeBSD is a registered trademark of The FreeBSD Foundation.
398 Jun 24 20:18:24 heavenboy-freebsd kernel: FreeBSD 8.2-RELEASE-p2 #0 r221583M: Thu Jun 16 20

I have waited four minutes and then I rebooted: no error messages.

To test, which driver(s) or module(s) is annoying during resuming, I have disabled them in /etc/rc.conf and unloaded modules in /boot/loader.conf. I have used zzz on tty0 and I have still the same black screen during resuming.
 
Even if ACPI is not FreeBSD´s strongest point, your problem seems to be the lack of a reliable driver for your graphic card (which I can assume is an Intel Ironlake).

FreeBSD´s Konstantin Belousov seem to be working on it: http://freebsdfoundation.blogspot.com/2011/02/freebsd-foundation-announces-new.html
And the same thing can be said about the DragonFlyBSD guys: http://www.dragonflybsd.org/docs/developer/GEMdrmKMS/

I would advise you to keep an eye on Konstantin Belousov work and DragonFlyBSD efforts, try to get in touch with them and offer to help.

All in all, I have the feeling that you are getting a blank screen on resume because you are not using the right module for your graphic card.

Hope that helps :)
 
I agree with you when you say it "seems to be the lack of a reliable driver for your graphic card". I'm using VESA module whereas I have an Intel graphics card. It's not the first time I have some problem with that. So I will expect the working of FreeBSD´s Konstantin Belousov and DragonFlyBSD to go ahead.

Thanks.
 
The Intel module has worked for me if you disable hardware acceleration. Not ideal, I know, but it stops it from crashing.

Relevant part of /etc/X11/xorg.conf
Code:
Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        Option     "NoAccel"            	# [<bool>]
 
The intel module has worked for me too .. the thing is that his card doesn´t seem to be supported by it :s
 
I agree with gnemmi. My card doesn´t seem to be supported...

Let's show my /etc/X11/xorg.conf

Code:
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen         "Screen0"
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

#Section "ServerFlags"
#	Option 			"Xinerama" "1"
#EndSection

Section "Files"
	ModulePath   "/usr/local/lib/xorg/modules"
	FontPath     "/usr/local/lib/X11/fonts/misc/"
	FontPath     "/usr/local/lib/X11/fonts/TTF/"
	FontPath     "/usr/local/lib/X11/fonts/OTF"
	FontPath     "/usr/local/lib/X11/fonts/Type1/"
	FontPath     "/usr/local/lib/X11/fonts/100dpi/"
	FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
	Load  "dbe"
	Load  "dri"
	Load  "dri2"
	Load  "extmod"
	Load  "glx"
	Load  "record"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Option "XkbLayout" "fr"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/sysmouse"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
	HorizSync    30-107
	VertRefresh  48-120
	Option		 "DPMS"
EndSection


Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "ShadowFB"           	# [<bool>]
        #Option     "DefaultRefresh"     	# [<bool>]
        #Option     "ModeSetClearScreen" 	# [<bool>]
	Identifier  "Card0"
	Driver      "vesa"
	VendorName  "Intel Corporation"
	BoardName   "Core Processor Integrated Graphics Controller"
	Screen 		0
	BusID       "PCI:0:2:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Modes	  "1024x768"
	EndSubSection
EndSection

I have to use vesa module : if I replace vesa by intel and load intel.ko on boot, I have no graphical interface.

# pciconf -lv

Code:
vgapci0@pci0:0:2:0:	class=0x030000 card=0x907c104d chip=0x00468086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = display
    subclass   = VGA
 
I have added in /boot/loader.conf

Code:
acpi_video_load="YES"
acpi_sony_load="YES"

This is the sysctl variables :

# sysctl -a | grep acpi.video

Code:
dev.acpi_video.0.%desc: ACPI video extension
dev.acpi_video.0.%driver: acpi_video
dev.acpi_video.0.%parent: vgapci0

# sysctl -a | grep acpi.sony

Code:
dev.acpi_sony.0.brightness: 0
dev.acpi_sony.0.brightness_default: 0
dev.acpi_sony.0.contrast: 0
dev.acpi_sony.0.bass_gain: 0
dev.acpi_sony.0.pcr: 0
dev.acpi_sony.0.wdp: 0
dev.acpi_sony.0.cdp: 0
dev.acpi_sony.0.azp: 0
dev.acpi_sony.0.lnp: 0
dev.acpi_sony.0.%desc: Sony notebook controller
dev.acpi_sony.0.%driver: acpi_sony
dev.acpi_sony.0.%location: handle=\_SB_.PCI0.LPCB.SNC_
dev.acpi_sony.0.%pnpinfo: _HID=SNY5001 _UID=0
dev.acpi_sony.0.%parent: acpi0

This is the content of /etc/sysctl.conf

Code:
vfs.usermount=1

hw.acpi.lid_switch_state=S3

hw.acpi.reset_video=0
hw.syscons.sc_no_suspend_vtswitch=1

kern.coredump=0

But it's not better
 
Back
Top