hey VinzC,VinzC wrote:Has anyone succeeded in patching recent vanilla or suspend2 sources with these patches that were mentionned by Anterion and mhanski? I can get nothing but rejects when I attempt to use 00_kernel-2.6.12.4.patch. Which ones do I have to apply in fact? All or just the first one?
According to the howto: RAM size + 30%. But it was before LZH was introduced. As a general rule of thumb, I leave twice the RAM size for small RAM'd systems (say <= 128MB) otherwise equal to the RAM size.juniper wrote:in terms of suspend to disk, would it help to increase the size of the swap? how does one quickly find the size of the swap partition.
Quite a lot, thanks. Actually I've applied libata_error_handling to suspend2 sources 2.6.12-r4 and I must admit my lap' didn't freeze at all while I was using it - almost 8 hours. Before it froze after about 5 minutes.juniper wrote:hey VinzC,
all the libata patches work fine for me, linux-2.6.12.2 vanilla sources. i cannot, however, get the kernel-2.6.12.4 patch to work on the vanilla 2.6.12.4 sources (these sources are not in portage, i had to get them from kernel.org).
as far as i can tell, those patches are pretty good. my lockups have stopped, but my laptop seems more finicky when trying to suspend to disk, sometimes it works sometimes it doesn't. without those patches i think suspend to disk worked better, but the system would lockup.
the author on that page (maybe we should send him an email?) removed the description of the patches, but if memory serves...
libata_atapi: gets cdrom working
libata_error_handling: stops the random lockups
libata_suspend: make suspend to disk a little better.
libata_passthru: allows you to use hdparm on sata drives.
since i don't use hdparm (i don't really know what i should set for this drive, and i know that hdparm is pretty scary so i don't mess with it unless i know what is going on), i think that i won't apply this patch and see how my suspend works.
hope that helps.
j
yeah, fdisk just gives useless units.VinzC wrote:According to the howto: RAM size + 30%. But it was before LZH was introduced. As a general rule of thumb, I leave twice the RAM size for small RAM'd systems (say <= 128MB) otherwise equal to the RAM size.juniper wrote:in terms of suspend to disk, would it help to increase the size of the swap? how does one quickly find the size of the swap partition.
OTOH sizes fdisk applies to partitions are always a bit greater than requested, e.g. 32 can actually be 38 or 40MB.
Code: Select all
fdisk -s /dev/sda6
1004031
fdisk -su /dev/sda6
1004031
i had problems with the gentoo kernel. try the vanilla sources.VinzC wrote:Quite a lot, thanks. Actually I've applied libata_error_handling to suspend2 sources 2.6.12-r4 and I must admit my lap' didn't freeze at all while I was using it - almost 8 hours. Before it froze after about 5 minutes.juniper wrote:hey VinzC,
all the libata patches work fine for me, linux-2.6.12.2 vanilla sources. i cannot, however, get the kernel-2.6.12.4 patch to work on the vanilla 2.6.12.4 sources (these sources are not in portage, i had to get them from kernel.org).
as far as i can tell, those patches are pretty good. my lockups have stopped, but my laptop seems more finicky when trying to suspend to disk, sometimes it works sometimes it doesn't. without those patches i think suspend to disk worked better, but the system would lockup.
the author on that page (maybe we should send him an email?) removed the description of the patches, but if memory serves...
libata_atapi: gets cdrom working
libata_error_handling: stops the random lockups
libata_suspend: make suspend to disk a little better.
libata_passthru: allows you to use hdparm on sata drives.
since i don't use hdparm (i don't really know what i should set for this drive, and i know that hdparm is pretty scary so i don't mess with it unless i know what is going on), i think that i won't apply this patch and see how my suspend works.
hope that helps.
j
I don't think kernel patches apply here as - still believe - they relate to unpatched kernel sources but I'm not sure. Note I've tried to patch vanilla sources and gentoo sources, no way.
I'll try libata_suspend soon I think for I never could get s2d work properly when logged on in Gnome.
Also note I've installed suspend2 sources and hibernate script on an IBM Thinkpad R40 and it went without a glitch. These laptops rock. Really. And I've had less troubles (almost none) with Gentoo than with any other distro (like Ubuntu, which I left quickly and Fedora Core 4, which I praticed one week long). Sorry for being off-topic but I felt I had to give myself away on this.

