View previous topic :: View next topic |
Author |
Message |
phranzee Guru
Joined: 22 Nov 2003 Posts: 397 Location: katowice/pl
|
Posted: Thu Jun 24, 2004 1:54 pm Post subject: |
|
|
is it possible to store the image on other partition than swap (fat32/ext3) ?
tia _________________ signature fault
post dumped ;] |
|
Back to top |
|
|
zmedico Developer
Joined: 02 Jan 2004 Posts: 352 Location: California USA
|
Posted: Thu Jun 24, 2004 5:01 pm Post subject: |
|
|
tuxlover wrote: | I had the impression that Jerrac's problem is not related to using swsusp at all, he's just rebooting with the new kernel...? |
If that's the case, assuming that the problem is not with the bootloader itself, then Jerrac's new kernel is off to a bad start If bootsplash is enabled it can prevent the user from seeing an error message during such a boot time hang. In that case I recommend to disable bootsplash.
stefanpropehan wrote: | I get the following patch result when i patch the kernel described in the post of zmedico |
In my post I used the plain sources from kernel.org rather than gentoo-dev-sources. The patches apply cleanly to the plain kernel.org sources. If you want some of the gentoo-dev-sources patches also then you can extract them from the genpatches-* tarballs in your distfiles directory and pick out the ones you want that are not redundant.
phranzee wrote: | is it possible to store the image on other partition than swap (fat32/ext3) ?
tia |
That feature does not currently exist to my knowledge. Swsusp currently must use a swap partition that identified using a kernel parameter from the boot loader. _________________ Zac
Last edited by zmedico on Thu Jun 24, 2004 5:43 pm; edited 1 time in total |
|
Back to top |
|
|
Jerrac Tux's lil' helper
Joined: 22 Jun 2003 Posts: 111
|
Posted: Thu Jun 24, 2004 5:37 pm Post subject: |
|
|
zmedico wrote: | tuxlover wrote: | I had the impression that Jerrac's problem is not related to using swsusp at all, he's just rebooting with the new kernel...? |
If that's the case, assuming that the problem is not with the bootloader itself, then Jerrac's new kernel is off to a bad start If bootsplash is enabled it can prevent the user from seeing an error message during such a boot time hang. In that case I recommend to remove the initrd from the kernel parameters (if possibe, or otherwise remove the boosplash images from the initrd) and thereby disable bootsplash.
|
Heh, as far as I know, I do not have bootsplash enabled. It is just a plain kernel, no initrd. Configured the manual way in the manual. lol that sounded strange... Could the "resume2" line in Lilo cause problems?
my lilo.conf entry for the the problem kernel:
Quote: |
image=/boot/2.6.6-david2
label=linux-2.6.6
read-only
root=/dev/hda9
append="resume2=swap:/dev/hda8" |
_________________ Soar with God!
David |
|
Back to top |
|
|
zmedico Developer
Joined: 02 Jan 2004 Posts: 352 Location: California USA
|
Posted: Thu Jun 24, 2004 5:50 pm Post subject: |
|
|
Jerrac wrote: | Could the "resume2" line in Lilo cause problems? |
Maybe it could, it's unlikely if your using the same parameters as before though. I use the grub bootloader which makes it easy to edit the kernel parameters before boot, plus it doesn't have to be reinstalled in the boot sector every time something changes. If that kernel bzImage just doesn't boot and has no error message I suppose you'll have to build another one. _________________ Zac |
|
Back to top |
|
|
phranzee Guru
Joined: 22 Nov 2003 Posts: 397 Location: katowice/pl
|
Posted: Thu Jun 24, 2004 7:25 pm Post subject: |
|
|
@zmedico: thanks
how big swap partition should i create for 512MB ram (LZF compression) ?
Quote: | Newer versions of nVidia's driver, or using a 2.6 kernel causes swsusp2 to fail. | is above statement really true ? _________________ signature fault
post dumped ;] |
|
Back to top |
|
|
zmedico Developer
Joined: 02 Jan 2004 Posts: 352 Location: California USA
|
Posted: Thu Jun 24, 2004 8:08 pm Post subject: |
|
|
I use a 1 GB swap partition with my 512 megabytes of ram and that seems sufficient. You need more or less depending on how many programs you want to survive the suspend/resume cycle.
I have an nvidia video card and it works fine with the gpl nv driver (I don't play 3D games much but duke3d works well). I haven't tainted my kernel with any binary drivers so I can't comment on those but I know people have reported problems. _________________ Zac |
|
Back to top |
|
|
dan2003 Apprentice
Joined: 11 May 2003 Posts: 258 Location: somewhere near london, UK
|
Posted: Fri Jun 25, 2004 1:40 pm Post subject: |
|
|
tuxlover wrote: | dan2003 wrote: | I'm a tad confused.. This is different to suspend-to-disk yes? |
swsusp2 is a complete rewrite of swsusp(1), the old software suspend of the linux kernel. As already mentioned, you might have a vendor-specific swsusp in your laptop already (although unlikely because uncommon today). |
I'm unsure what is being used, but it certainly isn't swsusp2. My laptop is an nx9005 and i do not think it has the mentioned vendor-specific hibernating functions.
tuxlover wrote: | dan2003 wrote: | with Dri disabled X comes back and the clock is ticking over (i have seconds visible in kde) |
What do you mean by "ticking over"? Is it too fast, or too slow? There are some options for taking care of clock/time problems in /etc/sysconfig/suspend.conf. Take a look at them. |
Sorry if that was unclear. What i meant is that i could see the system had not locked up entirly cos the clock on the taskbar was still being updated.
tuxlover wrote: | dan2003 wrote: | but the mouse and kbd dont work (interesting how the usb optical mouse does light back up now tho - it wouldnt do that without reloading ohci-hcd earlier). |
My experience shows that simply making hotplug restart (also described in my howto) makes mouse and keyboard work. |
As the system i was using to suspend ("echo 4 > /proc/acpi/sleep" or hierbante from the klaptop menu in kde) doesnt seem to run any script i am unable to do this. However it appears there is now a swsusp2 patch for 2.6.7 so i will be giving this a try.
tuxlover wrote: | dan2003 wrote: | so i'm left thinking it must be Xorg |
swsusp2 should work with Xorg (I use it, too). | [/quote]
It will be interesting to see what happens with swsusp2. |
|
Back to top |
|
|
dan2003 Apprentice
Joined: 11 May 2003 Posts: 258 Location: somewhere near london, UK
|
Posted: Fri Jun 25, 2004 3:53 pm Post subject: |
|
|
Wow.. It works.
A couple of things need some work,
1) ACPI or KLaptop deamon, not sure which but it comes back up thinking im runing on battery and have only 3 or 6 or so mins remaining tho it knows that battery is 100% charged.
root@TT dan # cat /proc/acpi/ac_adapter/ACAD/state
state: on-line
I guess its klaptop that gets confused..
2) i need to look at the sound stuff as it comes back non functional..
Apart from that bravo!!
Pressing enter to off time ~15 seconds
Enter at grub prompt to usable desktop ~ 20 secs, can't complain about that.
Also gonna have to hak klaptop so its acpi suspend features work with sysusp2 instead |
|
Back to top |
|
|
dan2003 Apprentice
Joined: 11 May 2003 Posts: 258 Location: somewhere near london, UK
|
Posted: Fri Jun 25, 2004 4:50 pm Post subject: |
|
|
Oh yeah, i forgot to mention this implementation doesn't get on with DRI enbabled either, I guess its the not quite there yet IGP320M stuff.. |
|
Back to top |
|
|
srejbi n00b
Joined: 03 Jan 2004 Posts: 14 Location: Budapest, Hungary
|
Posted: Sat Jun 26, 2004 2:31 pm Post subject: KDE restarting on suspend-resume |
|
|
hello,
first, great thanks on the howto, i've managed to set up suspend and resume following the steps on my thinkpad t40 using development-sources-2.6.7.
everything (usb, sound, wlan, bluetooth, etc.) is working fine, except one annoying problem: KDE exits on suspend and i get an X login screen upon resume. other window managers suspend and resume fine (at least tried blackbox and gnome)...
i have posted my problem with my /etc/suspend.conf at https://forums.gentoo.org/viewtopic.php?p=1282944.
anyone has experienced similar problems (i have found no posts matching)?
i will try upgrading my KDE from 3.2.2 to 3.2.3.... |
|
Back to top |
|
|
RoundsToZero Guru
Joined: 17 Nov 2003 Posts: 478 Location: New York, NY
|
Posted: Sat Jun 26, 2004 8:44 pm Post subject: |
|
|
When I try to suspend, it resumes right away. The problem is that it can't remove the usbcore module. I've tried manually unloading all the other usb stuff, but usbcore still won't unload, saying that it's in use. What do I do? |
|
Back to top |
|
|
zmedico Developer
Joined: 02 Jan 2004 Posts: 352 Location: California USA
|
Posted: Sun Jun 27, 2004 1:09 am Post subject: |
|
|
RoundsToZero wrote: | remove the usbcore module |
When I stop hotplug it removes all of my usb modules. If you put hotplug in the SWSUSP_RESTART_SERVICES variable in /etc/suspend conf that might do the job (it works for me). Quote: | usbcore 98080 6 uhci_hcd,ehci_hcd,usb_storage,ohci_hcd |
I have to make sure I unmount any usb storage devices before I stop hotplug otherwise I get an oops. Do you have any usb devices attached?
srejbi wrote: | KDE exits on suspend and i get an X login screen upon resume. |
KDE 3.2.3 works fine for me. Maybe it's a memory issue. Swsusp will kill programs if it thinks it will run out of space on the swap partition. _________________ Zac
Last edited by zmedico on Sun Jun 27, 2004 1:20 am; edited 1 time in total |
|
Back to top |
|
|
RoundsToZero Guru
Joined: 17 Nov 2003 Posts: 478 Location: New York, NY
|
Posted: Sun Jun 27, 2004 1:18 am Post subject: |
|
|
I don't have any usb storage devices attached, and I can unload usb-storage just fine. I don't have hotplug installed either. Weird... Only thing I can think of that might be using it is the "USB File System" that Gentoo says gets mounted on normal boots. The usbcore module will always be loaded by the time I log in for the first time, without any other usb modules loaded (b44--my NIC driver--and usbcore are the only ones) and its not in the modules.autoload.d/kernel-2.6 file either. |
|
Back to top |
|
|
zmedico Developer
Joined: 02 Jan 2004 Posts: 352 Location: California USA
|
Posted: Sun Jun 27, 2004 1:31 am Post subject: |
|
|
Maybe this will work (it just worked on mine):
before suspend:
Code: | umount /proc/bus/usb
modprobe -r usb_storage uhci_hcd ehci_hcd ohci_hcd usbcore |
after resume:
Code: | modprobe usbcore
mount -t usbfs usbfs /proc/bus/usb |
I got the mount info by doing "cat /proc/mounts | grep usb". _________________ Zac |
|
Back to top |
|
|
srejbi n00b
Joined: 03 Jan 2004 Posts: 14 Location: Budapest, Hungary
|
Posted: Sun Jun 27, 2004 8:54 am Post subject: |
|
|
zmedico wrote: | KDE 3.2.3 works fine for me. Maybe it's a memory issue. Swsusp will kill programs if it thinks it will run out of space on the swap partition. |
thanks, i'm still emerging KDE 3.2.3 ... will post once tested.
BTW: i have 768M RAM and my swap for suspend (i use a separate swapspace for normal operation) is over 1.5 G. |
|
Back to top |
|
|
srejbi n00b
Joined: 03 Jan 2004 Posts: 14 Location: Budapest, Hungary
|
Posted: Sun Jun 27, 2004 11:05 pm Post subject: KDE 3.2.3 |
|
|
upgrading to KDE 3.2.3 solved the problem of exiting the KDE session; my system suspends/resumes perfectly... yeeehaaa! |
|
Back to top |
|
|
aloha99 n00b
Joined: 06 Jun 2004 Posts: 20
|
Posted: Sun Jun 27, 2004 11:16 pm Post subject: Re: KDE restarting on suspend-resume |
|
|
srejbi wrote: | hello,
first, great thanks on the howto, i've managed to set up suspend and resume following the steps on my thinkpad t40 using development-sources-2.6.7.
|
Congrats on getting it to work. I've been watching your progress with some interest because it relates to my problem. I have an IBM T30, and I have the ACPI/kernel-supported suspend-to-RAM working, except the backlight stays on. I realize it may be a separate issue, but before I invest the time to make swsusp2 work on my 2.6.7-r6 kernel, have you had this problem on your T40? Does your backlight turn off?
Thanks! _________________ When I was 14, I couldn't believe how stupid my father was.
When I was 21, I couldn't believe how much he'd learned in only 7 years.
-- Mark Twain |
|
Back to top |
|
|
zmedico Developer
Joined: 02 Jan 2004 Posts: 352 Location: California USA
|
Posted: Mon Jun 28, 2004 4:41 am Post subject: Re: KDE restarting on suspend-resume |
|
|
aloha99 wrote: | suspend-to-RAM working, except the backlight stays on. |
That backlight should not be an issue if you use swsusp because swsusp uses zero power in hibernation. It's essentially a full shutdown except that the previous state can be resumed from the disk swap partition. The problem you're experiencing is in the acpi subsystem (and backlight driver or lack thereof) which swsusp2 does not depend on (swsusp2 does not require any firmware or hardware power management support). _________________ Zac
Last edited by zmedico on Mon Jun 28, 2004 6:51 am; edited 1 time in total |
|
Back to top |
|
|
aloha99 n00b
Joined: 06 Jun 2004 Posts: 20
|
Posted: Mon Jun 28, 2004 5:42 am Post subject: |
|
|
zmedico : thanks! _________________ When I was 14, I couldn't believe how stupid my father was.
When I was 21, I couldn't believe how much he'd learned in only 7 years.
-- Mark Twain |
|
Back to top |
|
|
srejbi n00b
Joined: 03 Jan 2004 Posts: 14 Location: Budapest, Hungary
|
Posted: Mon Jun 28, 2004 5:57 am Post subject: Re: KDE restarting on suspend-resume |
|
|
aloha99 wrote: | have you had this problem on your T40? Does your backlight turn off? |
no such problem, backlight goes off when swsusp2 powers off the machine. it must be a separate issue; i suppose you have been experimenting with apm suspend-to-ram?
aloha99 wrote: | before I invest the time to make swsusp2 work on my 2.6.7-r6 kernel |
for getting swsusp2 to work i suggest you go with development-sources-2.6.7: the gentoo-dev-sources are patched so that the swsusp patch was not able to update all neccessary files. i was lazy to dig into it myself so just went for the vanilla sources... it worked like a charm. |
|
Back to top |
|
|
aloha99 n00b
Joined: 06 Jun 2004 Posts: 20
|
Posted: Mon Jun 28, 2004 9:10 pm Post subject: Re: KDE restarting on suspend-resume |
|
|
srejbi wrote: | no such problem, backlight goes off when swsusp2 powers off the machine. it must be a separate issue; i suppose you have been experimenting with apm suspend-to-ram? |
Yes, suspend-to-RAM works perfectly well with APM, but I prefer ACPI for other reasons.
Quote: | for getting swsusp2 to work i suggest you go with development-sources-2.6.7: the gentoo-dev-sources are patched so that the swsusp patch was not able to update all neccessary files. i was lazy to dig into it myself so just went for the vanilla sources... it worked like a charm. |
Thanks for the advice. Check out this thread on using swsusp2 and 2.67, including gentoo-dev-sources:
https://forums.gentoo.org/viewtopic.php?p=1290805#1290805[/quote] |
|
Back to top |
|
|
neuron Advocate
Joined: 28 May 2002 Posts: 2371
|
Posted: Tue Jun 29, 2004 8:55 am Post subject: |
|
|
for the backlight search for scripts with "radeontool light off" or make one yourself |
|
Back to top |
|
|
tuxlover Apprentice
Joined: 21 Oct 2003 Posts: 297 Location: weltweit
|
Posted: Tue Jun 29, 2004 10:20 am Post subject: |
|
|
Updated howto: Edited "kernel patching section" for kernels >= 2.4.26 and >=2.6.6. If you have problems patching, read this.
I finally managed to patch my vanilla-2.6.7 myself thanks to the thread posted by aloha99 (thanks!). |
|
Back to top |
|
|
aloha99 n00b
Joined: 06 Jun 2004 Posts: 20
|
Posted: Tue Jun 29, 2004 10:31 am Post subject: |
|
|
neuron wrote: | for the backlight search for scripts with "radeontool light off" or make one yourself |
I didn't even know radeontool existed ... thanks!!! |
|
Back to top |
|
|
loony Apprentice
Joined: 25 Feb 2004 Posts: 199
|
Posted: Mon Jul 12, 2004 6:27 pm Post subject: |
|
|
Hi!
I just patched the kernel and tried to compile it and got the following error:
CC kernel/power/swapwriter.o
kernel/power/swapwriter.c:14:23: linux/kdb.h: No such file or directory
make[2]: *** [kernel/power/swapwriter.o] Error 1
make[1]: *** [kernel/power] Error 2
make: *** [kernel] Error 2
Did anybody have similar problems?
loony |
|
Back to top |
|
|
|