LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-24-2007, 06:24 PM   #1
bioe007
Member
 
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654

Rep: Reputation: 30
Lose DRI after exit/restart fluxbox


Hi,

problem 1
I am losing DRI when I 'Exit' and restart (startx) fluxbox. (Not the fluxbox 'restart' command)

I think I have figured out from lsmod that once X starts up, two modules [ drm and radeon ]are loaded, then remain so. Which seems to be the problem with DRI, because if I exit fluxbox and then rmmod the modules and re-startx I get DRI working again. Which is a bit of a pain.

I'd like to automate this module unloading. I see at least two logical places to do it but I'm not sure which is better or if there is a more appropriate way, i'm hoping for some advice on this:

#1) make a rmmod script and configure the fluxbox 'exit' menu option to rmmod before exiting.
- This could be potentially bad though if I ever get a console FB and DRI working. (-radeon would be a problem?)
- Also, I can't find the syntax for exiting fluxbox? my .fluxbox/menu has this entry:
Code:
[exit] (Exit)
I'm not sure how to send exit to the X11 server?

#2) have ~/.xinitrc rmmod right before starting up? Im not sure how/where to do that though.
something like:
rmmod -f radeon
rmmod -f drm
startfluxbox

<edit-later- i tried adding the above with /sbin/rmmod to ~/.xinitrc and it doesnt seem to work)

problem 1.b
For what I'd like a script to do from the I need root access from the script.

I can not seem to figure out sudo ?? I have visudo'd my sudoers file:

Code:
# User alias specification
User_Alias LOCAL = perry

# User privilege specification
root    ALL=(ALL) ALL
LOCAL   ALL=NOPASSWD:ALL
perry   ALL=NOPASSWD:/usr/bin/chvt, /sbin/lspci
but never gotten any results from it, the perry line above was to be for a 'suspend to ram' script but I always get errors from sudo: 'must be setUID to root' or something like that.

please don't RTFM me - I have read the man sudo pages. I think am perhaps a 'special needs sudoer', 'cause I am not getting it.

thanks for any help.

Last edited by bioe007; 02-24-2007 at 06:38 PM.
 
Old 02-24-2007, 07:31 PM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Where do those modules that cause the problem get loaded (drm and radeon) ? It might be in '/etc/X11/xorg.conf', why don't you check and comment them out if they are in there (assuming they are causing the problem).

As for getting root access for a script ... I have never been able to set up sudo properly with all the man pages and how-to's and all ... it just won't work. Instead, you could just set the SUID bit for the permissions of the script as well as chown to root (when the script is run, it gains root permissions).

Last edited by H_TeXMeX_H; 02-24-2007 at 07:33 PM.
 
Old 02-24-2007, 09:56 PM   #3
bioe007
Member
 
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by H_Tex_Mex_H
Where do those modules that cause the problem get loaded (drm and radeon) ? It might be in '/etc/X11/xorg.conf', why don't you check and comment them out if they are in there (assuming they are causing the problem).
It is indeed from xorg.conf (drm anyway, and radeon, by way of being my graphics driver). I need them to properly do 3D, but they must be modular, else I get no DRI.

So when I exit an X session, they are still loaded, but for some reason if they are loaded already when an X session starts - I get no acceleration.

Quote:
Originally Posted by H_Tex_Mex_H
set the SUID bit for the permissions of the script as well as chown to root (when the script is run, it gains root permissions)
Sounds good, I will try that.

Any tips on how to 'exit' the x-session from a script?

many thanks.
 
Old 02-25-2007, 12:41 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by bioe007
It is indeed from xorg.conf (drm anyway, and radeon, by way of being my graphics driver). I need them to properly do 3D, but they must be modular, else I get no DRI.

So when I exit an X session, they are still loaded, but for some reason if they are loaded already when an X session starts - I get no acceleration.
Well, what I would do (now this is a bit unorthodox), edit '/usr/X11/bin/startx' (back it up before you do), rmmod at the beginning, modprobe at the end.

For exiting X-server ...

Code:
killall X

Last edited by H_TeXMeX_H; 02-25-2007 at 12:45 AM.
 
Old 02-25-2007, 02:20 PM   #5
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274

Rep: Reputation: 63
Quote:
have ~/.xinitrc rmmod right before starting up? Im not sure how/where to do that though.
something like:
rmmod -f radeon
rmmod -f drm
startfluxbox
That would be better than

Quote:
Well, what I would do (now this is a bit unorthodox), edit '/usr/X11/bin/startx' (back it up before you do), rmmod at the beginning, modprobe at the end.
Quote:
<edit-later- i tried adding the above with /sbin/rmmod to ~/.xinitrc and it doesnt seem to work)
That's because modprobe and rmmod need root access. You can try again to get sudo working, or in the ~/.xinitrc change your rmmod lines to look like this

Code:
su -c "rmmod -f radeon ; rmmod -f drm"
Afterward the startx command should prompt you for a password. Use the root password. The root access will apply only to the commands in "" on the su -c line. The startx command that follows will be run by your user.
 
Old 02-26-2007, 12:06 AM   #6
bioe007
Member
 
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654

Original Poster
Rep: Reputation: 30
Thanks all, I have it working now.. my solution?

Well I chose (.. er, uhm.. defaulted to after numerous other attempts ) a 'combination' approach. I created script, that has the rmmod commands, made it executable, and placed it in my /etc/X11 directory. This coupled with ?properly editing my sudoers file has it working.

Now in ~/.xintirc I call this script and it unloads the offending modules.

Thanks for all your help!
 
  


Reply



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
DRI Failing To Work After X-restart rakeyry Linux - General 1 12-31-2006 04:44 PM
Fluxbox error /usr/share/fluxbox/nls/en_GB/fluxbox.cat humbletech99 Debian 2 12-29-2005 10:16 AM
fluxbox init overwritten in every restart. xushi Slackware 3 07-09-2005 02:31 PM
fluxbox background goes back after restart alagenchev Linux - General 4 11-22-2004 09:47 AM
You may now exit and restart using ctrl-alt-delete ... I wish! pbhj Slackware 4 12-06-2002 04:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:18 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration