View previous topic :: View next topic |
Author |
Message |
blscreen Tux's lil' helper
Joined: 04 Mar 2003 Posts: 118 Location: Innsbruck
|
Posted: Wed Aug 30, 2006 5:34 am Post subject: |
|
|
Success!! Finally resume works even with apic enabled.
The solution: Forget about s2ram and use the following
Code: | echo "mem" > /sys/power/state ; chvt 1 ; chvt 7 |
We should even embed this into a more advanced script, for example sync hardware clock to system time and restart wireless (the connection doesn't survive resume).
Could someone confirm the resume behaviour? During testing I also applied some kernel patches from the ubuntu kernel, but I don't think they are relevant.
EDIT: Again false alarm... I had a setup where this command worked reliable, but after reboot it doesn't work again... So what did I do to make it work??? Will post it here if I find out.
PS: still having this clock drift problem. anybode else? ---- Edit: Just for the records, time drift problem is SOLVED, see here.
Last edited by blscreen on Wed Aug 30, 2006 1:21 pm; edited 2 times in total |
|
Back to top |
|
|
dmvianna l33t
Joined: 22 Mar 2004 Posts: 742 Location: Down Underland
|
Posted: Wed Aug 30, 2006 9:15 am Post subject: |
|
|
blscreen wrote: | Success!! Finally resume works even with apic enabled.
The solution: Forget about s2ram and use the following
Code: | echo "mem" > /sys/power/state ; chvt 1 ; chvt 7 |
|
With both s2ram and that echo command all I get is an X blink. None of them cause a crash, but I can't suspend either!
Code: | server me # s2ram -f -s
Switching from vt7 to vt1
Calling save_state
Allocated buffer at 0x2010 (base is 0x0)
ES: 0x0201 EBX: 0x0000
s2ram_do: Operation not permitted
Calling restore_state_from
Function not supported
switching back to vt7
server me # | Code: | server me # echo "mem" > /sys/power/state ; chvt 1 ; chvt 7
bash: echo: write error: Operação não permitida
server me #
|
_________________ Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro |
|
Back to top |
|
|
blscreen Tux's lil' helper
Joined: 04 Mar 2003 Posts: 118 Location: Innsbruck
|
Posted: Wed Aug 30, 2006 9:38 am Post subject: |
|
|
Do you have CONFIG_ACPI_SLEEP built into your kernel? What does
Code: | cat /sys/power/state |
give you? |
|
Back to top |
|
|
justwantstohelp Apprentice
Joined: 29 Jun 2006 Posts: 251 Location: Sacramento, California
|
Posted: Wed Aug 30, 2006 10:01 am Post subject: |
|
|
@blscreen: you're not using suspend sources are you? |
|
Back to top |
|
|
dmvianna l33t
Joined: 22 Mar 2004 Posts: 742 Location: Down Underland
|
Posted: Wed Aug 30, 2006 10:12 am Post subject: |
|
|
blscreen wrote: | Do you have CONFIG_ACPI_SLEEP built into your kernel? |
Heh. No. Is there such an option in 2.6.17? I won't move to 2.6.18 before ati-drivers supports it. _________________ Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro |
|
Back to top |
|
|
justwantstohelp Apprentice
Joined: 29 Jun 2006 Posts: 251 Location: Sacramento, California
|
Posted: Wed Aug 30, 2006 10:12 am Post subject: |
|
|
dmvianna wrote: | blscreen wrote: | Do you have CONFIG_ACPI_SLEEP built into your kernel? |
Heh. No. Is there such an option in 2.6.17? I won't move to 2.6.18 before ati-drivers supports it. |
There's no such option ins 2.6.18_rc2 either. |
|
Back to top |
|
|
blscreen Tux's lil' helper
Joined: 04 Mar 2003 Posts: 118 Location: Innsbruck
|
Posted: Wed Aug 30, 2006 10:28 am Post subject: |
|
|
Just checked the 2.6.17 vanilla kernel, the option is present under
->Power management (ACPI, APM)
-> ACPI (Advanced Configuration and Power Interface) Support
-> ACPI Support (ACPI [=y])
-> Sleep States.
Depends on: !X86_VOYAGER && !X86_VISWS && !IA64_HP_SIM && (IA64 || X86) && ACPI && X86 && (!SMP || SUSPEND_SMP) && PM
Quote: | I won't move to 2.6.18 before ati-drivers supports it. |
Are you on a MacBook Pro? |
|
Back to top |
|
|
dmvianna l33t
Joined: 22 Mar 2004 Posts: 742 Location: Down Underland
|
Posted: Wed Aug 30, 2006 10:30 am Post subject: |
|
|
blscreen wrote: | Are you on a MacBook Pro? |
I am a happy MacBook Pro owner. _________________ Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro |
|
Back to top |
|
|
dmvianna l33t
Joined: 22 Mar 2004 Posts: 742 Location: Down Underland
|
Posted: Wed Aug 30, 2006 10:32 am Post subject: |
|
|
blscreen wrote: | Just checked the 2.6.17 vanilla kernel, the option is present under
->Power management (ACPI, APM)
-> ACPI (Advanced Configuration and Power Interface) Support
-> ACPI Support (ACPI [=y])
-> Sleep States.
| Not on gentoo-sources though. _________________ Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro |
|
Back to top |
|
|
justwantstohelp Apprentice
Joined: 29 Jun 2006 Posts: 251 Location: Sacramento, California
|
Posted: Wed Aug 30, 2006 10:39 am Post subject: |
|
|
oops, nevermind
Last edited by justwantstohelp on Wed Aug 30, 2006 10:40 am; edited 1 time in total |
|
Back to top |
|
|
blscreen Tux's lil' helper
Joined: 04 Mar 2003 Posts: 118 Location: Innsbruck
|
Posted: Wed Aug 30, 2006 10:40 am Post subject: |
|
|
After a fresh emerge of gentoo-sources-2.6.17 the option is there. You must have chosen some other setting preventing this option... For example you have to enable CONFIG_SUSPEND_SMP if CONFIG_SMP is set.
Last edited by blscreen on Wed Aug 30, 2006 10:42 am; edited 1 time in total |
|
Back to top |
|
|
justwantstohelp Apprentice
Joined: 29 Jun 2006 Posts: 251 Location: Sacramento, California
|
Posted: Wed Aug 30, 2006 10:42 am Post subject: |
|
|
blscreen: could you post the prerequisites for SUSPEND_SMP as well? |
|
Back to top |
|
|
blscreen Tux's lil' helper
Joined: 04 Mar 2003 Posts: 118 Location: Innsbruck
|
Posted: Wed Aug 30, 2006 10:49 am Post subject: |
|
|
SUSPEND_SMP depends on HOTPLUG_CPU && X86 && PM
SUSPEND_SMP itself seems not choosable by the user, you have to activate HOTPLUG_CPU in Processor type and features which pulls the SUSPEND_SMP in... |
|
Back to top |
|
|
slaq n00b
Joined: 27 Aug 2006 Posts: 14
|
Posted: Wed Aug 30, 2006 11:10 am Post subject: |
|
|
@blscreen
hmm, strange. what other kernel options do you use?
i have: noapic, acpi=force, irqpoll
and, well, X still crashes quite reliably after wakeup |
|
Back to top |
|
|
justwantstohelp Apprentice
Joined: 29 Jun 2006 Posts: 251 Location: Sacramento, California
|
Posted: Wed Aug 30, 2006 11:15 am Post subject: |
|
|
I can't even get it fully to sleep, under x or the console. |
|
Back to top |
|
|
dmvianna l33t
Joined: 22 Mar 2004 Posts: 742 Location: Down Underland
|
Posted: Wed Aug 30, 2006 11:25 am Post subject: |
|
|
blscreen: Thanks heaps!!! Suspend 2 RAM works flawlessly for me. _________________ Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro |
|
Back to top |
|
|
blscreen Tux's lil' helper
Joined: 04 Mar 2003 Posts: 118 Location: Innsbruck
|
Posted: Wed Aug 30, 2006 11:29 am Post subject: |
|
|
This is driving me mad... everytime I think I have a setup which works, it doesn't survive a reboot. Resume seems to be largely based on luck
@dmvianna
Congratulations! It sure does not for me... Did you reboot? Then again you have the Pro, could be different...
WTF: Now I don't even have the "I-will-resume-but-crash-your-X-server"-behaviour... this is worse than ever before... |
|
Back to top |
|
|
dmvianna l33t
Joined: 22 Mar 2004 Posts: 742 Location: Down Underland
|
Posted: Wed Aug 30, 2006 11:46 am Post subject: |
|
|
blscreen wrote: | Congratulations! It sure does not for me... Did you reboot? Then again you have the Pro, could be different... |
Just did... I've put the command in an executable and now evoke it from Fluxbox's root menu. _________________ Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro |
|
Back to top |
|
|
blscreen Tux's lil' helper
Joined: 04 Mar 2003 Posts: 118 Location: Innsbruck
|
Posted: Wed Aug 30, 2006 12:19 pm Post subject: |
|
|
Well, good chances are that all you needed were the right kernel configs, and all the chvt-crap is unnecessary for you... |
|
Back to top |
|
|
blscreen Tux's lil' helper
Joined: 04 Mar 2003 Posts: 118 Location: Innsbruck
|
Posted: Wed Aug 30, 2006 1:09 pm Post subject: |
|
|
Well seems like I'm in the suspend and resume business again
This time it lasts the three-reboots-test! So here is a step-by-step Instruction for what I did...
I started with linux-2.6.18-rc2-mm1 and the sample-configuration given in the wiki, but resume from suspend didn't work reliably. So I installed a vanilla linux-2.6.18-rc4 (didn't use rc5 because there are no mactel-patches yet) and patched it with all mactel-linux patches available besides sigmatel_audio.patch (if you apply this sound will always come out of the speakers, even if a headphone is connected). Get the patches with
Code: | svn co https://svn.sourceforge.net/svnroot/mactel-linux/trunk/kernel/mactel-patches-2.6.18 mactel-patches-2.6.18 |
This will check out the lates revision, so check at http://mactel-linux.org that they match your kernel.
The configuration is based on pindar's configuration earlier in this thread. You can find my configuration here. With this config, I have working suspend, sound, synaptic-touchpad, fn-key, 3d-acceleration.
Build and install the kernel.
Install s2ram. Here is an ebuild for your portage-overlay: /usr/local/portage/sys-power/s2ram-cvs/s2ram-cvs-0.ebuild
Code: | # Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header$
inherit eutils cvs
DESCRIPTION="Suspend-to-RAM from Linux Suspend project"
SRC_URI=""
HOMEPAGE="http://sf.net/projects/suspend/"
KEYWORDS="~x86"
SLOT="0"
LICENSE="GPL-2"
IUSE=""
DEPEND="sys-apps/pciutils"
ECVS_SERVER="suspend.cvs.sourceforge.net:/cvsroot/suspend"
ECVS_MODULE="suspend"
ECVS_BRANCH="HEAD"
ECVS_AUTH="pserver"
ECVS_USER="anonymous"
ECVS_PASS=""
src_compile() {
cd ${WORKDIR}/suspend
emake s2ram || die "compile failed"
}
src_install() {
dosbin ${WORKDIR}/suspend/s2ram
}
|
You should be able to suspend AND properly resume your box with s2ram. Haven't testet all functionalities after a resume yet. Please report if this works for you.
As the switch to linux-2.6.18-rc4 not only fixed the suspend, but also a very annoying time drift and sound skips with amarok/xine, I would not anymore recommend the kernel and config provided by the gentoo macbook wiki. |
|
Back to top |
|
|
slaq n00b
Joined: 27 Aug 2006 Posts: 14
|
Posted: Wed Aug 30, 2006 1:34 pm Post subject: |
|
|
@blscreen
cool, many thanks for your effort!
i will try your config (using 2.6.17 right now) and if successful will update the gentoo wiki. |
|
Back to top |
|
|
slaq n00b
Joined: 27 Aug 2006 Posts: 14
|
Posted: Wed Aug 30, 2006 3:06 pm Post subject: |
|
|
@blscreen
hmmm i did everything you described;
- kernel 2.6.18-r4
- latest mactel patches from cvs
- latest s2ram from cvs
- used your kernel config
but i still get the same crashes as before (mouse cursor hangs and changes
to wierd box-shapes at times)
it would be great if you could post the contents of your
/etc/modules.autoload.d/kernel-2.6
/etc/X11/xorg.conf
/etc/lilo.conf
please also add the output of "rc-status" and "modprobe -l" before a successful suspend/resume.
i want to see what the difference to my setup is... |
|
Back to top |
|
|
blscreen Tux's lil' helper
Joined: 04 Mar 2003 Posts: 118 Location: Innsbruck
|
Posted: Wed Aug 30, 2006 7:11 pm Post subject: |
|
|
Ok, this is going to be long...
Code: | # cat /etc/lilo.conf
boot=/dev/sda3
default=2.6.18-rc4
compact
prompt
map=/boot/map
delay=20
image=/boot/kernel-2.6.18-rc2-mm1
#append="video=i810fb:xres:1280,yres:800,accel"
label=gentoo
root=/dev/sda3
read-only
image=/boot/kernel-2.6.18-rc4-mactel
label=2.6.18-rc4
root=/dev/sda3
read-only
|
Code: | # equery list xorg-x11
[ Searching for package 'xorg-x11' in all categories among: ]
* installed packages
[I--] [ ~] x11-base/xorg-x11-7.1 (0) |
Code: | # cat /etc/X11/xorg.conf
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "TouchPad" "AlwaysCore"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
FontPath "/usr/share/fonts/misc"
FontPath "/usr/share/fonts/75dpi"
FontPath "/usr/share/fonts/100dpi"
FontPath "/usr/share/fonts/TTF"
FontPath "/usr/share/fonts/Type1"
EndSection
Section "Module"
Load "extmod"
Load "i2c"
Load "bitmap"
Load "ddc"
Load "vbe"
Load "dri"
Load "glx"
Load "freetype"
Load "type1"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "de"
Option "XkbOptions" "ctrl:nocaps"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "CorePointer"
Option "Protocol" "ExplorerPS/2"
#Option "Protocol" "auto-dev"
Option "Device" "/dev/input/mice"
EndSection
Section "InputDevice"
Driver "synaptics"
Identifier "TouchPad"
Option "Device" "/dev/input/mouse0"
Option "Protocol" "auto-dev"
Option "LeftEdge" "100"
Option "RightEdge" "1120"
Option "TopEdge" "50"
Option "BottomEdge" "310"
Option "FingerLow" "25"
Option "FingerHigh" "30"
Option "MaxTapTime" "120"
Option "MaxTapMove" "220"
Option "MaxDoubleTapTime" "180"
Option "SingleTapTimeout" "180"
Option "ClickTime" "100"
Option "FastTaps" "0"
Option "EmulateMidButtonTime" "75"
Option "VertScrollDelta" "20"
Option "HorizScrollDelta" "50"
Option "VertEdgeScroll" "1"
Option "HorizEdgeScroll" "1"
Option "VertTwoFingerScroll" "0"
Option "HorizTwoFingerScroll" "0"
Option "MinSpeed" "0.3"
Option "MaxSpeed" "1"
Option "AccelFactor" "0.1"
Option "EdgeMotionMinZ" "30"
Option "EdgeMotionMaxZ" "160"
Option "EdgeMotionMinSpeed" "1"
Option "EdgeMotionMaxSpeed" "400"
Option "EdgeMotionUseAlways" "0"
Option "UpDownScrolling" "1"
Option "LeftRightScrolling" "1"
Option "UpDownRepeat" "1"
Option "LeftRightRepeat" "1"
Option "ScrollButtonRepeat" "100"
Option "TouchpadOff" "0"
Option "GuestMouseOff" "0"
Option "LockedDrags" "1"
Option "RTCornerButton" "2"
Option "RBCornerButton" "3"
Option "LTCornerButton" "0"
Option "LBCornerButton" "0"
Option "TapButton1" "1"
Option "TapButton2" "3"
Option "TapButton3" "2"
Option "CircularScrolling" "0"
Option "CircScrollDelta" "0.1"
Option "CircScrollTrigger" "0"
Option "CircularPad" "0"
Option "PalmDetect" "1"
Option "PalmMinWidth" "10"
Option "PalmMinZ" "200"
Option "CoastingSpeed" "0"
Option "PressureMotionMinZ" "30"
Option "PressureMotionMaxZ" "160"
Option "PressureMotionMinFactor" "1"
Option "PressureMotionMaxFactor" "1"
Option "SHMConfig" "on"
EndSection
Section "Monitor"
#DisplaySize 290 190 # mm
Identifier "Monitor0"
VendorName "APP"
ModelName "Color LCD"
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 "NoAccel" # [<bool>]
#Option "SWcursor" # [<bool>]
#Option "ColorKey" # <i>
#Option "CacheLines" # <i>
#Option "Dac6Bit" # [<bool>]
#Option "DRI" # [<bool>]
#Option "NoDDC" # [<bool>]
#Option "ShowCache" # [<bool>]
#Option "XvMCSurfaces" # <i>
#Option "PageFlip" # [<bool>]
Option "VBERestore" "yes"
Identifier "Card0"
Driver "i810"
VendorName "Intel Corporation"
BoardName "Mobile 945GM/GMS/940GML Express Integrated Graphics Controller"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 1
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 4
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 15
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubSection
EndSection
Section "DRI"
Mode 0666
EndSection
|
Code: | # cat /etc/modules.autoload.d/kernel-2.6
appletouch
ath_pci
wlan_scan_sta
|
Code: | # rc-status
Runlevel: default
netmount [ started ]
local [ started ]
net.eth0 [ started ]
syslog-ng [ started ]
915resolution [ started ]
sshd [ started ]
xdm [ started ]
alsasound [ started ]
net.ath0 [ started ]
dbus [ started ]
hald [ started ]
vixie-cron [ started ]
acpid [ started ]
spamd [ started ]
|
Code: | # modprobe -l
/lib/modules/2.6.18-rc4-mactel/net/ath_pci.ko
/lib/modules/2.6.18-rc4-mactel/net/ath_rate_onoe.ko
/lib/modules/2.6.18-rc4-mactel/net/wlan_scan_ap.ko
/lib/modules/2.6.18-rc4-mactel/net/wlan_scan_sta.ko
/lib/modules/2.6.18-rc4-mactel/net/wlan_xauth.ko
/lib/modules/2.6.18-rc4-mactel/net/wlan_wep.ko
/lib/modules/2.6.18-rc4-mactel/net/wlan_tkip.ko
/lib/modules/2.6.18-rc4-mactel/net/wlan_ccmp.ko
/lib/modules/2.6.18-rc4-mactel/net/wlan_acl.ko
/lib/modules/2.6.18-rc4-mactel/net/wlan.ko
/lib/modules/2.6.18-rc4-mactel/net/ath_hal.ko
/lib/modules/2.6.18-rc4-mactel/kernel/drivers/usb/input/usbhid.ko
/lib/modules/2.6.18-rc4-mactel/kernel/drivers/usb/input/appletouch.ko
/lib/modules/2.6.18-rc4-mactel/kernel/drivers/usb/input/appleir.ko
/lib/modules/2.6.18-rc4-mactel/kernel/drivers/md/dm-mod.kome
/lib/modules/2.6.18-rc4-mactel/kernel/drivers/hwmon/applesmc.ko
/lib/modules/2.6.18-rc4-mactel/kernel/drivers/char/drm/i915.ko
/lib/modules/2.6.18-rc4-mactel/kernel/drivers/char/drm/drm.ko
|
This is bad, that it doesn't work for you with my settings... It means these are very sensitive settings, and they even might break again at my machine. For the moment it is still working like a charm.
A vew things I noticed: wireless is disconnected after resume, sound comes out of internal speakers until I replug the headphones, reboot doesn't work after a suspend/resume cicle (no graphics upon reboot, have to power down), synaptic driver doesn't work after resume (touchpad still works, but not in synaptic mode). This is because the usb-subsystem somehow is reinitialized, might sort that out with some udev rules. I will post the results. |
|
Back to top |
|
|
blscreen Tux's lil' helper
Joined: 04 Mar 2003 Posts: 118 Location: Innsbruck
|
Posted: Wed Aug 30, 2006 8:45 pm Post subject: |
|
|
I have solved the problem with synaptic after resume by disable the udev-handling of appletouch and usbhid. As I think this approach is not strictly suspend related and has benefits for the usage of the synaptic device in general, I put the information into "Use the apple driver"-section in the wiki. |
|
Back to top |
|
|
slaq n00b
Joined: 27 Aug 2006 Posts: 14
|
Posted: Wed Aug 30, 2006 9:43 pm Post subject: |
|
|
@blscreen
thanks for posting all that.
i already found one difference: you don't have an "append=" line in your lilo.conf!
how come your system doesn't do the APIC freeze on boot?
mine will freeze whenever i take my append= line out:
append="noapic irqpoll acpi=force"
did you patch the kernel to fix the lockups?
oh and do you use rEFIt for booting or something else? |
|
Back to top |
|
|
|