Tiny Core Linux

Tiny Core Base => TCB Bugs => Topic started by: thane on April 14, 2017, 11:37:59 AM

Title: TC 8.0 no wallpaper after boot (sometimes)
Post by: thane on April 14, 2017, 11:37:59 AM
I'm having an intermittent issue in TC 8.0 with there being no wallpaper after boot. Wbar is there but the rest of the screen is black. If I go to the Control Panel/Wallpaper and select the jpg, it works fine. Maybe some sort of timing issue? There don't appear to be any other problems associated with it.

I'll be away from TC for a few days so no rush. Thanks.
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: Uncle Warthog on April 14, 2017, 01:37:35 PM
I'm seeing the same thing on my end with the same fix.

Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: curaga on April 15, 2017, 04:05:31 AM
I booted TC 8.0 in Qemu 10 times, every time the core logo showed. Try to redirect the messages into a file in /tmp (in .setbackground, add >/tmp/bg.log 2>&1 at the end).
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: thane on December 26, 2017, 01:27:55 PM
<bump>

I've had a couple recurrences of this, but it's very infrequent, maybe once every 100 boots at most. I haven't been able to capture any info on it in the log. However a possible clue is that I get the same screen if opt/background is pointing to a non-existent file (i.e. you set opt/background to a file and then delete it).
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: thane on February 28, 2018, 11:49:18 PM
<bump 2>

After upgrading to TC 9.0, there is consistently no wallpaper after boot. Control Panel/Wallpaper works fine. Was there a change to .setbackground or .xsession that might account for this? I've seen this in some earlier upgrades but IIRC it hasn't been a factor recently. Note that what I did was an actual upgrade (installed TC from CD to existing USB partition, then rebooted and updated extensions). Everything else seems to work right. Suggestions?

Thane

< edit: since this is now occurring in 9.0, I guess the thread can be renamed or I can start a new one... >
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: Juanito on March 01, 2018, 12:49:33 AM
No, there were no changes to .setbackground or .xsession in tc-8.x/9.x.
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: thane on March 01, 2018, 01:40:01 AM
I did some more fiddling and it appears to be related to Xorg. When I removed Xorg and rebooted with just Xvesa the background was set, although the display was distorted because Xvesa doesn't have any settings that match my monitor. I'll keep checking. Thanks.

Thane

<edit> When I deleted the xf86-video-nv extension (which contains the correct drivers for my monitor) and rebooted, the background was set. When I reloaded the extension and rebooted the background was again black. Maybe try moving the entry for the extension around in the onboot list?
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: curaga on March 01, 2018, 02:09:02 PM
Hm, so -nv related, and now it's consistent. Please try to grab the errors from .setbackground, redirect to some file in /tmp.
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: thane on March 02, 2018, 12:29:37 AM
#!/bin/sh
hsetroot -full /opt/backgrounds/seattle_4.jpg >/tmp/bg.log 2>&1
[ $(which wbar.sh) ] && wbar.sh

tmp/bg.log shows:

Segmentation fault
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: curaga on March 02, 2018, 04:19:29 AM
Can you build it with debug symbols, and try to get a core dump? "ulimit -c unlimited" allows core dumps.
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: thane on March 06, 2018, 01:36:12 AM
I haven't been able to generate a core dump so far. The problem appears only on boot. This is in dmesg:

hsetroot[5610]: segfault at 88 ip 08049cb4 sp bf8c0670 error 4 in hsetroot[8048000+4000]

edit: Probably no longer relevant, but there is a long-ago thread about a similar issue

http://forum.tinycorelinux.net/index.php?topic=12988.0

Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: thane on March 10, 2018, 01:10:22 PM
A solution that appears to work (at least for a couple of tries):

I put "sleep 1" in /home/tc/.setbackground.sh just before the hsetroot command and the wallpaper now appears after boot. This reinforces my earlier impression that the occasional problems I had in TC 8.x and consistently in 9.0 were a timing issue. As for why it took me so long to act on that impression, I can only say "duh"...

Will let you know if this solution works reliably.

Thane
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: thane on March 10, 2018, 04:56:43 PM
Hmm, looks like the change to .setbackground.sh is preserved between boots, but ControlPanel/Wallpaper/Install resets it...
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: Misalf on March 11, 2018, 09:28:15 AM
Maybe in  ~/.xsession  something like
Code: [Select]
[ -x $HOME/.setbackground ] && { sleep 1 ; $HOME/.setbackground ; } &
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: thane on March 11, 2018, 04:55:57 PM
Thanks Misalf, that works. I assume .xsession is only executed on boot? That seems to be where the problem was since setting the background from the control panel always worked. What you get for using 8 year old hardware I guess...
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: Misalf on March 11, 2018, 06:05:32 PM
~/.xsession  is exec'ed by  startx . So every time the desktop starts.
I wonder if it's caused by the X server has not been started completely and if we can check if it has.
The sleep command always seems kind of a cheap compromise for me in those cases as it may bring in unnecessary delays or be too short depending on the hardware.
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: Rich on March 11, 2018, 07:17:54 PM
Hi Misalf
... I wonder if it's caused by the X server has not been started completely and if we can check if it has. ...
I thought that's what the  waitforX  call in  .xsession  was for.
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: Misalf on March 11, 2018, 08:06:09 PM
Well, I'm just speculating without knowledge about X.
And I don't know what  waitforX  actually does (can't find the source offhand and not sure I could even make sense of it). If it reports true if X is running it may still be too soon for  xsetroot  to be able to set the wallpaper while X hasn't completely initialized.
Just fumbling about in the dark.
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: Rich on March 11, 2018, 08:52:54 PM
Hi Misalf
The source is available here:
http://distro.ibiblio.org/tinycorelinux/2.x/release/src/waitforX.c
Basically it tries to retrieve the current display. It will continue to try 50 times over the course of 10 seconds. If it succeeds, it
returns 0. If it fails, it returns 1.
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: Misalf on March 11, 2018, 09:25:38 PM
Thanks for digging that out.
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: curaga on March 12, 2018, 05:22:25 AM
It does indeed wait for X to be ready, and at that point everything, including setting wallpapers, should work. Thus I believe it's a -nv driver bug, given other drivers do work.
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: dspence on March 12, 2018, 05:14:59 PM
I am also seeing this, on TC8, every one out of maybe 10 reboots, and I have Intel graphics, not Nvidia.
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: Uncle Warthog on March 12, 2018, 05:23:55 PM
I'm also seeing this on various systems with Intel video.  I haven't tested it on Nvidia but have seen it once or twice on ATI/AMD video as well.  It's happened with every version since TC 8.0 including the current 9.0 but nothing before that seems to have the problem.
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: Misalf on March 12, 2018, 09:09:47 PM
I have seen it, only a few times, before 8.x (I'm still on 7.x) but unfortunately can't tell on what hardware or on what exact version of tinycore. However, the question for me is, while the wallpaper certainly doesn't kill my workflow, could it potentially be an issue that might affect other things (e.g. ~/.X.d).
Title: Re: TC 8.0 no wallpaper after boot (sometimes)
Post by: curaga on March 13, 2018, 07:22:38 AM
Okay, thanks for the confirmations.