X frozen screen using restartwm (because of exec)

Please post any bugs you have found
Post Reply
Message
Author
MUguest
Posts: 73
Joined: Sat 09 Dec 2006, 16:40

X frozen screen using restartwm (because of exec)

#1 Post by MUguest »

this drove me nuts in wows new puplet.
I think this also will concern all versions of Puppy.

You run "chooselocale".
It restarts X.
When you exit X now (e.g. to reboot), you just see a garbled screen.
This happend in Xorg 7.4 with the "savage" driver.
I vaguely remember similar reports for the "original" Puppy, too.

Observing /var/log/Xorg.0.log I found this:
(--) using VT number 4
This is a bug, as Puppy just has 3 virtual terminals.
Usually, it looks like:
(--) using VT number 3
It does not happen using the Xorg vesa driver.

So why does X suddenly switch to console 4?
The reason is, how X is restarted.
I removed the "exec" in /usr/sbin/chooselocale
(in the end):
old:

Code: Select all

 exec restartwm $CURRENTWM
new:

Code: Select all

 restartwm $CURRENTWM
and /usr/X11R7/bin/restartwm:
old:

Code: Select all

exec killall -9 X #v1.0.7 make sure X is killed.
new:

Code: Select all

 killall -9 X #v1.0.7 make sure X is killed.
Now it works as expected, at least in my modified system with "desktopchooser", I did not try it yet in a pure system.

So why is this?
My guess:
If you "exec", then the current program "turns" into the new one.
So you have X running, (vt3), and now run a bash script.
It execs a NEW X, from the already running one, as a childprocess.
Some graficsdrivers interpret this in a way, that the old X still could block the old vt3, so for the new X, they switch to vt4.

If you remove th exec, the second X is no child of the first, and so the first will be "completely" exited correctly, before the second starts. Like this vt3 is free again, and used for the new X.

Mark

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

here is a similar report from Lobster, but also from xorg 7.4:
http://www.murga-linux.com/puppy/viewto ... 162#268162

It seems, my fixes were not sufficient yet.
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

#3 Post by WhoDo »

MU wrote:It seems, my fixes were not sufficient yet.
Thanks, Mark. I've implemented these changes for Puppy-4.2a2 anyway, so we'll see what turns up in testing.

Cheers
[i]Actions speak louder than words ... and they usually work when words don't![/i]
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#4 Post by MU »

It looks like I was on the right way:
I also had to change a line in /usr/X11R7/bin/xwin, in the end:

Code: Select all

#MU
echo "please wait a moment..."
sync
#exec xwin
xwin
#//end of MU

fi

#the end#
I made no long time tests yet, but some restarts of X just showed "vt3" now.
I also could create a savefile without problems, what was problematic before using the Nvidia chip, as here dialog acted very strange due to the bug.
It could not read keystrokes correctly, and suddenly exited.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

Post Reply