Well, you are much more advanced than I amjuniper wrote:well, i wasn't using LZF before, maybe that will help. any other hints?
Thanks a lot. Basically my main problems are Xorg, when gnome-session active and the broadcom network card. Till now I got a black screen if:juniper wrote:also, are you having trouble getting swsusp2 working? i can tell you how i did it, in detail if you wish.
let me know.
I don't expect it to work, I'm afraid. I'd rather use a (non-standard) video mode number that reflects the true resolution for I'm almost sure there is one, hidden in the video BIOS.seppelrockt wrote:I got an idea how we might use splashutils bootsplash in full 1280x800 by using good old vesafb instead of vesafb-tng (which still produces to much garbage in my opinion). What about setting the framebuffer to 1280x1024 (a standard vesa mode) and then using a bootsplash theme that is 1280x1024 but is configured to have "black borders" above and below the hole bootsplash stuff that is inside a frame of 1280x800. This would then be a little bis as if you crop the borders of a 16:9 movie.
The only problem is: does framebuffer when it is set to higher res than the native one and how can I find out how this is aligned to the screen, e.g. when aligned on the upper left corner of the screen I would have the 224 "garbage/black lines" on the lower side of the screen, if it's centered I have 112 lines on the upper and another 112 lines on the lower side and so on.
Men, imagine this would work! Some feedback?
VinzC,VinzC wrote:Well, you are much more advanced than I amjuniper wrote:well, i wasn't using LZF before, maybe that will help. any other hints?.
Thanks a lot. Basically my main problems are Xorg, when gnome-session active and the broadcom network card. Till now I got a black screen if:juniper wrote:also, are you having trouble getting swsusp2 working? i can tell you how i did it, in detail if you wish.
let me know.
- I was logged on in Gnome before hibernating
- I run hibernate and resume
- I switch from a text console to X.
But there have been lots of updates to portage inbetween. So I can't tell if this works right now. As I've made other tests with the Thinkpad I think I could even port the same methdology to the Dell Inspiron. The trick was to unload *all* modules before hibernate. The hibernate-script would take care of resuming and re-loading modules gracefully.
Now with the bc44 module... I don't know if I must compile it in the kernel or as a module for s2d to work properly, i.e. to get the card work back again (get its IP from the network aso) after resume. I made a few attempts were I had to restart /etc/init.d/net.eth1 manually even if I told hibernate.conf to restart it. But again this was a couple of emerge sync before.
The challenge lies between ifplugd and hibernate. The former doesn't re-activate the NIC after the cable is plugged back in; the latter probably requires bc44 to be present as a module. This is the trickiest point I'd like to solve. But I don't have enough time to check that unfortunately.
Code: Select all
# Example hibernate.conf file. Adapt to your own tastes.
# Options are not case sensitive.
#
# Run "hibernate -h" for help on the configuration items.
##############################################################################
### Choose your Suspend method. You currently have 3 choices:
###
### suspend2 Software Suspend 2 (requires kernel patches from
### http://www.suspend2.net/)
###
### sysfs_power_state Uses /sys/power/state to suspend (activates pmdisk
### on kernels < 2.6.8, or vanilla swsusp otherwise).
###
### acpi_sleep Uses /proc/acpi/sleep to activate swsusp, or other
### ACPI sleep state supported by your machine.
###
##############################################################################
### suspend2 (for Software Suspend 2)
UseSuspend2 yes
# Reboot no
# EnableEscape yes
# DefaultConsoleLevel 1
Compressor lzf
# Encryptor none
# ImageSizeLimit 200
## useful for initrd usage:
SuspendDevice swap:/dev/sda6
# LoadSuspendModules suspend_swap suspend_lzf suspend_text
# UnloadSuspendModulesAfterResume yes
## Powerdown method - 3 for suspend-to-RAM, 4 for ACPI S4 sleep, 5 for poweroff
# PowerdownMethod 5
## If you experience hangs on resume due to write caching, try this:
# AsyncIOLimit 128
## Any other /proc/software_suspend setting can be set like so:
# ProcSetting expected_compression 50
## Or traditionally like this:
# Suspend2AllSettings 0 0 2056 65535 5
## Or even from the results of hibernate --save-settings with this:
# Suspend2AllSettingsFile /etc/hibernate/suspend-settings.conf
## For filewriter:
# FilewriterLocation /suspend_file 1000
# VerifyFilewriterResume2 yes
### sysfs_power_state
## To use /sys/power/state to suspend your machine (which may offer
## suspend-to-RAM, suspend-to-disk, standby, etc) comment out all the options
## above for Software Suspend 2, below for acpi_sleep, and uncomment this line.
## You may replace mem with any one of the states from "cat /sys/power/state"
#UseSysfsPowerState mem
#PowerdownMethod shutdown
### acpi_sleep
## To use ACPI to suspend your machine (via /proc/acpi/sleep), comment out
## all the options above for Software Suspend 2 and sysfs, and uncomment this
## line. The number refers to the ACPI sleep state - 3 is suspend-to-RAM and
## 4 is suspend-to-disk.
#UseACPISleep 3
##############################################################################
### Some global settings
##############################################################################
Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 1
# AlwaysForce yes
# AlwaysKill yes
# HibernateVT 15
# Distribution debian (or fedora/gentoo/mandrake/redhat/slackware/suse)
# XDisplay :0
##############################################################################
### Scriptlets
### Scriptlets provide support for doing all sorts of things before and after
### suspending. The defaults settings here should work for most people, but
### you may wish to edit these to taste. Consult "hibernate -h" for help on
### the configuration settings.
##############################################################################
### bootsplash
## If you use bootsplash, also enabling SwitchToTextMode is recommended if
## you use X, otherwise you may end up with a garbled X display.
# Bootsplash on
# BootsplashConfig /etc/bootsplash/default/config/bootsplash-1024x768.cfg
### clock
SaveClock restore-only
### devices
# IncompatibleDevices /dev/dsp /dev/video*
### diskcache
# DisableWriteCacheOn /dev/hda
### fbsplash (enable SwitchToTextMode if you use this)
# FBSplash on
# FBSplashTheme suspend2
### filesystems
# Unmount /nfsshare /windows /mnt/sambaserver
# UnmountFSTypes smbfs nfs
# UnmountGraceTime 1
Code: Select all
Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 1
Code: Select all
### modules
# UnloadModules snd_via82cxxx usb-ohci
# UnloadAllModules yes
UnloadBlacklistedModules yes
LoadModules auto
# LoadModulesFromFile /etc/modules
### modules-gentoo
# GentooModulesAutoload yesCode: Select all
# qpkg -I -v suspend
sys-kernel/suspend2-sources-2.6.12-r5 *
sys-apps/suspend2-userui-0.5.1 *
For 1 GB Ram this is quite much (using 128MB right now for swap) and my 60 GB HD is nearly full already. I have 10 GB Windoze (for games, as long as xorg performance is bad on i915gm in 24bit) and ~25 GB data (photos, music, ...) - the rest is gentoo. I will rarely ever use Suspend to disk so one more GB for swap is not worth it.VinzC wrote:Enormous? You should at least have the same amount of RAM plus 30% for suspend-2-disk. Or don't you have any swap space at all?seppelrockt wrote:Any pointers how to get suspend-to-RAM to work? I'm very new on this topic... I don't care about suspend-to-disk cause I don't have enough space on my HD for an enormous swap and it's a securety problem as well.
What did you use for suspend2ram? Are the suspend2 kernel sources and patches an all the stuff mentioned in the last posts here only for hibernate aka suspend2disk or do I benefied from it for suspend2ram, too? Has anybody a working suspend2ram yet?VinzC wrote:Welcomeseppelrockt wrote:Suspend-to-Ram give me a black screen after reboot..
Well, I didn't use suspend2ram on my i6k, only on the Thinkpad and it didn't work. Suspend2 sources are also for suspend2ram.seppelrockt wrote:What did you use for suspend2ram? Are the suspend2 kernel sources and patches an all the stuff mentioned in the last posts here only for hibernate aka suspend2disk or do I benefied from it for suspend2ram, too? Has anybody a working suspend2ram yet?
Thanks in advance!

