Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Switching between radeon and fglrx drivers at-will/reboot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Mon Jan 10, 2011 8:43 pm    Post subject: Switching between radeon and fglrx drivers at-will/reboot Reply with quote

I have a new install, my first time buying ATI video in some time. It's an AMD785-family chipset with HD4200 embedded graphics. (R600, I bellieve)

I have it all running and doing 3D with the radeon drivers. It works with glxgears, Extreme Tuxracer, and Doomsday, (Doom/Heretic/Hexen source-port) though the latter shows that the radeon driver performance really isn't quite up there, yet. Most of the time, I'm perfectly happy with the radeon performance, because it's adequate for my normal usage, and I'd generally prefer to run the OSS driver.

But every now and then I'd like to play a game or two.

With a combination of scripting, blackboxing, xorg.conf.d/*, etc is it reasonable to switch between radeon and fglrx at will - presumably with a reboot?
What radeon kernel modules do I need to blacklist in order to run fglrx?
What (if any) fglrx kernel modules do I need to blacklist in order to run radeon?
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Mon Jan 10, 2011 8:57 pm    Post subject: Reply with quote

Code:
#!/bin/bash

if [[ ati = $1 ]]; then
    eselect opengl set ati
    eselect xvmc set ati
    mv -nv /etc/X11/xorg.conf.d/fglrx.{disabled,conf}
    printf "blacklist radeon\nblacklist fbcon" > /etc/modprobe.d/fglrx-blacklist.tmp
elif [[ xorg = $1 ]]; then
    eselect opengl set xorg-x11
    eselect xvmc set xorg-x11
    mv -nv /etc/X11/xorg.conf.d/fglrx.{conf,disabled}
    printf "blacklist fglrx" > /etc/modprobe.d/fglrx-blacklist.tmp
else
    echo "$0 [ati|xorg]"
    exit 1
fi

mv /etc/modprobe.d/fglrx-blacklist.{tmp,conf}


Should do most of the work.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Tue Jan 11, 2011 5:01 pm    Post subject: Reply with quote

Thanks, that's the kind of thing I was looking for. I simply wasn't sure what all of the pieces I needed to switch would be, and what they were called. Using "eselect xvmc" is a new one to me, I'm used to using it for opengl, profiles, etc. I guess to get this stuff into place and get fglrx installed, I should either switch to the "vesa" xorg driver, or just do it in text mode. I might want to add "vesa" as an option to your script, for that matter.

On the side, I see you blacklisting "fbcon". In the Gentoo Radeon/KMS wiki I saw something about turning framebuffer stuff off, so I did. In my /var/log/Xorg.0.log I see a brief bit of hate-mail about fbcon not being loaded, but it doesn't seem to have hurt, so I've ignored it. Now you talk of blacklisting it when switching to fglrx, so I'm wondering if I should go back and enable it. Running a quick xconfig I see that CONFIG_FRAMEBUFFER_CONSOLE (which I presume controls building of fbcon.ko) is over in the "Console Display Driver Support" page instead of the "Display Device Support" section where the Wiki explicitely had me turning stuff off. I take it I should turn that item back on?

EDIT... I double-checked last night, and I do have FRAMEBUFFER_CONSOLE enabled. The small piece of hate-mail was about fbdev, not fbcon, and from what I can tell, that's a red herring, and I'm correctly set up.

Next to try the fglrx switcheroo.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
olek
Apprentice
Apprentice


Joined: 22 Oct 2011
Posts: 173

PostPosted: Sun Oct 23, 2011 12:38 am    Post subject: Reply with quote

Hi.
I really would like to know if this worked for anyone.

Cheers
Back to top
View user's profile Send private message
jerith
n00b
n00b


Joined: 04 Jan 2005
Posts: 14

PostPosted: Fri Dec 09, 2011 3:46 am    Post subject: Reply with quote

This is great info -- thanks!

But ... What do I set VIDEO_CARDS to? What packages do I need to have emerged? What goes in the two xorg conf files?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Fri Dec 09, 2011 1:04 pm    Post subject: Reply with quote

jerith wrote:
This is great info -- thanks!

But ... What do I set VIDEO_CARDS to? What packages do I need to have emerged? What goes in the two xorg conf files?

You need VIDEO_CARDS="radeon r600 fglrx" and an "emerge -aDNtu world" should pull in the correct ones. The config files just need a minimal Device section each.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Fri Dec 09, 2011 1:55 pm    Post subject: Reply with quote

Ant P. wrote:
Code:
#!/bin/bash

if [[ ati = $1 ]]; then
    eselect opengl set ati
    eselect xvmc set ati
    mv -nv /etc/X11/xorg.conf.d/fglrx.{disabled,conf}
    printf "blacklist radeon\nblacklist fbcon" > /etc/modprobe.d/fglrx-blacklist.tmp
elif [[ xorg = $1 ]]; then
    eselect opengl set xorg-x11
    eselect xvmc set xorg-x11
    mv -nv /etc/X11/xorg.conf.d/fglrx.{conf,disabled}
    printf "blacklist fglrx" > /etc/modprobe.d/fglrx-blacklist.tmp
else
    echo "$0 [ati|xorg]"
    exit 1
fi

mv /etc/modprobe.d/fglrx-blacklist.{tmp,conf}


Should do most of the work.


what's fbcon? where is kms in the mixture?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Fri Dec 09, 2011 8:34 pm    Post subject: Reply with quote

fbcon is the framebuffer driver. radeon.ko provides radeondrmfb. Blacklisting them both allows fglrx to load.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Sat Dec 10, 2011 6:02 am    Post subject: Reply with quote

Ant P. wrote:
fbcon is the framebuffer driver. radeon.ko provides radeondrmfb. Blacklisting them both allows fglrx to load.

using kms here without fbcon and it works, infact, afaik, kms + fb is a no no.

also your script won't blacklist kms and I've seen situations in which modules that were needed to for other modules and were blacklisted were loaded.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Mon Dec 12, 2011 8:56 pm    Post subject: Reply with quote

DaggyStyle wrote:
using kms here without fbcon and it works, infact, afaik, kms + fb is a no no.

That's interesting, I'd always thought that it was the likes of vesafb and radeonfb, the pre-KMS framebuffer drivers (which I never mentioned), that were a problem - not simply switching to a high-res VT using the radeondrmfb driver.

Without fbcon.ko my console runs in 80x25 VGA mode, so is there a more "correct" way to use it while keeping the KMS + native screen resolution + fast VT switching I've been using for years?
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Tue Dec 13, 2011 6:30 am    Post subject: Reply with quote

Ant P. wrote:
DaggyStyle wrote:
using kms here without fbcon and it works, infact, afaik, kms + fb is a no no.

That's interesting, I'd always thought that it was the likes of vesafb and radeonfb, the pre-KMS framebuffer drivers (which I never mentioned), that were a problem - not simply switching to a high-res VT using the radeondrmfb driver.

Without fbcon.ko my console runs in 80x25 VGA mode, so is there a more "correct" way to use it while keeping the KMS + native screen resolution + fast VT switching I've been using for years?

I don't know what is the right way, you'll need to ask wiser people than me.
since the introduction of kms, I've always seen problems when running kms and fb, you can always try and see which suits you better.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
equaeghe
l33t
l33t


Joined: 22 Feb 2005
Posts: 632

PostPosted: Sat Nov 24, 2012 4:59 pm    Post subject: Reply with quote

Ant P. wrote:
Code:
#!/bin/bash

if [[ ati = $1 ]]; then
    eselect opengl set ati
    eselect xvmc set ati
    mv -nv /etc/X11/xorg.conf.d/fglrx.{disabled,conf}
    printf "blacklist radeon\nblacklist fbcon" > /etc/modprobe.d/fglrx-blacklist.tmp
elif [[ xorg = $1 ]]; then
    eselect opengl set xorg-x11
    eselect xvmc set xorg-x11
    mv -nv /etc/X11/xorg.conf.d/fglrx.{conf,disabled}
    printf "blacklist fglrx" > /etc/modprobe.d/fglrx-blacklist.tmp
else
    echo "$0 [ati|xorg]"
    exit 1
fi

mv /etc/modprobe.d/fglrx-blacklist.{tmp,conf}


Should do most of the work.


How do I setup my bootloader to get an entry that runs the script with 'ati' as a parameter and one that runs it with 'xorg'?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum