Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 296152 - media-gfx/splashutils-1.5.4.3 - console=tty1/silent prevents inittab to initialize startx
Summary: media-gfx/splashutils-1.5.4.3 - console=tty1/silent prevents inittab to initi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Michal Januszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-08 02:11 UTC by hal
Modified: 2010-04-05 22:20 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
profile fadein/fadeout disabled, x coming up (profile,12.29 KB, text/plain)
2009-12-09 08:22 UTC, hal
Details
profile fadein/fadeout (<- automatically) enabled, x coming not up (profile,12.29 KB, text/plain)
2009-12-09 08:25 UTC, hal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hal 2009-12-08 02:11:43 UTC
hello,

something strange happend tonight...again. the last time this happened i gave up and reinstalled my system. so i think it's time to file a bug.

i managed to get arround the problem mentioned in #294419. thanks michal. :)
but directly after the issue was fixed, i ran into a "new" one, the one i mentioned in my first lines of this report. that said everything worked fine during the last weeks. so the last steps before this happened can be found in #294419.

first of all some information about a couple of packages that might be relevant:
- media-gfx/splashutils-1.5.4.3 
- sys-boot/grub-1.97.1
- sys-apps/openrc-0.5.3
- sys-apps/baselayout-2.0.1
- sys-auth/policykit-0.9-r1
- sys-auth/polkit-0.95
- sys-auth/consolekit-0.4.1
- sys-apps/hal-0.5.13-r2
- sys-apps/dbus-1.3.0-r1

so what's the problem:
i'm starting my xserver via inittab. there is no dm/wm/de/etc. just xbmc on top of x. 

/etc/inittab (relevant line):
"c1:12345:respawn:/usr/bin/openvt -fwc 7 -- /bin/su - USER -l -c "/bin/bash --login -c startx >/dev/null 2>&1""

/boot/grub/grubcfg (grub2 relevant part):
"menuentry "XBMC" {
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set a9522492-f0ff-45ad-9721-c8318cfc4183
	linux	/vmlinuz-2.6.32-gentoo root=/dev/sda2 ro quiet video=uvesafb:ywrap,mtrr:3,1280x720-32 splash=silent,fadein,theme:xbmc console=tty1 loglevel=0 usbcore.autosuspend=-1 fastboot loglevel=0 usbcore.autosuspend=-1 acpi_enforce_resources=lax
	initrd (hd0,1)/initramfs-bootsplash
}"

what happens now is that my system boots quite normal. the fbsplash fades in, the icons appear, the splash fades out (btw is this normal? fadeout is not set in grub). normally inittab would fire up startx and switch to vt7. but this does not happen anymore. i'm ending up at the shell login at vt1. i looked in my processes and detected that x was already started in the background and waiting. but something prevents to switch to the appropriate vt. i also checked "ck-list-sessions" showing me only my ssh session, but no x session. as soon as i would "chvt 2-7" or press the key combinations, x starts quite normal, also the session gets listed by "ck-list-sessions" after the chvt procedure.

before chvt:'
"Session1:
	unix-user = 'UID'
	realname = '(null)'
	seat = 'Seat1'
	session-type = ''
	active = FALSE
	x11-display = ''
	x11-display-device = ''
	display-device = '/dev/ssh'
	remote-host-name = '192.X.X.X'
	is-local = FALSE
	on-since = '2009-12-08T01:53:40.324753Z'
	login-session-id = ''"

after chvt:
"Session1:
	unix-user = 'UID'
	realname = '(null)'
	seat = 'Seat1'
	session-type = ''
	active = FALSE
	x11-display = ''
	x11-display-device = ''
	display-device = '/dev/ssh'
	remote-host-name = '192.X.X.X'
	is-local = FALSE
	on-since = '2009-12-08T01:53:40.324753Z'
	login-session-id = ''

Session2:
	unix-user = 'UID'
	realname = '(null)'
	seat = 'Seat2'
	session-type = ''
	active = TRUE
	x11-display = ':0'
	x11-display-device = '/dev/tty2'
	display-device = '/dev/tty7'
	remote-host-name = ''
	is-local = TRUE
	on-since = '2009-12-08T01:53:19.752801Z'
	login-session-id = ''"

what i found out is the following:

1. grub - set silent / console=tty1
"linux	/vmlinuz-2.6.32-gentoo root=/dev/sda2 ro quiet video=uvesafb:ywrap,mtrr:3,1280x720-32 splash=silent,fadein,theme:xbmc console=tty1 loglevel=0 usbcore.autosuspend=-1 fastboot loglevel=0 usbcore.autosuspend=-1 acpi_enforce_resources=lax"

result: description above

------------

2. grub - removed anything related to vesa and fbcondecor
"linux	/vmlinuz-2.6.32-gentoo root=/dev/sda2 ro quiet loglevel=0 usbcore.autosuspend=-1 fastboot loglevel=0 usbcore.autosuspend=-1 acpi_enforce_resources=lax"

result: no bootsplash, no console decorations, but my system boots straight up as normal.

------------

3. grub - set verbose instead of silent / console=tty1
"linux	/vmlinuz-2.6.32-gentoo root=/dev/sda2 ro quiet video=uvesafb:ywrap,mtrr:3,1280x720-32 splash=verbose,fadein,theme:xbmc console=tty1 loglevel=0 usbcore.autosuspend=-1 fastboot loglevel=0 usbcore.autosuspend=-1 acpi_enforce_resources=lax"

result: just console decoration, no splash, but the system boots directly into x as it would normally do.

------------

4. grub - set silent / console=tty(x) but not tty1
"linux	/vmlinuz-2.6.32-gentoo root=/dev/sda2 ro quiet video=uvesafb:ywrap,mtrr:3,1280x720-32 splash=silent,fadein,theme:xbmc console=tty(x) loglevel=0 usbcore.autosuspend=-1 fastboot loglevel=0 usbcore.autosuspend=-1 acpi_enforce_resources=lax"

result: just console decoration, no splash, no verbose output, just blinking cursor. but the system boots directly into x as it would normally do.

------------

strange isn't it? if you need further information, just let me know. a friend of mine suffers exactly from the same behaviour under gentoo.

best regards,
hal

Reproducible: Always

Steps to Reproduce:
reproduction (at least for me):

1. set console=tty1 and silent in bootloader
2. reboot
3. inittab does not switch to vt7

1. let console=tty1, but set verbose in bootloader
2. reboot
3. inittab does switch to vt7

1. set console=tty(x) but not tty1, set silent
2. reboot
3. inittab does switch to vt7
Actual Results:  
inittab does not switch to vt7

Expected Results:  
inittab should switch to vt7

emerge --info media-gfx/splashutils
Portage 2.1.6.13 (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.32-gentoo i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.32-gentoo-i686-Intel-R-_Atom-TM-_CPU_330_@_1.60GHz-with-gentoo-2.0.1
Timestamp of tree: Tue, 08 Dec 2009 00:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p35
dev-lang/python:     2.6.4
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.5.3
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="candy ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/"
LDFLAGS="-Wl,-O1"
LINGUAS="de en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="bzip2"
PORTAGE_COMPRESS_FLAGS="-9"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/xbmc-overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa avahi bash-completion berkdb bluetooth bzip2 cairo cddb cdr cli consolekit cracklib crypt cxx dbus dri dts dvd dvdr eds emboss encode evo fam fbcondecor fbsplash firefox flac fortran gdbm gif gpm hal iconv jpeg jpeg2k laptop libnotify libsamplerate lirc lm_sensors mad mikmod minimal mmx modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png policykit ppds pppd python qt3support quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg symlink sysfs syslog tcpd theora threads thunar tiff truetype unicode usb v4l2 vdpau vorbis win32codecs x264 x86 xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" LIRC_DEVICES="devinput" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

media-gfx/splashutils-1.5.4.3 was built with the following:
USE="fbcondecor gpm mng png truetype -hardened"


-----------------------------------------------------------------

emerge --info included
Portage 2.1.6.13 (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.32-gentoo i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.32-gentoo-i686-Intel-R-_Atom-TM-_CPU_330_@_1.60GHz-with-gentoo-2.0.1
Timestamp of tree: Tue, 08 Dec 2009 00:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p35
dev-lang/python:     2.6.4
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.5.3
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="candy ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/"
LDFLAGS="-Wl,-O1"
LINGUAS="de en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="bzip2"
PORTAGE_COMPRESS_FLAGS="-9"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/xbmc-overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa avahi bash-completion berkdb bluetooth bzip2 cairo cddb cdr cli consolekit cracklib crypt cxx dbus dri dts dvd dvdr eds emboss encode evo fam fbcondecor fbsplash firefox flac fortran gdbm gif gpm hal iconv jpeg jpeg2k laptop libnotify libsamplerate lirc lm_sensors mad mikmod minimal mmx modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png policykit ppds pppd python qt3support quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg symlink sysfs syslog tcpd theora threads thunar tiff truetype unicode usb v4l2 vdpau vorbis win32codecs x264 x86 xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" LIRC_DEVICES="devinput" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 hal 2009-12-08 03:01:06 UTC
addon:

what i just discovered in my logs:

"/var/log/everything/current:Dec  8 03:33:21 [kernel] [    2.762173] Warning: unable to open an initial console."
Comment 2 hal 2009-12-08 03:41:35 UTC
(In reply to comment #1)
> addon:
> 
> what i just discovered in my logs:
> 
> "/var/log/everything/current:Dec  8 03:33:21 [kernel] [    2.762173] Warning:
> unable to open an initial console."
> 
ah forget it. this was just because of some tryouts with console=xyz
Comment 3 hal 2009-12-08 07:59:54 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > addon:
> > 
> > what i just discovered in my logs:
> > 
> > "/var/log/everything/current:Dec  8 03:33:21 [kernel] [    2.762173] Warning:
> > unable to open an initial console."
> > 
> ah forget it. this was just because of some tryouts with console=xyz
> 

heh. :)
the only thing that is fixed is the error in the log, not the problem itself. my last two posts should have been a sidenote/further information.
Comment 4 hal 2009-12-08 08:15:54 UTC
another piece of information, not sure if this is relevant:

" ~ # ls -la /lib/splash/
bin/   cache/ sys/   tmp/   

 ~ # ls -la /lib/splash/bin
total 32
drwxr-xr-x 2 root root 4096 Dec  8 01:14 .
drwxr-xr-x 6 root root 4096 Dec  8 01:16 ..
-rw-r--r-- 1 root root    0 Dec  8 01:14 .keep_media-gfx_splashutils-0
-rwxr-xr-x 1 root root 5384 Dec  8 01:14 fbres
-rwxr-xr-x 1 root root 5384 Dec  8 01:14 fgconsole
-rwxr-xr-x 1 root root 5356 Dec  8 01:14 usleep

 ~ # ls -la /lib/splash/cache/
total 8
drwxr-xr-x 2 root root 4096 Dec  8 00:37 .
drwxr-xr-x 6 root root 4096 Dec  8 01:16 ..
-rw-r--r-- 1 root root    0 Dec  8 00:36 .keep_media-gfx_splashutils-0

 ~ # ls -la /lib/splash/sys/
total 8
drwx------ 2 root root 4096 Dec  8 01:16 .
drwxr-xr-x 6 root root 4096 Dec  8 01:16 ..

 ~ # ls -la /lib/splash/tmp/
total 8
drwxr-xr-x 2 root root 4096 Dec  8 01:14 .
drwxr-xr-x 6 root root 4096 Dec  8 01:16 ..
-rw-r--r-- 1 root root    0 Dec  8 01:14 .keep_media-gfx_splashutils-0
XBMC ~ # 
"
Comment 5 hal 2009-12-08 10:40:12 UTC
another testcase:
i stumpled upon these bugs:

1. http://bugs.gentoo.org/show_bug.cgi?id=253758
2. http://bugs.gentoo.org/show_bug.cgi?id=97413

there i saw the usage of "luxisri.ttf" as a consolefont. so i changed my font:
#consolefont="default8x16"
consolefont="luxisri.ttf"

"~ # ls -la /etc/splash/
total 80
drwxr-xr-x  3 root root  4096 Dec  8 01:14 .
drwxr-xr-x 53 root root  4096 Dec  8 11:37 ..
-rw-r--r--  1 root root 66372 Dec  8 01:14 luxisri.ttf
drwxr-xr-x  6 root root  4096 Oct 21 13:19 xbmc"

having done this, chvt is obviously processed resulting in a successfull startx, which is strange since it was working normally the last weeks with having set the default font.
the downside of this experiment: consolefont cant't get started anymore.

"consolefont     |Cannot open font file luxisri.ttf"
Comment 6 hal 2009-12-09 08:17:18 UTC
(In reply to comment #5)
> another testcase:
> i stumpled upon these bugs:
> 
> 1. http://bugs.gentoo.org/show_bug.cgi?id=253758
> 2. http://bugs.gentoo.org/show_bug.cgi?id=97413
> 
> there i saw the usage of "luxisri.ttf" as a consolefont. so i changed my font:
> #consolefont="default8x16"
> consolefont="luxisri.ttf"
> 
> "~ # ls -la /etc/splash/
> total 80
> drwxr-xr-x  3 root root  4096 Dec  8 01:14 .
> drwxr-xr-x 53 root root  4096 Dec  8 11:37 ..
> -rw-r--r--  1 root root 66372 Dec  8 01:14 luxisri.ttf
> drwxr-xr-x  6 root root  4096 Oct 21 13:19 xbmc"
> 
> having done this, chvt is obviously processed resulting in a successfull
> startx, which is strange since it was working normally the last weeks with
> having set the default font.
> the downside of this experiment: consolefont cant't get started anymore.
> 
> "consolefont     |Cannot open font file luxisri.ttf"
> 

forget my last comment, this has nothing to do with splashutils.
guess i was a bit tired at this time...what a brainfart. XD
nevertheless x comes up if consolefont is not loaded.

but i found out something different.
"console=tty1" is set in bootloader. if i set fadein and fadeout, then it fades in and out, just like one would expect. if i only set fadein it still fades out, ignoring that fadeout was not set in the bootloader.
i took a look at "/etc/conf.d/splash" (didn't know that this exists at all):

"# Which special effects should be used?
# This should be a comma separated list. Valid items: fadein, fadeout
SPLASH_EFFECTS="fadein,fadeout""

if i comment out (#) the line above, then it's possible to switch off fadeout, too. in this case my bootloader entry looks like this:

"... video=uvesafb:ywrap,mtrr:3,1280x720-32 splash=silent,theme:xbmc console=tty1 ..."

as soon as i would set fadin in my bootloader again, while "#SPLASH_EFFECTS="fadein,fadeout" is still disabled, fadeout gets enabled automatically at the same time.

the result is, that x won't come up as soon as fadeout is enabled. if it is disabled x comes up properly, but showing the verbose console for about 1-2 seconds.
Comment 7 hal 2009-12-09 08:22:02 UTC
Created attachment 212515 [details]
profile fadein/fadeout disabled, x coming up
Comment 8 hal 2009-12-09 08:25:07 UTC
Created attachment 212516 [details]
profile fadein/fadeout (<- automatically) enabled, x coming not up
Comment 9 Carl G. Pettit 2009-12-21 22:40:02 UTC
Bump
Comment 10 hal 2010-01-10 16:51:25 UTC
(In reply to comment #9)
> Bump
> 

Bump again. ;)
Comment 11 hal 2010-01-22 12:39:31 UTC
just played around again to see if i could workaround the issue somehow. on my research i found the following: http://dev.gentoo.org/~spock/projects/fbsplash/changelog.php

"10 Sep 2007 * <spock@gentoo.org> * splashutils-1.5.2
 - Make sure chvt requests are not processed during fadeout."

it feels like this does not happen on version 1.5.4.3. like described above fadout seems to prevent chvt working correctly because xorg is started in the background and is up & running (top told me so). after initializing chvt manually, everything continues working like it should.
Comment 12 hal 2010-01-24 12:59:54 UTC
so an actual workaround is to put chvt in local.start. on this way xorg would come up correctly, but would also interrupt the fadeout process showing the console with boot information for about a second. the behaviour is just like disabling fadeout completely.
Comment 13 Michal Januszewski (RETIRED) gentoo-dev 2010-04-04 15:26:15 UTC
(In reply to comment #12)
> so an actual workaround is to put chvt in local.start. on this way xorg would
> come up correctly, but would also interrupt the fadeout process showing the
> console with boot information for about a second. the behaviour is just like
> disabling fadeout completely.
 
Sorry for my late reply to this, I just didn't have enough time lately to take a closer look at the problem. 

It looks there are three issues here:
- the fadeout problem is a genuine problem, which I have just fixed in CVS.
- you're starting X from a custom (i.e. other than 'xdm') init script, yet your SPLASH_XSERVICE in /etc/conf.d/splash is not set accordingly.  This is what is most likely causing the main problem of the boot process ending at tty1.
- additionally, it is possible that the splash daemon was not processing all signals correctly, resulting in some chvt requests not working.  This should be fixed now as well.

Please let me know if the problems you experienced are gone after syncing, reinstalling splashutils, and fixing the settings in /etc/conf.d/splash.
Comment 14 hal 2010-04-05 12:28:00 UTC
hi michael,

no problem, i was busy during the last weeks, too. ;)

> - you're starting X from a custom (i.e. other than 'xdm') init script, yet your
> SPLASH_XSERVICE in /etc/conf.d/splash is not set accordingly.  This is what is
> most likely causing the main problem of the boot process ending at tty1.

i'm starting my xsession via inittab. it calls a custom script from "/usr/local/bin" called "xbmc-gentoo" and consists of the following:

inittab entry:
"c6:2345:respawn:/usr/bin/openvt -fwec 7 -- /bin/su - xbmc -l -c "/bin/bash --login -c /usr/bin/startx >/dev/null 2>&1""

/usr/local/bin/xbmc-gentoo:
"#!/bin/bash
/usr/bin/xsetroot -cursor /opt/.modResources/xcursor/emptyCursor.xbm /opt/.modResources/xcursor/emptyCursor.xbm ;
/usr/local/bin/WiiUse_WiiRemote >/dev/null 2>&1 & 
/usr/bin/dbus-launch --exit-with-session /usr/bin/xbmc --standalone"

so basically inittab is responsible to fire up X. i guess it's not really possible to put an entry for inittab into "/etc/conf.d/splash"?
maybe i could/should extend my "xbmc-gentoo" script with the startx command and call the entire script from inittab which i could setup in "/etc/conf.d/splash".

> Please let me know if the problems you experienced are gone after syncing,
> reinstalling splashutils, and fixing the settings in /etc/conf.d/splash.

would you recommend to completely unmerge splashutils in first place or is a "re-emerge" just fine?
Comment 15 Michal Januszewski (RETIRED) gentoo-dev 2010-04-05 12:39:25 UTC
(In reply to comment #14)

> i'm starting my xsession via inittab. it calls a custom script from
> "/usr/local/bin" called "xbmc-gentoo" and consists of the following:
> 
> inittab entry:
> "c6:2345:respawn:/usr/bin/openvt -fwec 7 -- /bin/su - xbmc -l -c "/bin/bash
> --login -c /usr/bin/startx >/dev/null 2>&1""
> 
> /usr/local/bin/xbmc-gentoo:
> "#!/bin/bash
> /usr/bin/xsetroot -cursor /opt/.modResources/xcursor/emptyCursor.xbm
> /opt/.modResources/xcursor/emptyCursor.xbm ;
> /usr/local/bin/WiiUse_WiiRemote >/dev/null 2>&1 & 
> /usr/bin/dbus-launch --exit-with-session /usr/bin/xbmc --standalone"
> 
> so basically inittab is responsible to fire up X. i guess it's not really
> possible to put an entry for inittab into "/etc/conf.d/splash"?
> maybe i could/should extend my "xbmc-gentoo" script with the startx command and
> call the entire script from inittab which i could setup in
> "/etc/conf.d/splash".

I can see three possible solutions to this problem (listed in order of increasing complexity):

- create a dummy init script (e.g. '/etc/init.d/startx') and add it to the default level, set SPLASH_XSERVICE=startx.  This way, fbsplash won't try to switch to tty1 when the system is finished booting.

- modify your xmbc-gentoo script to make it an actual initscript started by openrc and not from inittab.

- modify your xmbc-gentoo script so that it can be started like xdm/gdm/kdm using the /etc/init.d/xdm initscript.

> would you recommend to completely unmerge splashutils in first place or is a
> "re-emerge" just fine?

A simple re-emerge should be fine -- you just need to make sure you have the latest commits after the sync (there should be a splashutils ChangeLog entry dated yesterday).
Comment 16 hal 2010-04-05 13:04:27 UTC
ok, what i did so far (a bit of experimenting):

1. reinstalled splashutils (latest patches were applied)
2. removed "chvt 7" from "/etc/conf.d/local.start"
3. didn't change "SPLASH_XSERVICE=xyz" yet. (btw, do the fadein/fadeout options in the splash configuration file override the settings in the kernel commandline? at least it looks like...)
4. disabled fadein/fadeout in the splash configuration and kernel commandline.
-> result: x starts correctly, but the verbose mode is visible for about a second before x starts.

5. enabled both fadein/fadeout, but only in the splash config.
-> result: ending up in tty1

6. only enabled fadein:
-> result: same as 4.

7. only enabled fadeout:
-> result: same as 5.

now i'm going to try your proposals. what i like about the inittab method is the respawn possibility. my system is an htpc without a keyboard. so in case that xbmc would crash the gui would respawn without user interaction. is there a way to achieve a respawn behaviour with your methods?
Comment 17 Michal Januszewski (RETIRED) gentoo-dev 2010-04-05 13:39:43 UTC
(In reply to comment #16)

> 3. didn't change "SPLASH_XSERVICE=xyz" yet. (btw, do the fadein/fadeout options
> in the splash configuration file override the settings in the kernel
> commandline? at least it looks like...)

Yes, they sort of do.  Basically, the effects that will be enabled during boot are the sum of the command line settings and the settings from the config file.  So, for instance, if you boot with only fadein on the kernel command line, and only fadeout in the config file, both effects will be enabled.

> now i'm going to try your proposals. what i like about the inittab method is
> the respawn possibility. my system is an htpc without a keyboard. so in case
> that xbmc would crash the gui would respawn without user interaction. is there
> a way to achieve a respawn behaviour with your methods?

I think this should be achievable with the standard xdm init script, which actually uses inittab to start the desktop manager.  You would need to edit /etc/inittab and replace 'once' with 'respawn' in the startDM line though.
Comment 18 hal 2010-04-05 13:48:04 UTC
> > now i'm going to try your proposals. what i like about the inittab method is
> > the respawn possibility. my system is an htpc without a keyboard. so in case
> > that xbmc would crash the gui would respawn without user interaction. is there
> > a way to achieve a respawn behaviour with your methods?
> 
> I think this should be achievable with the standard xdm init script, which
> actually uses inittab to start the desktop manager.  You would need to edit
> /etc/inittab and replace 'once' with 'respawn' in the startDM line though.
> 

ok. that means i would have to create an e.g. gdm like startup script!? (method 3)

Comment 19 Michal Januszewski (RETIRED) gentoo-dev 2010-04-05 13:55:01 UTC
(In reply to comment #18)

> ok. that means i would have to create an e.g. gdm like startup script!? (method
> 3)

Yeah, but it's not that complex.  If you look at /etc/X11/startDM.sh, it basically executes a script/binary that it was pointed to by /etc/init.d/xdm.  Usually that's gdm/kdm/xdm, but in your case, it could easily be xmbc-gentoo.


Comment 20 hal 2010-04-05 16:46:44 UTC
michael, what do you think of the following:

1. scripts:
- /usr/local/bin/xbmc-dm (symlinked to /usr/bin/xbmc-dm because xdm expects the binary/script to be located in /usr/bin):

#!/bin/bash
/bin/su xbmc -l -c "/bin/bash --login -c startx >/dev/null 2>&1" &

- /usr/local/bin/xbmc-gentoo:
#!/bin/bash
/usr/bin/xsetroot -cursor /opt/.modResources/xcursor/emptyCursor.xbm /opt/.modResources/xcursor/emptyCursor.xbm ;
/usr/local/bin/WiiUse_WiiRemote >/dev/null 2>&1 & 
/usr/bin/dbus-launch --exit-with-session /usr/bin/xbmc --standalone

2. configurations:
- /etc/conf.d/xdm:
DISPLAYMANAGER="xbmc-dm"

- /etc/env.d/90xsession:
XSESSION="/usr/local/bin/xbmc-gentoo"

- /etc/inittab:
x:a:respawn:/etc/X11/startDM.sh

basically this seems to work, though respawning isn't working yet. i'm not quite sure what prevents a respawn at this point.
Comment 21 Michal Januszewski (RETIRED) gentoo-dev 2010-04-05 17:22:43 UTC
(In reply to comment #20)

> #!/bin/bash
> /bin/su xbmc -l -c "/bin/bash --login -c startx >/dev/null 2>&1" &

Is it necessary to put it into background (&) here?

> basically this seems to work, though respawning isn't working yet. i'm not
> quite sure what prevents a respawn at this point.

When you kill X and are in a situation in which you'd expect a respawn, are you sure the xbmc-dm script is dead as well?  If so, does X come back up if you run `telinit a` from a console?
Comment 22 Michal Januszewski (RETIRED) gentoo-dev 2010-04-05 17:25:05 UTC
OK, I just did a simple test and I think putting xmbc into background is the cause of the problem.  Check /var/log/messages for a 'respawning too fast' error from init.
Comment 23 hal 2010-04-05 17:33:18 UTC
i'm just about to inspect the processes. but i think this is getting too far now for this bug report. :) what do you think? may i have a chance to meet you on irc in the fbsplash channel?
Comment 24 Michal Januszewski (RETIRED) gentoo-dev 2010-04-05 17:37:05 UTC
(In reply to comment #23)
> i'm just about to inspect the processes. but i think this is getting too far
> now for this bug report. :) what do you think? may i have a chance to meet you
> on irc in the fbsplash channel?

Sure, feel free to join me there.  Once we have solved this interactively, we can post a quick summary here. 

Comment 25 Michal Januszewski (RETIRED) gentoo-dev 2010-04-05 22:20:37 UTC
The problem was resolved by:
- fixing a bug in /etc/X11/startDM.sh (bug #313287)
- setting CHECKVT to 1 in /etc/conf.d/xdm
- removing the '&' character from the end of the xbmc-dm script