Yeah, thank you for the pointer! My first attempt didn't work of cause, but I googled a little to find a way to get it to work with vesafb, when investigated in an SuSE live CD that I remebered to let me choose my 1280x800 from the grub menu and finaly the solution is very simple.VinzC wrote:I don't expect it to work, I'm afraid. I'd rather use a (non-standard) video mode number that reflects the true resolution for I'm almost sure there is one, hidden in the video BIOS.seppelrockt wrote:I got an idea how we might use splashutils bootsplash in full 1280x800 by using good old vesafb instead of vesafb-tng (which still produces to much garbage in my opinion). What about setting the framebuffer to 1280x1024 (a standard vesa mode) and then using a bootsplash theme that is 1280x1024 but is configured to have "black borders" above and below the hole bootsplash stuff that is inside a frame of 1280x800. This would then be a little bis as if you crop the borders of a 16:9 movie.
The only problem is: does framebuffer when it is set to higher res than the native one and how can I find out how this is aligned to the screen, e.g. when aligned on the upper left corner of the screen I would have the 224 "garbage/black lines" on the lower side of the screen, if it's centered I have 112 lines on the upper and another 112 lines on the lower side and so on.
Men, imagine this would work! Some feedback?
hmm, i am using the vanilla sources-2.6.12.2, not the gentoo suspend sources. i manually patched the kernel with the suspend 2 patches fromVinzC wrote:Juniper,
I'm using suspend2 through suspend2 sources (kernel sources with suspend2 patches and some more). My problem was about X on resuming from hibernate *and* as I had opened a gnome session *and* the session was still open while suspending.
For your module stuff, there are options in hibernate.conf: UnloadModules, LoadModules, GentooModulesAutoLoad plus some others. I think you might have an older hibernate.conf file. Newer ones include even more flexible options about fbsplash (supersedes text UI and is absolutely great, you should try it; take care of setting verbosity to 0 then):I'm using that version of suspend2 sources (plus the UI utilities):Code: Select all
### modules # UnloadModules snd_via82cxxx usb-ohci # UnloadAllModules yes UnloadBlacklistedModules yes LoadModules auto # LoadModulesFromFile /etc/modules ### modules-gentoo # GentooModulesAutoload yesCode: Select all
# qpkg -I -v suspend sys-kernel/suspend2-sources-2.6.12-r5 * sys-apps/suspend2-userui-0.5.1 *
i have a friend with an dell i6000 and he has suspend to ram working. he also has a nice webpage explaining it.seppelrockt wrote:Any pointers how to get suspend-to-RAM to work? I'm very new on this topic... I don't care about suspend-to-disk cause I don't have enough space on my HD for an enormous swap and it's a securety problem as well. Suspend-to-Ram give me a black screen after reboot.

