I would like to know the exact process used by Ubuntu (if possible with location of configuration file) in order to start X (with lightdm).
I did not find any precise, detailed and comprehensive documentation of this process.
Some of the questions I would like to be detailed are :
- What scripts and configuration files are used (I mean where are they)?
- How to customize them in a clean way?
- How does X determine which graphics card (and thus the driver) it will use (since
xorg.conf
seems useless nowaday) on computer with integrated and discrete cards? - How to force X to use a specific driver (in order to avoid lots of useless log messages)?
- What are the relations between the linux kernel driver and xorg graphics driver?
Best Answer
I started answering this (as I do when I start answering a lot of questions on AU) because I wanted to know more. You've asked some pretty decent questions about how things work that I confess, I didn't immediately have answers to. I've done my best.
You'll understand what I'm talking about when you look at
man xorg.conf
and find things like this:Seriously.
LightDM is started by Upstart (the
init
system, started by the Kernel on boot) here:That feeds into the
lightdm
command which reads (seat information, etc) from:And then starts X which looks for the following configurations:
If present in the configuration, that's how X would pick the driver/monitor/etc layout... If it's not, the newer XRandR extensions have a major part to play in guessing and persisting monitor settings.
If you don't want a best guess, you can force it in a direction by:
But if you let
xrandr
handle things, once you log in, the configuration comes from:After X starts there's a load of session gubbins (autostarts, etc) that start that aren't particularly relevant to the graphics process but they're probably worth mentioning. Mentioned.
There are two bits that elude proper explanation:
There's certainly a lot more automagical wrangling than there used to be.