Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-31-2007, 12:07 PM   #1
LQ Newbie
Registered: Jul 2007
Location: Oregon
Distribution: Kubuntu but searching for something permanent
Posts: 7

Rep: Reputation: 0
How are video drivers loaded after startx is initiated

Hi everyone,

I am trying to understand in depth how video drivers are loaded after startx is initiated. I am a software engineering intern at company that primarily writes special video drivers for Windows. They do have a few drivers in linux but no one here seems to know much about them (I have no idea how they were wrote in the first place). I have done my modifications to the linux driver that they have me working on, but now I have really messed some stuff up and need to use gdb to debug. I have to either attach gdb to a running pid or I have to give it a program name that is started. I have neither of these, and I have no idea how my driver is getting loaded (When I do an lsmod or ps -A I do not see the name of the program). Could someone explain in detail/give a link on how a video module is loaded when startx is entered? I understand that my driver could be loaded very differently than from how a standard module is loaded (like nvidia or ati), but I think a general understanding would help me a lot. Please move this thread if it is in the wrong place.

Old 08-01-2007, 09:29 AM   #2
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130

This is the free version of the second edition that covers the 2.4 kernel. I believe that the most recent edition is only available in paper form. Chapter 11 seems to be the most relevant.
Old 08-01-2007, 11:12 AM   #3
LQ Newbie
Registered: Jul 2007
Location: Oregon
Distribution: Kubuntu but searching for something permanent
Posts: 7

Original Poster
Rep: Reputation: 0
I actually have that book and it has been some help. After greping around in the xfree86 code I found the function pointer which is the entry point to the driver I am working on. So, I am hoping to begin debugging today. Thanks for your help though.
Old 08-01-2007, 02:19 PM   #4
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
yea back in xfree3 there were actually different binaries for x instead of loadable drivers.
starting with xfree4 they went to a built in runtime dynamic loader for video drivers.
then X11R7.0 switched to a libdl based module loader instead of implementing its own ELF loading and parsing mechanism. I think there are still some core calls that are nothing more than dlopen or some extended version of dlopen. certainly before X11R7 all it was doing was dlopen i think.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
startx not loaded rightsidedown Linux - Software 2 02-09-2006 01:02 PM
Different video drivers are loaded for root and non-root users triet Linux - Software 1 12-31-2004 02:20 PM
ds: no socket drivers loaded shanenin Linux - Software 0 09-12-2004 03:20 PM
hardware drivers loaded explorer Linux - Networking 3 04-11-2004 05:36 AM
suse 8.2 how to startx and stop x and install nvidias video drivers rthatchjr Linux - Newbie 1 12-13-2003 03:46 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:06 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration