Ubuntu – How to re-configure graphics from Intel integrated to Intel / ATI switchable

atidrivershybrid-graphicsintel graphicsswitchable-graphics

Minimum goal: Ability to switch between the graphic cards without drivers re-installation. Restarting computer in the process is fine.

There are lots of 'how to get switchable graphics to work' guides but I found none on how to configure a system for switchable graphics operation on Ubuntu from the ground up, nor explaining the current driver situation for particular computer models (integrated+discrete combinations).

Examples:
https://help.ubuntu.com/community/HybridGraphics
http://www.thinkwiki.org/wiki/Switchable_Graphics

My system being mature and on Intel integrated card also makes things complicated.

System information:
Ubuntu 12.04 amd64, installed clean with system configured to use only the integrated Intel card
Lenovo Thinkpad T500

Intel GMA 4500MHD / ATI Mobility Radeon HD 3650

Current situation:
Mature and up-to-date system with no configuration changes to what's given above.
I've made a backup image of the system (Clonezilla) so regardless of what's written below let's assume it's our starting point. If something in What I have already tried is not clear you may as well diregard it.

What I have already tried:
Configuring BIOS to switchable graphics and:

  1. Installing Additional Hardware drivers – returned an error.
  2. Installing proprietary amd-driver-installer-12.6-legacy-x86.x86_64.run automatically – system starts to 'low-graphics mode'.
  3. Tried fixing as per https://help.ubuntu.com/community/BinaryDriverHowto/ATI#Manually_installing_Catalyst_12.6.2C_special_case_for_Intel.2BAC8-ATI_hybrid_graphics
  4. Got lost, gave up.

BIOS settings:
Please note that while configuring BIOS for integrated graphics only is pretty straightforward, configuring for switchable graphics is not. Despite that if you know the driver installation part well, I'm willing to test all the BIOS settings combinations on my own.

Best Answer

I found a solution for while googling. You have to put a script in rc.local specifying which VGA you want to use.

This link explains everything.

I will post important notes here:

  1. First install needed driver and script from git

    sudo apt-get install git && cd ~/  
    git clone https://github.com/mkottman/acpi_call.git  
    cd acpi_call && make  
    sudo insmod acpi_call.ko  
    chmod a+x test_off.sh
    
  2. de-activate ATI VGA

    sh test_off.sh
    
  3. Now you can check if your ATI VGA is already disabled by lspci -vnnn | grep VGA.
    It will show the following output:

    00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09) (prog-if 00 [VGA controller]) 01:00.0 VGA compatible controller [0300]: ATI Technologies Inc NI Seymour [AMD Radeon HD 3650M] [1002:6760] (rev ff) (prog-if ff)

  4. If it works, to make this run at boot, edit /etc/rc.local:

    sudo insmod /acpi_call/acpi_call.ko
    sudo sh /acpi_call/test_off.sh
    
  5. Also, remove radeon blacklisting by editing /etc/modprobe.d/blacklist.conf:

    #blacklist radeon
    

    You should have xorg.conf like this to make VGA detectable :

     Section "ServerLayout"
     Identifier "aticonfig Layout"
     Screen 0 "aticonfig-Screen[0]-0" 0 0
     EndSection
    
     Section "Module"
     Load "glx"
     EndSection
    
     Section "Monitor"
     Identifier "aticonfig-Monitor[0]-0"
     Option "VendorName" "ATI Proprietary Driver"
     Option "ModelName" "Generic Autodetecting Monitor"
     Option "DPMS" "true"
     EndSection
    
     Section "Device"
     Identifier "aticonfig-Device[0]-0"
     # Driver "fglrx"
     BusID "PCI:1:0:0"
     EndSection
    
     # Section "Screen"
     # Identifier "Default Screen"
     # DefaultDepth 24
     # EndSection
    
     Section "Screen"
     Identifier "aticonfig-Screen[0]-0"
     Device "aticonfig-Device[0]-0"
     Monitor "aticonfig-Monitor[0]-0"
     DefaultDepth 24
     SubSection "Display"
     Viewport 0 0
     Depth 24
     EndSubSection
     EndSection
    

Note: To activate ATI/AMD radeon VGA again: Just comment what we've added to rc.local

Solution 2

I found this solution from askubuntu.com, I might be easier to put into practice:

This question assumes using vga_switcheroo.

Add this to /etc/fstab:

none  /sys/kernel/debug debugfs defaults 0 0