Page 4 of 6 FirstFirst ... 23456 LastLast
Results 31 to 40 of 52

Thread: Simple graphics switching through BIOS

  1. #31
    Join Date
    Aug 2007
    Posts
    6,676

    Default

    @Bucic

    I could implement it for Ubuntu as well, but that would require an older version like 12.04 (or a ppa with xserver-xorg-core downgrade). I did not install Ubuntu for over 1 year because it is boring (not even for 1 day). I only compile an Ubuntu style kernel on my systems. I can not implement it for Fedora, Ubuntu should be possible, but why should i do that for free when i have it already for my own system?

  2. #32
    Join Date
    Oct 2010
    Posts
    93

    Default

    I don't know if this helpful at all, but I've written a program called hybrid-detect based on a program of the same name shipped with Ubuntu: https://github.com/chenxiaolong/Fedo...ybrid-detect.c

    Basically, Ubuntu (and Debian) has the infrastructure for switching the libGL libraries. Basically, /usr/lib/*/libGL.so is a symlink to /etc/alternatives/something, which is a symlink to the actual libGL library. Because of the intermediate alternatives symlink, it's easy to choose which libGL to use with the update-alternatives tool. On Ubuntu, the Intel/Mesa libGL symlinks would be:

    /usr/lib/*/libGL.so -> /etc/alternatives/something -> /usr/lib/*/mesa/libGL.so

    and for fglrx:

    /usr/lib/*/libGL.so -> /etc/alternatives/something -> /usr/lib/*/fglrx/libGL.so

    Of course, that requires Mesa to set up its GL library in the alternatives system. Ubuntu and Debian do this, but Fedora doesn't.

    That's where my tool comes into play. (Note that it was written for NVIDIA graphics cards with muxes, but it should be easily adaptable for fglrx). It's an ugly solution, but it works. Basically, I patched the rpmfusion NVIDIA rpms so that they installed all the libraries and Xorg drivers in locations that would not be loaded by default. The packages then has a nvidia-lib(64).conf containing the path to the NVIDIA libraries. This is set up with the alternative system for the /etc/ld.so.conf.d/nvidia-lib(64).conf file. So when the Intel card is to be used:

    /etc/ld.so.conf.d/nvidia-lib(64).conf -> /etc/alternatives/nvidia-lib(64).conf -> /dev/null

    The file would point to nothing, so ldconfig will not pick up the NVIDIA libraries. And when the NVIDIA card is used:

    /etc/ld.so.conf.d/nvidia-lib(64).conf -> /etc/alternatives/nvidia-lib(64).conf -> /usr/share/nvidia/nvidia-lib(64).conf

    That takes care of the libraries. What about the NVIDIA Xorg drivers? The package installs a Xorg.conf.d file containing ModulePath lines which tell Xorg where to look for drivers. /etc/X11/xorg.conf.d/00-gfx.conf either points to modulepath.intel.conf or modulepath.nvidia.conf

    Once the patched packages are installed, the hybrid-detect tool will run on every boot, changing the symlinks depending on which card is enabled.

    Again, this is horribly hacky and convoluted, but it's the only way I could think of approaching this issue without altering any Fedora packages, only external packages.

    Source code for hybrid-detect: https://github.com/chenxiaolong/Fedo.../hybrid-detect
    Patched NVIDIA drivers: https://github.com/chenxiaolong/Fedo...x11-drv-nvidia
    Difference between non-patched and patched (may be useful for patching the fglrx package): https://gist.github.com/chenxiaolong/5483695

  3. #33
    Join Date
    Jan 2013
    Posts
    1,090

    Default

    Quote Originally Posted by Bucic View Post

    This would let me restore my current system to the productivity-optimized configuration with Intel, so I could proceed with installing another distro for gaming without loosing anything I currently have got, configured and working.
    What I donīt understand is why you want fglrx?

    I currently write from Amilo Xi 1554, which has AMD mobility X1900 (top-line mobile) and its working very good!
    At first the notebook was hot, but when I purchased Arctic Cooling MX2 and Phobya XT pads, and replaced all, the temperatures on surface went down from burning 60C to 40C. The ACPI is still broken thanks to microsoft, but I managed to combat that by editing ACPI and patching kernel + script, so I can now control the fans manually. So, right now its basically top notch an graphics are very fast and compete with opensource radeon.

    So, why fglrx instead of intel+radeon?

  4. #34
    Join Date
    Nov 2011
    Posts
    296

    Default

    @Kano & chenxiaolong

    Switching to another distro is out of question. Currently the amount of initial configuration one has to put into a fresh Fedora install is just about 'right' for my taste. I use computer as a production machine. Linux is not my hobby. At least not my first hobby. To put it other way - I won't go for any tinkering that is more than twice as cumbersome than seting up a dual boot environment. Twice as cumbersome is fine.

    The bounty thing is still valid for complete solutions. Elegance is not required. A minimum I can think of is not having to uninstall given drivers in order to switch to another graphics. That's all.

    EDIT:
    http://devgurus.amd.com/message/1296327
    Last edited by Bucic; 04-29-2013 at 04:21 PM.

  5. #35
    Join Date
    Oct 2010
    Posts
    93

    Default

    Quote Originally Posted by Bucic View Post
    @Kano & chenxiaolong

    Switching to another distro is out of question. Currently the amount of initial configuration one has to put into a fresh Fedora install is just about 'right' for my taste. I use computer as a production machine. Linux is not my hobby. At least not my first hobby. To put it other way - I won't go for any tinkering that is more than twice as cumbersome than seting up a dual boot environment. Twice as cumbersome is fine.

    The bounty thing is still valid for complete solutions. Elegance is not required. A minimum I can think of is not having to uninstall given drivers in order to switch to another graphics. That's all.

    EDIT:
    http://devgurus.amd.com/message/1296327
    My solution is for Fedora I don't have the time to adapt it for fglrx right now, but I may do it later. I'll do it for free of course, since it's for the good of the community.

  6. #36
    Join Date
    Nov 2011
    Posts
    296

    Default

    Quote Originally Posted by chenxiaolong View Post
    My solution is for Fedora I don't have the time to adapt it for fglrx right now, but I may do it later. I'll do it for free of course, since it's for the good of the community.
    The $30 will go to the community then, unless you change your mind

  7. #37
    Join Date
    Oct 2010
    Posts
    93

    Default

    Quote Originally Posted by Bucic View Post
    The $30 will go to the community then, unless you change your mind
    Haha, as a 17 year old, I don't know if it's even legal to accept a donation

    Anyway, I'll start working on it in the next few days. Could you provide the output of "lspci -nnv" so I can see what the vendor ID for ATI cards is? Thanks!

    EDIT: Also, do you use xorg-x11-drv-catalyst or xorg-x11-drv-catalyst-legacy?
    Last edited by chenxiaolong; 04-29-2013 at 05:41 PM.

  8. #38
    Join Date
    Nov 2011
    Posts
    296

    Default

    Quote Originally Posted by chenxiaolong View Post
    Haha, as a 17 year old, I don't know if it's even legal to accept a donation

    Anyway, I'll start working on it in the next few days. Could you provide the output of "lspci -nnv" so I can see what the vendor ID for ATI cards is? Thanks!

    EDIT: Also, do you use xorg-x11-drv-catalyst or xorg-x11-drv-catalyst-legacy?
    It's not mine to decide

    Here's the return of `lspci -nnv`:
    http://sdrv.ms/17tRVX7

    I'm pretty sure I use *-legacy. I used the following procedure to get catalyst legacy 13.1 installed
    https://ask.fedoraproject.org/questi...gacy-chipsets/
    The following line concluded the procedure:
    Code:
    su -c 'yum -y --disableexcludes=all install akmod-catalyst-legacy-*.rpm xorg-x11-drv-catalyst-legacy-13*.rpm xorg-x11-drv-catalyst-legacy-libs-13*.rpm'

  9. #39
    Join Date
    Jul 2009
    Location
    Germany
    Posts
    541

    Default

    Quote Originally Posted by chenxiaolong View Post
    Haha, as a 17 year old, I don't know if it's even legal to accept a donation
    It's not a donation if you get paid to do work. But it sure is legal as long as you pay taxes for the money you get for doing specific work ;-)

  10. #40
    Join Date
    Oct 2010
    Posts
    93

    Default

    Alrighty, I finished making the packages The source code and packaging are available here: https://github.com/chenxiaolong/Fedora-Hybrid-Graphics

    Instructions

    1. Switch to the AMD/ATI card in the BIOS. This is just to prevent any crashes when you install xorg-x11-drv-catalyst-legacy.

    2. Install xorg-x11-drv-catalyst-legacy just like from the link you posted (https://ask.fedoraproject.org/questi...gacy-chipsets/).

    3. Reboot and make sure everything is fine.

    4. Clone my git repo:

    Code:
    sudo yum install git rpmdevtools rpm-build wget
    git clone https://github.com/chenxiaolong/Fedora-Hybrid-Graphics.git
    cd Fedora-Hybrid-Graphics/
    5. Install my patched Catalyst legacy drivers.

    Code:
    cd xorg-x11-drv-catalyst-legacy/
    wget --inet4-only 'http://developer.amd.com.php53-23.ord1-1.websitetestlink.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz'
    spectool -g xorg-x11-drv-catalyst-legacy.spec
    sudo yum-builddep xorg-x11-drv-catalyst-legacy.spec
    rpmbuild -bb xorg-x11-drv-catalyst-legacy.spec --define "_sourcedir $(pwd)" --define "_rpmdir $(pwd)"
    sudo yum install ./x86_64/xorg-x11-drv-catalyst-legacy-*hybridgfx*.rpm
    6. Install the hybrid-detect autoswitcher.

    Code:
    cd ../hybrid-detect-fglrx/
    sudo yum-builddep hybrid-detect-fglrx.spec
    rpmbuild -bb hybrid-detect-fglrx.spec --define "_sourcedir $(pwd)" --define "_rpmdir $(pwd)"
    sudo yum install ./x86_64/hybrid-detect-fglrx-*.rpm
    7. Reboot and enjoy graphics switching!

    If anything goes wrong in the future (GUI not starting, etc.), try removing /var/lib/hybrid-detect/last_gfx_boot and then rebooting. That will force hybrid-detect to redetect which graphics card is enabled.

    Please let me know if there are any issues

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •