Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: mbertrand on January 27, 2015, 01:30:36 PM

Title: xsetup
Post by: mbertrand on January 27, 2015, 01:30:36 PM
Apart from boot code, what could invoke xsetup?
We have the same scripts running on systems that have slightly different video.
In .xsession when we specify resolution arg with xvesa would a resolution not supported cause xsetup to run and if so where would I find this code?
Thanks.
Title: Re: xsetup
Post by: curaga on January 27, 2015, 02:51:10 PM
Besides the bootcode, it is run by startx if the X server differs. For example, if your current X server is Xorg, but the line in .xsession references Xfbdev, xsetup would be run.

There is no code to handle other conditions like the X server failing to start.
Title: Re: xsetup
Post by: mbertrand on January 27, 2015, 03:13:47 PM
Ok thanks
Title: Re: xsetup
Post by: mbertrand on January 27, 2015, 03:21:59 PM
How does it know what the current X server is?
It's odd because I never explicitly changed server . Always been xvesa. The only difference is the resolution may not support what is set in the .xsession.
Title: Re: xsetup
Post by: curaga on January 27, 2015, 03:49:07 PM
Each X server extension writes its name into a file in /etc/sysconfig, letting the system know that way.
Title: Re: xsetup
Post by: mbertrand on January 27, 2015, 03:50:37 PM
Great, thanks.
Title: Re: xsetup
Post by: mbertrand on January 27, 2015, 03:57:55 PM
Is it possible that I had to different xserver packages. If so then I guess the last one would be in sysconfig/Xserver and I'm trying to load the other one?
Title: Re: xsetup
Post by: curaga on January 28, 2015, 04:40:04 AM
Sorry?
Title: Re: xsetup
Post by: CentralWare on January 28, 2015, 05:34:46 AM
If you tce-loaded Xvesa and Xorg (in that order) it would be my impression the launch script of Xorg (the last one to run) in /usr/local/tce.installed/Xorg-x.x would be the last one to update sysconfig and thus be the one that gets executed.  HAVING both should not cause an issue other than possibly Xorg wanting more drivers for graphics (ie: ATI/AMD Radeon generally fails in Xorg without the radeon driver, while it'll still run under Xvesa.)

An easy way to find out:
On a machine which DOES boot into the engine, open a terminal and run ps -a | grep X and either Xorg or Xvesa will be listed.  (I don't think they can both live from boot (as is, if you tried to do so purposefully) at the same time as I'd assume they'd both try to launch display :0 so you should find one or the other.)
Title: Re: xsetup
Post by: CentralWare on January 28, 2015, 05:45:15 AM
@Curaga: Can you think of any way to poll the system for a monitor's "preferred" resolution?  (I don't recall which distro - I'm thinking it might have been CentOS/Fedora quite some time ago which seemed to know this, along with WinXP/7 which also seems to know this, so I "know" there just "has" to be a way...  I just can't think of it unless it would be specific to monitor drivers, which goes well past the TC scope.)  In class/graphics I don't think there's going to be much of anything as I doubt the GPU "calls" the monitor to ask for these details and I don't remember there being class/monitor.  Any ideas?
Title: Re: xsetup
Post by: curaga on January 28, 2015, 07:14:54 AM
Yes, Xorg does EDID probing, but there are standalone applications as well. ddcprobe and readedid are two.