You are not logged in.

#1 2009-02-09 02:30:05

tlawson
Member
From: MN, USA
Registered: 2009-01-24
Posts: 24

fbcondecor vs. practicality

Lately some nice work has been done in the AUR packages to get fbsplash and fbcondecor working properly on Arch.  (I'd tried installing Splashy, but it was not playing nicely with respect to suspend/resume.)  During a brief experimentation with a Gentoo installation I'd found these packages worked well for me.

My problem is this.  I've got a working splash by installing fbsplash and kernel26fbcondecor (and associated packages), but because the AUR doesn't provide binaries (for obvious reasons) this installation involved recompiling a patched version of the stock Arch kernel, which floors my machine for an hour at minimum.  Kernel 2.6.28.3 is out recently and so I can probably expect a version bump soon, too, which will mean the same thing again if I want to update.  As far as I can see, the main options are:
- stop upgrading the kernel
- recompile the stock Arch kernel each upgrade
- recompile a slimmed-down personally configured kernel each time and become my own kernel maintainer.
- uninstall fbcondecor.  I learned many things from Gentoo, but the Main Lesson was: Know when to cut your losses.

I'm curious if anyone else is using an fbcondecor-patched kernel and how they handle this issue.

Offline

#2 2009-04-10 15:56:26

kujub
Member
Registered: 2008-10-12
Posts: 43

Re: fbcondecor vs. practicality

Hi,

i came to the same problem now. To solve this i use the stock kernel (2.6.29.1 now) and a custom initcpio hook for fbsplash.


edit5: The stuff below is totally outdated now !
For the latest version of the scripts have a look at http://aur.archlinux.org/packages.php?ID=26039
   big_smile



If you want to try it, here is what i did:

  HOWTO - Really silent fbsplash with stock kernel
===============================================

Early fbsplash start from initcpio -  *No* kernel patch needed if you can do without console background images. smile

This assumes that you want to make all changes to the system directly for trying this. Since all files (except config files) belong to the fbsplash package from AUR, it is also possible to change the respective files before building the package.

Change functions splash_init and splash_exit in /sbin/splash-functions-arch.sh like so:

splash_init() {
    splash_setup    
     # kill any splash daemon invoked from initcpio
     killall "$( basename "${spl_daemon}" )" 2>/dev/null
    splash_start
}

splash_exit() {
    # stay on splash streen on exit
    splash_comm_send "exit staysilent"
    splash_cache_cleanup
}

The kill command in splash_init is needed to allow a new instance of fbsplash to be started from rc.sysint to get progress working.
Adding staysilent to exit prevents switching to vc/1when fbsplash is finished. If you *dont* use a display manager you will have to switch manually with this. (The splash screen just keeps visible.)

Create the hook scriptlet file /lib/initcpio/hooks/fbsplash

run_hook ()
{
  ## run the stuff if we have splash kernel parameter set
  if [ -n "${splash}" ] ; then
    . /etc/conf.d/fbsplash.conf

    . /sbin/splash-functions.sh
    
    ## override function
    splash_init() {
      # fix message for early boot
        SPLASH_BOOT_MESSAGE="Initializing the kernel... Press F2 for verbose mode."
      # just call splash_start
      splash_start
    }
  
    splash rc_init 
  fi
}

Add additional stuff needed to the end of the install function in /lib/initcpio/install/fbsplash

install() {
  ...
  
  ### stuff for calling splash rc_init in /etc/splash-functions.sh
    add_file     "/etc/conf.d/fbsplash.conf"
    add_file     "/sbin/splash-functions.sh"
    add_binary   "/bin/sed"
    add_binary   "/bin/grep"
    add_binary   "/sbin/killall5"
    add_symlink2 "/bin/pidof" "/sbin/killall5"
    add_binary   "/usr/bin/basename"
    add_binary   "/sbin/fbsplashctl"
    add_symlink2 "/sbin/fbsplashd.static"      "/sbin/fbsplashctl"
    add_symlink2 "/sbin/fbcondecor_ctl.static" "/sbin/fbsplashctl"
    add_dir      "/lib/splash/cache"
    add_dir      "/lib/splash/tmp"
    add_device   "/dev/tty1" c 4 1
    SCRIPT="fbsplash"
}

Edit your HOOKS in /etc/mkinitcpio.conf

# fbsplash:
#  Needs to be put after udev when real hook script is provided.
#  Put it after uresume (uswsusp-fbsplash seems to hang otherwise)
#  Putting it before resume should be save.
HOOKS="base udev autodetect pata scsi sata uresume fbsplash resume filesystems"

This is just what i have. Read the comment !

To be more save, edit fallback_options in /etc/mkinitcpio.d/kernel26.preset

fallback_options="-S autodetect,fbsplash"

If you use uswsusp-fbsplash, dont forget to add this line in /etc/suspend.conf ! smile

splash = y

To be extra save, make a copy of your working initcpio.

cd /boot && cp kernel26.img kernel26.img.old

If something goes wrong you can use the copy or the kernel26-fallback.img by pressing 'e' in grub and edit the filename.

Make the new initcpio

mkinitcpio -p kernel26

Edit your GRUB menu.lst

kernel ... video=vesafb vga=792 logo.nologo quiet console=tty1 splash=silent,theme:darch

Option logo.nologo makes it even more silent. smile
Dont use vesafb with options like in video=vesafb:ywrap,mtrr:2 ! This caused some problems here. (nvidia drivers)

Enjoy !

P.S.
  For even more silence i recommend grub-gfx with options timeout=3 and hiddenmenu

edit: smal fix in HOOKS line
edit2: changed HOWTO title
edit3: change splash-functions-arch.sh instead of creating a new file
edit4: small fix for early boot message

Last edited by kujub (2009-05-02 23:46:19)

Offline

#3 2009-04-10 16:17:24

cyberpatrol
Member
From: Germany
Registered: 2006-11-22
Posts: 68

Re: fbcondecor vs. practicality

kujub, does fbsplash also show the console background images with your initcpio hook or only the silent splash at boot time?
I guess only the latter. So I guess, that you still need the fbcondecor kernelpatch, if you want to see the console background images.

So if you don't want to have the console background images you already can use fbsplash just with the stock kernel instead of the fbcondecor kernel. But if you want to have these images, you still have to compile kernel26-fbcondecor from AUR.

Offline

#4 2009-04-10 18:14:49

kujub
Member
Registered: 2008-10-12
Posts: 43

Re: fbcondecor vs. practicality

cyberpatrol, your guessing is totally right. The console background is not important to me. I just wanted the silent splash to be as silent as possible without the need to recompile the kernel on every update. (coming from gentoo smile

Offline

#5 2009-04-13 12:04:32

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: fbcondecor vs. practicality

Hi kujub, thanks a lot for figuring this out. it looks to make kernel upgrades a whole lot easier smile

I've found a couple of issues though, one is that /bin/rm was missing from the initcpio on my system, so i guess that means it should be added to your install/fbsplash file. Also i found that on my system it only worked if killall is called with the -w option. Since i was passing options anyway i added -q and removed the redirection to /dev/null. One last change i made was to call killall from /etc/rc.d/functions.d/fbsplash.sh where stat_busy calls 'splash rc_init'. this meant i didn't need to override splash_init at all, although im pretty sure splash_exit still needed it (haven't tested though).
Hope that made sense. Im not worried if you dont want to change it that much but adding rm to the initrd and -w to killall would be nice smile

Also I might put this up on the AUR, along with maybe an updated skin or something, but I don't want to take the credit for your work so i thought id check with you first.

Thanks again, this is a real timesaver


"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page

Offline

#6 2009-04-14 12:49:47

kujub
Member
Registered: 2008-10-12
Posts: 43

Re: fbcondecor vs. practicality

Hi PirateJonno,
nice to hear that you like my work smile

I've found a couple of issues though, one is that /bin/rm was missing from the initcpio on my system

Yes that's true. I did not add it because there really isn't anything to delete in the init filesystem. On the other hand i think it does not hurt much to add it to get verbose boot a little more nice.

Also i found that on my system it only worked if killall is called with the -w option. Since i was passing options anyway i added -q and removed the redirection to /dev/null.

That seems good too me too.

One last change i made was to call killall from /etc/rc.d/functions.d/fbsplash.sh where stat_busy calls 'splash rc_init'. this meant i didn't need to override splash_init at all

Well done !

although im pretty sure splash_exit still needed it (haven't tested though).

Yes, this is to avoid switching to console first and than to to X at the end.
But there is still a problem with this: Someone booting without a display manager will be left alone with the splash screen. So i think there should be some tests added to detect this. Unfortunately checking /var/run/daemons wouldn't help much even if fbsplash is at the end of DAEMONS because there are people (like me) which start the DM from inittab.
May be we could redefine splash_exit in /etc/rc.d/fbsplash like this:

splash_exit() {
  if pidof Xorg >/dev/null ; then 
    # stay on splash screen
    splash_comm_send "exit staysilent"
  else
    splash_comm_send "exit"
  fi
}

and then call it with

( sleep 2 ; splash_exit ) &  # detect if X takes over

What do you think ?

Also I might put this up on the AUR, along with maybe an updated skin or something, but I don't want to take the credit for your work so i thought id check with you first.

Hmm, i would prefer to get this merged with fbsplash on AUR, but if that is not possible for some reason and you are willing to mainlain a new package feel free to go on. I would name it fbsplash-silent or what do you think ?
For the credit a contributor line would be enough:

# Contributor: Kurt J. Bosch <kujub [at] quantentunnel [dot] de>

testing changes and editing initial post ...

Offline

#7 2009-04-14 13:35:35

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: fbcondecor vs. practicality

Hi again, thanks for the reply

kujub wrote:

I did not add it because there really isn't anything to delete in the init filesystem. On the other hand i think it does not hurt much to add it to get verbose boot a little more nice.

Oh yeah, I didn't think of that, good point.

kujub wrote:

That seems good too me too.

Then again it delays the boot a bit so im not sure whether other people should use it.

kujub wrote:

May be we could redefine splash_exit in /etc/rc.d/fbsplash like this:

splash_exit() {
  if pidof Xorg >/dev/null ; then 
    # stay on splash screen
    splash_comm_send "exit staysilent"
  else
    splash_comm_send "exit"
  fi
}

and then call it with

( sleep 2 ; splash_exit ) &  # detect if X takes over

What do you think ?

I can't think of a better way to do it automatically, but maybe it would be faster to add a variable to /etc/conf.d/fbsplash.conf so it can be manually configured. I'm not sure if this would help though I'd need to do some testing myself. I grepped every file in the package and as far as I can tell splash_exit is only called from the rc script anyway, unless the binary daemon has some way of signalling the scripts or something.

kujub wrote:

Hmm, i would prefer to get this merged with fbsplash on AUR, but if that is not possible for some reason and you are willing to mainlain a new package feel free to go on. I would name it fbsplash-silent or what do you think ?
For the credit a contributor line would be enough:

# Contributor: Kurt J. Bosch <kujub [at] quantentunnel [dot] de>

Yeah sorry I was assuming that this wasn't going to be merged because people might care about the console background. I might try to adjust the scripts to only run if fbcondecor is not present and then I guess there'd be no reason not to merge, so yeah I probably won't go ahead with the package. I'm still thinking about a theme but that could probably be merged too, since darch doesn't even use the right logo anymore smile


"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page

Offline

#8 2009-04-14 14:26:33

kujub
Member
Registered: 2008-10-12
Posts: 43

Re: fbcondecor vs. practicality

Then again it delays the boot a bit so im not sure whether other people should use it.

If waiting is needed on killall we should add it IMHO. Someone wanting the fastest boot possible shouldn't use splash anyway. tongue

Forgot splash_cache_cleanup
Now my /etc/rc.d/fbsplash start section ends like this:

        save_boot_steps
    
        splash_exit() {
            if pidof Xorg >/dev/null ; then 
                # stay on splash screen
                splash_comm_send "exit staysilent"
            else
                splash_comm_send "exit"
            fi
            splash_cache_cleanup
        }
        ( sleep 2 ; splash_exit ) &  # detect if X takes over
    ;;

maybe it would be faster to add a variable to /etc/conf.d/fbsplash.conf so it can be manually configured.

It makes no difference in speed because it goes to the background. wink

I'm not sure if this would help though I'd need to do some testing myself.

It works here, but a config option could be better in spite of this because this might be more arch alike, i don't.know.

BTW I allready have the files for a merged fbsplash package here.

Offline

#9 2009-04-14 16:58:48

kujub
Member
Registered: 2008-10-12
Posts: 43

Re: fbcondecor vs. practicality

OK - applied all changes here.
Instead of going thru the pain of editing my initial post again i simply post a diff for the AUR package. cool
Now everybody can try this without so much hand editing work.

edit:
Replaced patch because the added file fbsplash.initcpio_hook was missing
Uploaded patch to pastebin because all tabs were converted to blanks here. sad
Indentation and md5sums were also broken because of this.
Download here: http://pastebin.com/pastebin.php?dl=f49c3be29
and do:

cd where-you-unpacked-fbsplash.tar.gz
tr -d '\r' <  your-download-dir/f49c3be29.txt > fbsplash.diff # remove the carriage returns :-/
patch -Np0 -i fbsplash.diff

I hope this works now.

edit2: WARNING: Remove the carriage returns after downloading the file !

Last edited by kujub (2009-04-19 09:47:47)

Offline

#10 2009-04-18 15:10:33

kujub
Member
Registered: 2008-10-12
Posts: 43

Re: fbcondecor vs. practicality

Simplified version. Now it even works without the daemon. cool

http://pastebin.com/pastebin.php?dl=f559689b8

edit: WARNING: Remove the carriage returns after downloading this file !

Last edited by kujub (2009-04-19 09:46:45)

Offline

#11 2009-04-18 18:13:56

kujub
Member
Registered: 2008-10-12
Posts: 43

Re: fbcondecor vs. practicality

Some fixes for fbcondecor and to avoid blinking. smile

http://pastebin.com/pastebin.php?dl=f90a26bc

edit: WARNING: Remove the carriage returns after downloading this file !

Last edited by kujub (2009-04-19 09:46:16)

Offline

#12 2009-04-19 05:15:49

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: fbcondecor vs. practicality

Hi kujub, looks like you've got this under control. I've gone ahead and made a new theme (http://aur.archlinux.org/packages.php?ID=25684) if you want to try it out.
EDIT: I just applied the patches and (so much for pastebin tongue) borked my initcpio because the hooks file had DOS newlines. Not your fault obviously but just a word of warning for anyone trying this out.
I also noticed a "Failed to open the fbcon_decor control device" message on boot, which should go away if you redirect fbcondecor_helper's stderr to /dev/null (for the sake of ultra-quietness).
The rest of it looks good, thanks to this I can use inittab to start gdm again smile (before i started it halfway through my daemons list as a workaround tongue)
EDIT 2: for some reason the redirection didnt work (maybe /dev/null isn't set up yet?) but its not worth fixing it because the message actually isnt visible before the splash comes up anyway.

Last edited by PirateJonno (2009-04-19 07:17:23)


"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page

Offline

#13 2009-04-19 09:44:14

kujub
Member
Registered: 2008-10-12
Posts: 43

Re: fbcondecor vs. practicality

Hi PirateJonno

borked my initcpio because the hooks file had DOS newlines.

Sorry about that. I tested this with my first patch and patch didn't accept the downloaded file at all. So i just added some code to the posting to remove the CRs.
About your new theme: It is surly welcome to have some kind of official ArchLinux splash theme, but i really like the darch theme. smile Don't know what kano thinks about this, but i vote for merging in your theme as default and keep darch anyway.

Offline

#14 2009-04-19 09:55:01

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: fbcondecor vs. practicality

kujub wrote:

Sorry about that. I tested this with my first patch and patch didn't accept the downloaded file at all. So i just added some code to the posting to remove the CRs.

Oh ok, yeah that happened to me too but i thought it was something I did tongue (im no good with diffing/patching).

kujub wrote:

I really like the darch theme. smile Don't know what kano thinks about this, but i vote for merging in your theme as default and keep darch anyway.

Haha ok, fair enough smile

Last edited by PirateJonno (2009-04-19 09:55:26)


"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page

Offline

#15 2009-04-22 10:21:16

kujub
Member
Registered: 2008-10-12
Posts: 43

Re: fbcondecor vs. practicality

New version
- improved scripts
- new options in fbsplash.conf    cool

patch: http://pastebin.com/pastebin.php?dl=f35e5a95
edit: This one is broken ! Please use version at comment #19.

WARNING: Remove the carriage returns after downloading this file !

WARNING: This version contains many changes. It may even eat up your machine.

@PirateJonno:
I added your theme as an optdepend.
Could you please do some testing with this new patch ?  smile

Last edited by kujub (2009-04-22 17:46:56)

Offline

#16 2009-04-22 10:33:27

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: fbcondecor vs. practicality

Hi kujub
will do. i can't test it just now but ill get back to you asap.
are you thinking of taking over as maintainer now that kano has orphaned fbsplash?


"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page

Offline

#17 2009-04-22 13:40:46

hash
Member
From: Poland
Registered: 2008-07-31
Posts: 111

Re: fbcondecor vs. practicality

kujub wrote:

New version
- improved scripts
- new options in fbsplash.conf    cool

patch: http://pastebin.com/pastebin.php?dl=f35e5a95

WARNING: Remove the carriage returns after downloading this file !

WARNING: This version contains many changes. It may even eat up your machine.

Md5sum for fbsplash.inithooks seems to be wrong. I've removed md5sums and the first line of the output from makepkg is

sed: can't read scripts/splash-functions.sh: No such file or directory

I guess scripts/splash-functions.sh in pkgbuild should be changed to scripts/splash-functions.sh.in. After applying those changes package builds fine.

After installing the package i get the following warning from pacman:

warning: directory permissions differ on lib/splash/cache/                                                                                                 
filesystem: 644 package: 755

Offline

#18 2009-04-22 17:28:57

kujub
Member
Registered: 2008-10-12
Posts: 43

Re: fbcondecor vs. practicality

Hi hash,

thank you for tesing. smile

hash wrote:

Md5sum for fbsplash.inithooks seems to be wrong.

This might be a problem with pastebin or with patch. (whitespace)

the first line of the output from makepkg is

sed: can't read scripts/splash-functions.sh: No such file or directory

I guess scripts/splash-functions.sh in pkgbuild should be changed to scripts/splash-functions.sh.in. After applying those changes package builds fine.

That won't work. Please change the sed line and move it after the install line.

    install -D -m644 ${srcdir}/splash-functions-arch.sh  sbin/splash-functions-arch.sh

    # fix duplicate slashes to get splash_cache_cleanup grep to work
    sed -r -e 's,^(export spl_.*="/)/+,\1,' \
        -i sbin/splash-functions.sh

After installing the package i get the following warning from pacman:

warning: directory permissions differ on lib/splash/cache/                                                                                                 
filesystem: 644 package: 755

I guess you get this because your tmpfs is still mounted on /lib/splash/cache because of the problem above. Since it is mounted with mount -n you can only see it with

cat /proc/mounts

wink

Offline

#19 2009-04-22 17:44:08

kujub
Member
Registered: 2008-10-12
Posts: 43

Re: fbcondecor vs. practicality

Fixed patch: http://pastebin.com/pastebin.php?dl=f79509b5

WARNING: Remove the carriage returns after downloading this file !

WARNING: This version contains many changes. It may even eat up your machine.

edit: Newest version at comment #43

Last edited by kujub (2009-04-23 11:30:15)

Offline

#20 2009-04-22 18:20:59

hash
Member
From: Poland
Registered: 2008-07-31
Posts: 111

Re: fbcondecor vs. practicality

With the new patch package builds just fine without any problems.
However when i boot, at about 70% my screen goes black for about 1-3seconds and then goes back but there is no splash logo, only the part of the progress bar (above 70%) appears.

Offline

#21 2009-04-23 07:06:48

kujub
Member
Registered: 2008-10-12
Posts: 43

Re: fbcondecor vs. practicality

@hash:
Do you see the splash before the screen goes black ?
Does the F2 key work ?
What /etc/conf.d/fbsplash.conf do you use ?
Where do you start Xorg / gdm / kdm or whatever ? If you have this in DAEMONS try to put it to the end behind fbsplash or move fbsplash right before this.

Offline

#22 2009-04-23 07:13:20

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: fbcondecor vs. practicality

I've tested it a bit and it seems fine to me. timidity++ failed to start a coupla times but i think that was just an erroneous error. also, i think it might be possible to fix the bug i reported earlier on the fbsplash page by adding a test to see if spl_cache_dir/daemon exists before calling splash_verbose from stat_fail in /etc/functions.d/fbsplash.sh (i'll have a better look myself to confirm and let you know). I'll amend my theme in a few days to add support for the new messages.


"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page

Offline

#23 2009-04-23 07:31:51

hash
Member
From: Poland
Registered: 2008-07-31
Posts: 111

Re: fbcondecor vs. practicality

kujub wrote:

@hash:
Do you see the splash before the screen goes black ?
Does the F2 key work ?
What /etc/conf.d/fbsplash.conf do you use ?
Where do you start Xorg / gdm / kdm or whatever ? If you have this in DAEMONS try to put it to the end behind fbsplash or move fbsplash right before this.

Yes i can see the splash before the screen goes black. I noticed also that sometimes, the splash screen is being redrawn again after few seconds (first is progress bar, then logo).

Not sure about F2 key, haven't checked it yet.

I start KDM via DAEMONS line.

DAEMONS=(syslog-ng @network @pppoe @alsa @cups @hal @sensors @ntpd kdm fbsplash)

I use the following fbsplash.conf:
http://wklej.to/0vQF

I'll try to test different configurations of daemons line.

EDIT: F2 key does work. I've tried different configs of daemons and even when i had only fbsplash and syslog-ng it still "blinked".
I've noticed that it goes black just after the "INIT: Entering runlevel 3"

Last edited by hash (2009-04-23 07:43:58)

Offline

#24 2009-04-23 08:48:37

kujub
Member
Registered: 2008-10-12
Posts: 43

Re: fbcondecor vs. practicality

@PirateJonno:
Good point about stat_fail. Thank you. smile

@hash:
When you try with this:

DAEMONS=(syslog-ng fbsplash)

Do you really get a black screen or just get switched to console tty ?
Does syslog-ng report [FAIL] ?

Offline

#25 2009-04-23 08:52:00

hash
Member
From: Poland
Registered: 2008-07-31
Posts: 111

Re: fbcondecor vs. practicality

kujub wrote:

@hash:
When you try with this:

DAEMONS=(syslog-ng fbsplash)

Do you really get a black screen or just get switched to console tty ?
Does syslog-ng report [FAIL] ?

I get black screen(i'm not being kicked to tty) for 1-2seconds and then it goes back to splash screen and stays on it until i switch to tty. Syslog-ng reports as [DONE].

Might be worth mentioning that i use kernel from arch repo (without fbcondecor patch), and this problem happens since i've tried fbsplash (1.5.4.3-7).

Last edited by hash (2009-04-23 08:53:55)

Offline

Board footer

Powered by FluxBB