Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Fedora This forum is for the discussion of the Fedora Project.


  Search this Thread
Old 03-13-2009, 07:53 PM   #1
Registered: Mar 2005
Distribution: Fedora Core 3
Posts: 176

Rep: Reputation: 31
unload & load a module before X starts.

I'm on FC10. Wheres the best place to put some commands that I need to run before X server starts or after X server exits.

I'm using the commercial fglrx driver for my ATI Radeon HD. It took me days to do all the fixing before it ran. Everything works flawless except X server hangs after I start x second time. I mean, I manually do a startx from text mode, and work on X. I logout of X to text mode after some time. And if I do a startx again, my computer hangs.

After a lot of fiddling, I figured out that if I unload the flgrx module and reload it again before starting the X the second time, it works.

I just need to do a "modprobe -r fglrx && modprobe fglrx" and I need to do it after I exit out from the X so that my computer doesn't hang the next time I do startx. Or, if I can achieve the same before loading X, it'll work for me.

Where do I put those command? xinitrc? xinitrc-common? Plzzz note that its loading and unloading of graphics module so it cannot be done when X is running. The sequence is important.

Or any other approaches, u'd suggest? Any other way of reloading modules?
Old 03-13-2009, 08:16 PM   #2
Registered: Nov 2008
Location: ~/
Distribution: Arch || Sidux
Posts: 393

Rep: Reputation: 45
Write some bash scripts to automate your tasks on startup and shutdown. I know FC10 uses sessions for startup... not sure about the shutdown... Not sure of FC10 baselayout. I'm guessing you need to run the commands in "init3" on shutdown. After X closes. Check with Fedora on shutdown scripts. Check this thread

Last edited by manwithaplan; 03-13-2009 at 08:20 PM.
Old 03-13-2009, 10:09 PM   #3
Registered: Mar 2005
Distribution: Fedora Core 3
Posts: 176

Original Poster
Rep: Reputation: 31
I've figure it out. I edited the startx script itlsef. Awesome!!! But I'm open to feedback if there are better approaches.


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
Can't unload module sunhui Linux - Software 4 03-28-2007 04:58 AM
trying to load fglrx can't unload radeonfb module: debian etch MrInept Linux - Software 2 03-21-2007 06:03 AM
system call to load and unload the module in kernel sharad Linux - Kernel 3 03-01-2007 05:00 AM
Better way to load/unload a kernel module seran Linux - General 3 06-23-2006 08:19 AM
Rapid module load/unload = Kernel panic mclerand Linux - Kernel 0 05-06-2006 11:02 AM > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:59 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