LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 07-31-2007, 01:07 PM   #1
Defunct
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.

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

Rep: Reputation: 130Reputation: 130
http://www.xml.com/ldd/chapter/book/

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, 12:12 PM   #3
Defunct
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, 03:19 PM   #4
studioj
Member
 
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.
 
  


Reply


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 02:02 PM
Different video drivers are loaded for root and non-root users triet Linux - Software 1 12-31-2004 03:20 PM
ds: no socket drivers loaded shanenin Linux - Software 0 09-12-2004 04:20 PM
hardware drivers loaded explorer Linux - Networking 3 04-11-2004 06:36 AM
suse 8.2 how to startx and stop x and install nvidias video drivers rthatchjr Linux - Newbie 1 12-13-2003 04:46 AM


All times are GMT -5. The time now is 03:39 AM.

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