Code: Select all
emerge =vanilla-sources-2.6.12.2
Code: Select all
cd /usr/src
rm linux
ln -s linux-2.6.12.2 linux
Code: Select all
patch -p0 < the-patch
Code: Select all
#!/bin/sh
FGCONSOLE=/usr/bin/fgconsole
MODPROBE=/sbin/modprobe
VBETOOL=/usr/sbin/vbetool
CHVT=/usr/bin/chvt
SYNC=/usr/bin/sync
# determine current console number:
currentvt=`$FGCONSOLE`
# switch away from X11, to avoid touchpad lockup on resume
#if [ ! "$currentvt" = "12" ]; then
# $CHVT 12
#fi
# unload usb modules
$MODPROBE -r usb-storage
$MODPROBE -r usbhid
$MODPROBE -r uhci-hcd
$MODPROBE -r ac
# go into standby
$SYNC; $SYNC
echo -n mem >/sys/power/state
# emerge from standby on resume
# reinitialize video to get text console working again on resume
$VBETOOL post
# reload usb modules
$MODPROBE uhci-hcd
$MODPROBE usbhid
$MODPROBE ac
# switch back to original console/X11 screen
#if [ ! "$currentvt" = "12" ]; then
# $CHVT 7
#fi
# to ensure the screen is not garbled; switch to vterm 12 and back.
$CHVT 12;
$CHVT $currentvt

no, i haven't tried the new vanilla 2.6.12.5, it might work there.seppelrockt wrote:Is there a reason why you use vanilla 2.6.12.2 instead of the (stable in portage) 2.6.12.5? Do you know whether it doesn't work with the new one? Thanks for all the work done so far!
Which is exactly what suspend2 sources are. They are plain vanilla based plus patches for suspend, inotify and framebuffer consoles.juniper wrote:hmm, i am using the vanilla sources-2.6.12.2, not the gentoo suspend sources. i manually patched the kernel with the suspend 2 patches from
www.suspend2.net
I got rid of random freezes when I applied libata_error_handling patch. The script your friend wrote does tasks hibernate.conf file supports too. It must be then possible to configure the options in that file to do the same.juniper wrote:however, when i was using the suspend2 sources, suspend did work. the problem was the random lockups.

What is still on my To-Do-List is the WLAN LED, I mean switching it on when I switched WLAN on (Fn+F2) and off when I push Fn+F2 again. Now LED is supprted in the ipw2200 package - did anybody play with it jet? Jupiter, if you die in bordom one day (or even better before you do so), you can put your magic hands and brain on thisjuniper wrote:thus, it appears that both sleep and suspend 1 -to-disk work. which, i have to say, is really sweet. i have, basically, everything working and stable with this laptop now, so i am pretty happy. i think it is a great machine.(except some minor issues like getting Fn+F10 ejecting the disk, i will have it one day god dammit!)