Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-05-2004, 12:22 PM   #1
Registered: Mar 2003
Posts: 37

Rep: Reputation: 15
SuSE 9.0 Kenerl 2.6.3 swsusp & Bootsplash


I decided to write this howto, to stop people from running into the problems I did. In this howto I will explain how to patch your kernel for

SuSE 9.0
Running Kernel 2.6.3
With Hibernation
and Bootsplash

Then how to configure hibernation and bootsplash and how to get them both to work with each other

Patching The kernel

Hibernation patches

I know the 2.6 kernels have a swsusp patch but it did not work for me.
I used the patches available at
Download the new 2.6.3 kernel from and extract to /usr/src

You can get the first patch here
& the second here

Extract both of these to somewhere using bunzip2

cd /usr/src/linux-2.6.3
patch -p1 < /pathtopatch/software-suspend-linux-2.6.3-test6-whole
patch -p1 < /pathtopatch/software-suspend-core-2.0-whole

BootSplash patch

Get the patch from here
patch -p1 < /pathtopatch/bootsplash-3.1.4-2.6.3.diff

Ok hopefully you go no hunk errors when patching

Configuring the Kernel

Type make xconfig

compile the following into the kernel

For Hibernation you need these set

PowerManagement Options -----> Software Suspend 2--------> Swap Writter
PowerManagement Options -----> Software Suspend 2--------> Compile in debuggin output
PowerManagement Options -----> Software Suspend 2-------->Relaxed /proc/swsusp permissions

For bootsplash you need these set

Device Drivers ------> Graphics Support------->VESA VGA
Device Drivers ------> Graphics Support------->Bootsplash Configuration------>Bootup splash screen


Ok I had a nighmere with ALSA, stopping my computer coming out of hibernation. Unless you really need alsa. Compile the driver for your sound card for the open sound system.

Compiling the Kernel

make bzImage
make modules
make modules_install

You have now compiled your kernel and installed the modules, install your kernel and file as follows

cp /usr/src/linux-2.6.3/arch/i386/boot/bzImage /boot/bzImage-2.6.3
cp /usr/src/linux-2.6.3/ /boot/

Creating Initrd

Type mkinitrd -k bzImage-2.6.3 -i initrd.img-2.6.3
If in the ouput you see a line indicating a bootsplash image
has been put into your initrd skip the next part if not try the following

Configuing mkinitrd

<Warning this but be dangerous. It worked on my system with out a problem>

If like me mkinitrd did not put your image files into the initrd try this it worked for me.

I edited mkinitrd as follows to get it to compile in my bootimage.

open /sbin/mkinitrd in your fav txt editor and find this code

if [ -n "$splash" -a -x /sbin/splash.bin ]; then
if [ -f /etc/sysconfig/bootsplash ]; then
. /etc/sysconfig/bootsplash

echo -ne "Bootsplash:\t"
if [ -d $bootsplash_picture_dir -o -L $bootsplash_picture_dir ]; then
for size in ${splash//,/ }; do
if [ ! -r $cfgname ] ; then
echo "disabled for resolution $size"
elif [ ! -r $bootsplash_picture ] ; then
echo "no image for resolution $size"
echo "$THEME ($size)"
/sbin/splash.bin -s -f $cfgname >> $initrd_image
echo "no theme selected"

Replace this code with the following

if [ -n "$splash" -a -x /sbin/splash.bin ]; then
if [ -f /etc/sysconfig/bootsplash ]; then
. /etc/sysconfig/bootsplash

echo -ne "Bootsplash:\t"
if [ -d $bootsplash_picture_dir -o -L $bootsplash_picture_dir ]; then
for size in ${splash//,/ }; do
if [ ! -r $cfgname ] ; then
echo "Enabling BootSplash:Applying 2.6.3 Fix: Bootsplash forced"
/sbin/splash.bin -s -f /etc/bootsplash/themes/SuSE/config/bootsplash-1024x768.cfg >> /boot/initrd.img-2.6.3
elif [ ! -r $bootsplash_picture ] ; then
echo "no image for resolution $size"
/sbin/splash.bin -s -f /etc/bootsplash/themes/SuSE/config/bootsplash-1024x768.cfg >> $initrd_image
echo "no theme selected"

Change "bootsplash-1024x768.cfg" in above code to the file for your resolution

Now try again to make your initrd

mkinitrd -k bzImage-2.6.3 -i initrd.img-2.6.3
You should see a line saying a bootsplash has been put in my overriding the built in settings

Updating Grub

Update /boot/grub/menu.lst with the new bzImage-2.6.3 kernel and initrd.img-2.6.3
Also to the kernel line add the following
resume2=swap:/dev/hdxx vga=0x317 splash=silent dekstop
Replace /dev/hdxx with your swap partition.

Now Reboot into your new kernel

If all went well carry on to the next part if not go back and check you did every right.


The hibernation software is good, but not all of your system drivers will get restored and some services need restarting. For me and I guess most people the following will work

If you are using the nvidia binary driver switch back to the nv on in /etc/X11/XF86Config. See the end of the Howto for more information.

Download the following
run --install

Now open /etc/suspend.conf

Delete the whole file and replace with this

#-*-mode: sh-*-
# Configuration of software suspension

# If your graphic device is not able to return properly from suspend
# you can switch to textconsole before suspend and return to your
# X-console after resume.
# If you use an nvidia card, you can set this to nvidia. This
# will try to restore your 3D upon resume. This trick may be useful
# for other cards.
# Default: "no"

# Some services (e.g. network) may cause some hangs if they are not
# stopped before a suspend/resume cycle. You can set
# SWSUSP_RESTART_SERVICES to a list of services to stop before suspend
# and automatically restart after resume.
# If suspending results in killing some application because of lack
# of memory, you may also add here some of your launched services,
# so as to save memory. Good candidates are httpd, nfsserver, sendmail, etc.
# Default: " postfix alsasound gpm xntpd nfs network"
SWSUSP_RESTART_SERVICES=" postfix gpm network kbd acpid"

# Some services may need to be stopped before a suspend/resume cycle.
# You can set STOP_SERVICES_BEFORE_SUSPEND to a list of services to stop
# before suspend. These services will NOT automatically be restarted after
# the resume, use SWSUSP_RESTART_SERVICES instead if you want this
# behaviour.
# Default: ""

# Conversely, you can set START_SERVICES_AFTER_RESUME to a list
# of services to start after resuming.
# Default: ""

# Those are programs that prevent from suspending. If they are
# running and --force or --kill option aren't used, suspension
# is aborted.
# Default: ""

# You can ask to killall these applications before suspend.
# Default: none

# You can ask to run some applications before suspend using this variable.
# For instance, it may stop your VPN.
# Default: none

# You can ask to run some applications after resume using this variable.
# For instance, it may restart your ADSL connection.
# Default: none

# If the following mount points cannot be unmounted,
# then suspension is aborted unless --force or --kill
# option is used on command line
# Default: "/floppy /cdrom /var/adm/mount"
SWSUSP_UMOUNTS="/floppy /cdrom /var/adm/mount"

# These mount points should be mounted after suspend
# They should appear in /etc/fstab
# Default: none

# If the following interfaces cannot be stopped,
# then suspension is aborted unless --force or --kill
# option is used on command line
# Default: "eth0"

# These interfaces should be started after suspend
# With "auto" the interfaces stopped before suspension
# will be started in reverse order.
# Default: "auto"

# Some modules should be unloaded before a suspend/resume cycle. You
# can set UNLOAD_MODULES_BEFORE_SUSPEND to "yes" if you want
# unused modules to be removed from kernel space before suspend.
# This will be done after stopping services.
# With "no", nothing will be done before suspension.
# With "auto", it only does "rmmod -a" to clean modules
# which are marked "(autoclean)" in lsmod.
# Default: "yes"

# These modules should be unloaded after stopping services but
# before suspending.
# Default:

# These modules should be loaded after suspend
# Gentoo users can use "modules.autoload" here to read modules out of
# /etc/modules.autoload (this requires other Gentoo-specific scripts)
# Default:

# Use SWSUSP_FORCE_SUSPEND_MODE to reset the behaviour of
# suspension. If empty, this let the suspension
# behaviour unchanged. Otherwise, these values will cause:
# echo "0 $SWSUSP_FORCE_SUSPEND_MODE" > /proc/swsusp/all_settings"
# This is simply a quick way of setting your favourite swsusp
# parameters. To determine the value of SWSUSP_FORCE_SUSPEND_MODE,
# tweak the files in /proc/swsusp to your heart's content, and then
# use . The value of
# SWSUSP_FORCE_SUSPEND_MODE will be all but the first number. eg,
# # cat /proc/swsusp/all_settings
# 0 2048 0 100
# means you should have SWSUSP_FORCE_SUSPEND_MODE="2048 0 100"
# Alternatively, you can use the keyword "acpi" to use the
# /proc/acpi/sleep interface in place of /proc/swsusp/all_settings
# Default: "0", i.e. halt, escape disabled. extra settings are untouched

# If you have problems with hardware clock drift amplified by
# suspension, try to set SAVE_CLOCK_ON_SUSPEND to "yes". The
# kerneltime will being saved before suspending. If you have
# network access, best is to set this variable to yes and add
# xntpd in services to start/stop below. If you haven't such
# a service permanently available, it is better to leave it
# to no, so that hardware clock remains as a reference for
# the system.
# Default: "no"

# On some hardware, the power is cut off before the disk has
# flushed his own hardware cache. Insert the device of your
# swap partition here (e.g. /dev/hda) if you want to issue
# hdparm -W 0 <device>
# before suspension.
# Default: none

# This specifies the VT on which logging will occur if --silent
# is not enabled. This is also the VT which will be switched to
# Default: 9

Replace es1371 with the OSS driver for your sound card

To bring up all the modules and services that you need you could add them to suspend.conf however i do it with a simple bash script.

Create a file in /root called run

Add the following information to the file.
#! /bin/bash
/sbin/splash -s -u 62
modprobe ide-cd
modprobe cdrom
modprobe ide-scsi
modprobe ehci-hcd
modprobe uhci-hcd
modprobe hid
modprobe usb-storage
modprobe ext3
modprobe sr-mod
modprobe parport-pc
modprobe lp
modprobe evdev
/etc/init.d/boot.scsidev start
/etc/init.d/boot.proc start
/etc/init.d/microcode start
/etc/init.d/pcscd start
/etc/init.d/setserial start

Make the file executable, this is normally done by right clicking the file and going to properties advanced in KDE

Ok thats it type /usr/local/sbin/hibernate
Your computer should then hibernate and shutdown
Boot back up into your new kernel

WARNING: Make sure you boot into your new swsusp enabled kernel otherwise you could screw your whole filesystem up.

In the next post I will address the boot.idedma service which has been left out of the above file as will be explained

If you really want to use your nvidia binary driver go along to the web site and look at the FAQ section for more info

Use this Howto at your own risk software suspend could corrupt your whole file system

Last edited by hyperlink1uk; 03-05-2004 at 12:46 PM.
Old 03-05-2004, 12:54 PM   #2
Registered: Mar 2003
Posts: 37

Original Poster
Rep: Reputation: 15


As promised the last part of this Howto

Allowing normal users to Hibernate without using a password

As root type visudo

then add the following

%users All=(ALL) NOPASSWD: /usr/local/sbin/hibernate

DMA Problem

After HIbernation can you read a cd as a normal user or burn a disk if not give this a try.

My solution is to run /etc/init.d/boot.idedma start

Because this sometimes fails and locks my computer coming out of hibernation I left it out of the run file in the HOWTO above.

First allow normal users to run the command by doing the following

As root type visudo

then add the following

%users ALL=(ALL) NOPASSWD: /etc/init.d/boot.idedma start

Now normal users should be able to run this command as follows

sudo /etc/init.d/boot.idedma start

I made a small bash script to run the above when I run K3B

If you want to make such a script remeber to add it to visudo so a normal user can run it.
Old 03-07-2004, 04:03 AM   #3
Registered: Mar 2003
Posts: 37

Original Poster
Rep: Reputation: 15
OSS Needs another Fix


I missed a big OSS module problem heres the problem

Upon resume OSS can play DVDs and CDS put as soon as you try to play a local file it locks up with an error about snd-pcm.

By fix is to run a script before hibernating which rmmods the following. You need module unloading support in your kernel.

*rmmod es1371
rmmod snd-pcm-oss
rmmod snd-pcm
rmmod snd-timer
rmmod snd-mixer-oss
rmmod snd
*rmmod via82cxxx-audio
*rmmod ac97-codec
rmmod soundcore

The ones stared will be different depending on your sound card.

When you come out of hobernation modprobe the oss driver for your sound card for me it would be
modprobe es1371

Thanks hope this helps
Old 03-07-2004, 08:20 AM   #4
Senior Member
Registered: Jan 2002
Distribution: Ubuntu, Debian
Posts: 1,055
Blog Entries: 1

Rep: Reputation: 45
maybe this should be posted to

areas if it is not already.

thanks for the tutorial
Old 03-10-2004, 05:57 AM   #5
Registered: Mar 2003
Posts: 37

Original Poster
Rep: Reputation: 15
Thanks for the advice, I will round the How to up with some new additions that I have just added to my system and add it to the How to section.

Will be a few days writting a uni essay on signal transduction in cells


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
kenerl = no screensavers AxXium Slackware 2 06-10-2005 04:27 PM
SuSE 9.2 Bootsplash TomalakBORG SUSE / openSUSE 2 01-25-2005 07:29 AM
Slack 10.0 + swsusp + bootsplash lucas22 Slackware 0 07-27-2004 07:21 AM
Bootsplash, ATI & kernel-2.6.3 q__ Linux - Software 0 04-01-2004 11:05 AM
FreeBSD 5.1 & Bootsplash peeples *BSD 2 09-10-2003 07:28 AM

All times are GMT -5. The time now is 06:40 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration