You are not logged in.

#1 2013-09-07 19:40:38

archlinux20130905
Member
Registered: 2013-09-05
Posts: 17

suspend to ram/disk on asus

Dear all,

I have an old Asus Z9200VA laptop. If I use the key-sequence Fn+F1, it should suspend to either ram or disk. Indeed the laptop seems to "suspend" (the power led blinks; the screen goes blank and the fan stops working). However after I press a button (e.g. Ctrl) the laptop "awakens" but the display becomes completely garbled with black horizontal "stripes". I always have to "blindly" press Ctrl+Alt+F1, login into root and type in 'reboot' after that in order to reboot the laptop and restore the display.

I read somethere that this may be caused by drivers, which should be unbound before suspension and bound again after the awakening. I even found a script, which does that, in an Ubuntu forum. I adjusted the script and placed it in /etc/pm/sleep.d as suggested by the article in that forum. But it appears that the following script is never called:

#!/bin/bash
# Disables echi / ohci / uhci ports on suspend and reenables them on resume. 
# Place this script in /etc/pm/sleep.d


function unbind_usb {
	for driver in uhci_hcd ehci-pci radeon; do
		cd "/sys/bus/pci/drivers/${driver}";
		ids=$(ls | grep :);
		echo $ids > /tmp/DISABLED_$driver;
		for id in $ids; do
			echo "Unbinding $id";
			echo -n "$id" > unbind;
		done;
	done;
	for module in uhci_hcd ehci_pci radeon; do
		modprobe -r $module;
	done;
}

function bind_usb {
	for driver in uhci_hcd ehci-pci radeon; do
		cd "/sys/bus/pci/drivers/${driver}";
		for id in $(cat /tmp/DISABLED_$driver); do
			echo "Binding $id";
			echo -n "$id" > bind;
		done;
		rm /tmp/DISABLED_$driver;
	done;
	for module in uhci_hcd ehci_pci radeon; do
		modprobe $module;
	done;
}

case "$1" in
	hibernate|suspend)
		echo "I have been called" > /root/called;
		unbind_usb;
	;;
	thaw|resume)
		bind_usb;
		# Uncomment the following two lines if USB devices stutter after resume
		unbind_usb;
		bind_usb;
	;;
	*)
	exit 1;
	;;
esac;
exit 0;

Because the file /root/called is never created. I try to unbind all the drivers and unload all the modules related to the usb slots and the ATI Radeon graphics card in the laptop. If I call the script manually in order to test it, the system freezes. But I guess that can be expected if one tries to unload the graphics card driver. ;-) Is this even the correct approach to the problem?

I would also like to know, whether or not the module asus_laptop, which is loaded for my laptop, can be configured and where I can find the configuration files? I would like to "associate" the above script (assuming that it actually solves the garbled display problem) with the "Zz"-sequence Fn+F1. asus_laptop should first execute the script, then suspend and after the reawakening it should call the script again with the 'thaw'/'resume'-parameter. How can I do that?

Regards
Chris

Offline

#2 2013-09-07 21:38:49

rufus
Banned
From: san francisco
Registered: 2013-04-20
Posts: 153

Re: suspend to ram/disk on asus

try #systemctl suspend
this is the current way to do suspend and power on with the power button


end ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     'the machine is not the end to the means., we are. In history, in board rooms and politic the greatest  decision and effort
        evolves from passion, lust for life, and a common sense of humanity. Never forget what you are and why'.         -me

Offline

#3 2013-09-07 23:10:45

archlinux20130905
Member
Registered: 2013-09-05
Posts: 17

Re: suspend to ram/disk on asus

I tried it out now. If I use 'systemctl suspend' or 'systemctl hybrid-sleep', I get the same effect as described in my original post (garbled display). If I use 'systemctl hibernate', the system powers off completely and after switching it on, it tells me that the hdd partitions have to be checked, because the system hasn't been shutdown properly. It seems that nothing is restored from memory or in the case of hibernate the swap partition.

Regards
Chris

Offline

#4 2013-09-07 23:36:06

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: suspend to ram/disk on asus

Garbled display? That being the case, what kind of graphics hardware is in your system?

Offline

#5 2013-09-08 07:20:23

archlinux20130905
Member
Registered: 2013-09-05
Posts: 17

Re: suspend to ram/disk on asus

Here's the partial output of lspci -vvv :

03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV410/M26 [Mobility Radeon X700] (prog-if 00 [VGA controller])
	Subsystem: ASUSTeK Computer Inc. Device 11b2
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 42
	Region 0: Memory at d0000000 (32-bit, prefetchable) [size=128M]
	Region 1: I/O ports at d000 [size=256]
	Region 2: Memory at feaf0000 (32-bit, non-prefetchable) [size=64K]
	Expansion ROM at feac0000 [disabled] [size=128K]
	Capabilities: [50] Power Management version 2
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [58] Express (v1) Endpoint, MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <256ns, L1 <4us
			ExtTag+ AttnBtn- AttnInd- PwrInd- RBE- FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 128 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Latency L0 <256ns, L1 <2us
			ClockPM- Surprise- LLActRep- BwNot-
		LnkCtl:	ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
	Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit+
		Address: 00000000fee0100c  Data: 41c1
	Capabilities: [100 v1] Advanced Error Reporting
		UESta:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UEMsk:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UESvrt:	DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
		CESta:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
		CEMsk:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
		AERCap:	First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
	Kernel driver in use: radeon
	Kernel modules: radeon

Could this be causing the suspend-problem? The agpgart module is also loaded by the way.

Last edited by archlinux20130905 (2013-09-08 07:23:31)

Offline

#6 2013-09-08 07:31:56

rufus
Banned
From: san francisco
Registered: 2013-04-20
Posts: 153

Re: suspend to ram/disk on asus


end ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     'the machine is not the end to the means., we are. In history, in board rooms and politic the greatest  decision and effort
        evolves from passion, lust for life, and a common sense of humanity. Never forget what you are and why'.         -me

Offline

Board footer

Powered by FluxBB