| View previous topic :: View next topic |
| Author |
Message |
Archangel1 Veteran


Joined: 21 Apr 2004 Posts: 1212 Location: Work
|
Posted: Thu Jul 21, 2005 11:26 am Post subject: Software Suspend 2 + fbsplash |
|
|
Having spent the last day or so working out how to make Software Suspend 2 (henceforth swsusp2) work with fbsplash, I thought I should let everyone else know how it's done.
This is roughly based upon the readme included with userui. I don't know if it's the best way to do it, but it seems to have worked for me.
The issue here is that while the standard instructions for generating an initramfs work fine for fbsplash, they don't include everything necessary for swsusp2 to do all it's stuff while resuming. Hence, you tend to get a flash of the splash image which then blanks for most of the resuming process, then reappears right before you get back into X.
There are a few posts about this on the forums, but nobody seems to have replied with a solution that I've seen.
The instructions are for the theme emergence and resolution 1024x768. Adjusting them for your configuration should be pretty obvious.
You'll need to be root for at least some of the steps (making device nodes, copying to /boot etc). It's probably easiest to do it all as root if you're unsure.
As usual, be careful when playing with this sort of thing; the potential exists to b0rk up your machine. Keep backups of anything that needs overwriting, and don't blame me; I'm certainly not accepting any responsibility if things seriously break. That said, I'm happy to help with any questions or problems people have.
Genkernel users: Genkernel uses an initrd/initramfs to do it's thing. I don't know how to deal with that as well. Sorry...
Get the two working independently first before worrying about this. They both have guides on the wiki: fbsplash and swsusp2
Now, you need the appropriate packages. You should have splashutils installed already (step 2.3 in the guide), but you also need the userui package for swsusp2:
| Code: | echo sys-apps/suspend2-userui fbsplash >> /etc/portage/package.use
emerge suspend2-userui |
Now, we need to generate the initramfs, but not compress it into the final image yet:
| Code: | mkdir /tmp/img
splash_geninitramfs -c /tmp/img/ -v -r 1024x768 emergence |
You should notice here that the image created is a sort of mini-filesystem, with the required directories in it.
We need to add the userui binary to the image:
| Code: | cd /tmp/img
cp /sbin/suspend2ui_fbsplash sbin |
(apparently for some users this may be /usr/sbin/suspend2ui_fbsplash; YMMV)
This improves things a bit, but not completely. swsusp2 also wants an appropriate splash theme and font file from /etc/splash.
| Code: | cd /tmp/img/etc/splash
cp -r emergence suspend2
cp /etc/splash/luxisri.ttf . |
I think you should be able to get away with linking emergence to suspend2 rather than copying, but I didn't have any luck with it. If anyone else does, let me know.
Some device nodes are also needed:
| Code: | cd /tmp/img/dev
mknod fb/0 c 29 0
ln -s fb/0 fb0
mknod vc/0 c 4 0
mknod vc/1 c 4 1
ln -s vc/0 tty0
ln -s vc/1 tty1 |
The image should now have everything required. We need to create the final compressed image (normally splash_geninitramfs does this for you at the end):
| Code: | cd /tmp/img
find . | cpio --quiet --dereference -o -H newc | gzip -9 >/tmp/img.cpio.gz |
Copy it to /boot (don't overwrite your existing one, just in case):
| Code: | mount /boot
mv /tmp/img.cpio.gz /boot/emergence-1024x768 |
Edit /boot/grub/grub.conf; it doesn't need any parameters other than the usual ones for fbsplash and swsusp2, but you should definately create a duplicate boot option while testing so you don't render it unbootable if something's b0rked.
You'll probably want to clean up the /tmp/img directory eventually, but you may want to hang onto it until you're sure it works. I was doing it on another machine to the one I was testing on, so didn't have to worry about /tmp being cleaned at boot.
Finally, you need to tell swsusp2 to use the fbsplash userui program. Add this line to /etc/hibernate/hibernate.conf:
| Code: | | ProcSetting userui_program /sbin/suspend2ui_fbsplash |
And you're done! Unmount /boot and reboot to test the new image. Assuming that works okay, try suspending and resuming on it; it should show the progress bar (and status messages) for the whole process now.
If something's wrong, post the error message/symptom here and I'll try to help. _________________ What are you, stupid?
Last edited by Archangel1 on Tue Jul 26, 2005 7:11 am; edited 2 times in total |
|
| Back to top |
|
 |
Archangel1 Veteran


Joined: 21 Apr 2004 Posts: 1212 Location: Work
|
Posted: Thu Jul 21, 2005 11:35 am Post subject: |
|
|
Bonus mark for keen students:
Sick of the "Signature found" message popping up over the top of your pretty fbsplash every time?
It's doing that because it's reporting as an error rather than just information. I'd say that's bad form; there seems to be a very accurate bug report on the bugzilla, but nothing seems to be changing in a hurry.
In the meantime, edit /usr/src/linux/kernel/power/suspend_swap.c. The line in question is
| Code: | | printk(KERN_ERR name_suspend "Swapwriter: Signature found.\n"); |
That's line 1538 in my current copy; YMMV.
You might be able to fix it by deleting the KERN_ERR bit; that would seem to be inline with other printk's in the kernel.
I'm not really bothered, so I just commented out the whole line (remember that's // not # ).
Voila! No more silly messages over your fbsplash! _________________ What are you, stupid? |
|
| Back to top |
|
 |
dan2003 Apprentice


Joined: 11 May 2003 Posts: 251 Location: somewhere near london, UK
|
Posted: Mon Jul 25, 2005 12:44 pm Post subject: |
|
|
Awesome thankyou!
Only one thing i noted was different,
/sbin/suspend2ui_fbsplash
is on my system
/usr/sbin/suspend2ui_fbsplash
Cheers |
|
| Back to top |
|
 |
Archangel1 Veteran


Joined: 21 Apr 2004 Posts: 1212 Location: Work
|
Posted: Tue Jul 26, 2005 7:05 am Post subject: |
|
|
Interesting - that's just a straight emerge on mine, of the latest version. Wonder how they end up in the different locations :-S _________________ What are you, stupid? |
|
| Back to top |
|
 |
theboywho Tux's lil' helper

Joined: 16 Jan 2004 Posts: 110 Location: Birmingham, United Kingdom
|
Posted: Tue Jul 26, 2005 6:03 pm Post subject: |
|
|
| Archangel1 wrote: | | Interesting - that's just a straight emerge on mine, of the latest version. Wonder how they end up in the different locations :-S |
Same here....
However when I resume using the initramfs with the suspend2 fbsplash stuff - the process stops at 'Freezing Processes' and the machine just locks up.
It resumes perfectly if I use the initramfs generated with splash_geninitramfs - but then has no fancy resuming splash screen. |
|
| Back to top |
|
 |
Archangel1 Veteran


Joined: 21 Apr 2004 Posts: 1212 Location: Work
|
Posted: Wed Jul 27, 2005 8:29 pm Post subject: |
|
|
Hmmmm that's not very good... Obviously that didn't happen to me!
You could try it without the /dev stuff - you don't need it to resume, but it affected when my splash screen appeared. It may depend on what's in /dev normally (although I didn't think it would...).
I can't see how much of the rest of it would cause a lockup anyway, so that's probably a good place to start  _________________ What are you, stupid? |
|
| Back to top |
|
 |
pjv Guru


Joined: 02 Jul 2003 Posts: 349 Location: Belgium
|
Posted: Mon Aug 01, 2005 4:14 pm Post subject: |
|
|
The making of an initrd you have described is actually only if you want to have a splash during the first part of the resume. To get it to work I also needed to make a link to /etc/splash/emergence at /etc/splash/suspend2, enable the two lines about fbsplash in /etc/hibernate/hibernate.conf (and leaving the theme to suspend2), and disabling text mode.
However I still have a bit of the progress bar from the regular console texts shimmering through my fbsplash. The fbsplash is also being refreshed (built up again so a distortion for a fraction of time) quite a number of times. And at the very beginning of the hibernation and the very end of the resume there's a one-line-error message, something about fbsplashio-error (I'll look it up soon and post it) at the very left top of my screen. And last but not least I have some artifacts in my resumed X (so gnome): fragments of three diagonal lines in the top 20 pixels of my screen with what appears to be a flickering cursor in it. I wonder if this has to do something with the "quiet CONSOLE=/dev/tty1" that one has to put on the kernel line since the latest version of splashutils. Anyone who can help me with any of these probs? Thx |
|
| Back to top |
|
 |
pjv Guru


Joined: 02 Jul 2003 Posts: 349 Location: Belgium
|
Posted: Mon Aug 01, 2005 9:01 pm Post subject: |
|
|
The error line is like "FBIOSPLASH_SETSTATE failed, error code 22", but I don't always see it any more. I may be able to solve this myself. The artifacts are gone too.
However seeing the console text and the refreshing is still there, can someone help me with that?
I'm beginning to discover some other probs now too with the regular fbsplash.
Oh, btw, linking (inside the initrd) at suspend2 does not work here either  |
|
| Back to top |
|
 |
Archangel1 Veteran


Joined: 21 Apr 2004 Posts: 1212 Location: Work
|
Posted: Tue Aug 02, 2005 7:11 am Post subject: |
|
|
| pjv wrote: | | The making of an initrd you have described is actually only if you want to have a splash during the first part of the resume. |
That was pretty much what I was aiming at, yes. Sort of along the lines of "Having fbsplash actually work properly with swsusp2", ie. do everything it's capable of.
That FBIOSPLASH error sounds quite technical; certainly nothing in my experience.
AFAIK the making of the initrd should only provide an initial environment, hence it shouldn't break too much. The only bits I'm slightly worried about are the device nodes, but they didn't seem to cause any problems for me.
Do you get the error all the time, or only when you resume from swsusp2? _________________ What are you, stupid? |
|
| Back to top |
|
 |
pjv Guru


Joined: 02 Jul 2003 Posts: 349 Location: Belgium
|
Posted: Tue Aug 02, 2005 2:52 pm Post subject: |
|
|
The error I think I solved already, it's btw in the faq somewhere at www.suspend2.net.
Can I ask however: Do you see the regular text progress bar from the console through your nice fbsplash as well? If not which kernel version, splashutils version, etc. are you using?
One more thing, I was trying some cool stuff, like adding a text with a command in it (exec mode, i was trying to display a fortune) in a custom fbsplash theme, but that was a bad idea. I nearly fucked up my hard drive because it kept on polling the command and in that way corrupting the memory. Got an error about having pagesize 109 instead of 100, so booted with noresume2 and cleaned out my swap. Close one Don't try it at home... |
|
| Back to top |
|
 |
Archangel1 Veteran


Joined: 21 Apr 2004 Posts: 1212 Location: Work
|
Posted: Wed Aug 03, 2005 6:47 am Post subject: |
|
|
| pjv wrote: | | Can I ask however: Do you see the regular text progress bar from the console through your nice fbsplash as well? If not which kernel version, splashutils version, etc. are you using? |
No, just the fbsplash text and progress bar.
Kernel is 2.6.12 with additional patches for fbsplash, swsusp2, vesafb-tng and at least some of Con Kolivas' stuff - I forget exactly which.
Splashutils was 1.1.9.6
The laptop I was doing it on was stolen by some thieving bastard last week, so I can't really test any of it any more - I don't bother with suspend on my desktop, it's way too much trouble. Hopefully the insurance company will decide I deserve a replacement before too long. _________________ What are you, stupid? |
|
| Back to top |
|
 |
pjv Guru


Joined: 02 Jul 2003 Posts: 349 Location: Belgium
|
Posted: Thu Aug 04, 2005 1:59 pm Post subject: |
|
|
I'm sorry to hear about your laptop.
I seem to have nearly the same versions as you, so I guess I'll have to try some things out when I have some more time. Thx |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|