解决Intel/AMD双显卡环境下Ubuntu系统过热问题

from:http://yhf8377.blog.163.com/blog/static/176860177201301411136839/


自从我开始接触Ubuntu,这个问题就一直困扰着我(因为很不幸,我的笔记本就是Intel/AMD双显卡配置)。因为之前AMD针对Linux的驱动程序不再继续支持Hybrid架构,Ubuntu下的AMD显卡将一直满负荷工作(哪怕不使用图形用户界面!),导致系统过热并保护性关机。


之前在网上找过许多资料,都没能彻底解决。现在终于有人解决这个问题了!详见: http://ubuntuforums.org/showthread.php?t=1930450

以下是转贴内容。

If you do want to make the switch possible between your Intel and your AMD graphics cards, then this post is for you. If you do not own a AMD hybrid graphic card, please leave this thread, and post your problems in a thread made for AMD single graphic or Intel single graphic.

Edit: The solution seems not to work with ATI 5xxx graphic cards, try at your own risk.
Warning: Works only for muxless systems.
Warning 2: Check if your BIOS is updated, if not update it ! (You will need Windows). This is your computer manufacturer that "implements the switch on your mother card, and modify the video drivers for Windows to work on your computer". If an AMD 6630m (for example) works on a HP computer, this doesn't mean the same video card will work for sure (for example) on a ASUS computer.

Edit bodhi.zazen: Best check hardware compatibility before following this tutorial. If your hardware is not listed as supported, this tutorial will not help you. See  http://wiki.cchtml.com/index.php/Hardware 

The following solution has been tested on a DELL Vostro 3550, with an AMD 6630m card and an Intel HD 3000 (Sandybridge) card (integrated into a Intel core i5). The version of Ubuntu used is 12.04 LTS (further versions should works too). The system is very stable, and everything works well.
This tutorial requires the use of the terminal, but still is simple if you're a beginner, you will just have to past some commands on it and press "Enter".
(Tip for beginners : to past a command on a terminal, just press CTRL+SHIFT+V, it is the same shorcut as usual just don't forget to press SHIFT when pasting).

Before beginning this tutorial, we will suppose you are following it on a fresh install (i.e. You did not install vgaswitchroo or flgrx (via jockey-gtk : The proprietary driver installer application from Ubuntu). Please also install all updates available for your computer before starting (and reboot if you're proposed to).

STEP 1 - Installing latest AMD catalyst drivers :

As I'm writing this the latest version is 12.4, please check this page to know if there is a new version :  http://wiki.cchtml.com/index.php/Ubu...allation_Guide (this also includes the guide to install them).

First we're going to download all the prerequisite packages :
Code:
sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 sudo apt-get install dkms libqtgui4 wget execstack libelfg0 dh-modaliases sudo apt-get install linux-headers-generic xserver-xorg-core libgcc1
If you're using Ubuntu 64bits please run those two commands (32bits users don't have to) :
Code:
sudo apt-get install ia32-libs lib32gcc1 libc6-i386 cd /usr ; sudo ln -svT lib /usr/lib64
We can now download the AMD catalyst 12.4 driver :
Code:
cd ~/; mkdir catalyst12.4; cd catalyst12.4/ wget http://www2.ati.com/drivers/linux/amd-driver-installer-12-4-x86.x86_64.run chmod +x amd-driver-installer-12-4-x86.x86_64.run
And create Ubuntu packages of it :
Code:
sudo sh ./amd-driver-installer-12-4-x86.x86_64.run --buildpkg Ubuntu/precise
Now let's install them :
Code:
sudo dpkg -i fglrx*.deb
and configure the Xserver (xorg.conf file) for the first time :
Code:
sudo aticonfig --initial -f
Now reboot your computer.

Test the switch to the discrete card :
Code:
sudo aticonfig --px-dgpu
Then reboot again your computer.

STEP 2 - Enabling, fixing the bug for direct rendering on the integrated card :
Thanks to  Niccola for finding the actual fix.

If you ever apply an fglrx update, or your system automatically update fglrx, YOU WILL HAVE to repeat STEP 2, otherwise direct rendering will be missing on integrated gpu (i.e. No Unity 3D or Gnome Shell or Gnome Classic + Compiz on the Intel graphic). If you have an other solution (like loading a script on startup) please post it.

Open the /etc/X11/Xsession.d/10fglrx file with root rights :
Code:
gksu gedit /etc/X11/Xsession.d/10fglrx
If you're using a 32bits system add at the end of 4th line this text : "/usr/lib32/dri/" without the quotes. The file should now look like this :
Code:
 LIBGL_DRIVERS_PATH=/usr/lib/fglrx/dri  if [ `uname -m` = 'x86_64' ]; then  if [ -d /usr/lib32/fglrx/dri ]; then  LIBGL_DRIVERS_PATH=${LIBGL_DRIVERS_PATH}:/usr/lib32/fglrx/dri:/usr/lib32/dri if [ ! -z $LD_LIBRARY_PATH ]; then  LD_LIBRARY_PATH=$LD_LIBRARY_PATH:  fi  LD_LIBRARY_PATH=${LD_LIBRARY_PATH}/usr/lib32  export LD_LIBRARY_PATH  fi  fi  export LIBGL_DRIVERS_PATH
If you're using a 64bits system add at the end of 4th line this text : "/usr/lib/x86_64-linux-gnu/dri/" without the quotes. The file should now look like this :
Code:
 LIBGL_DRIVERS_PATH=/usr/lib/fglrx/dri  if [ `uname -m` = 'x86_64' ]; then  if [ -d /usr/lib32/fglrx/dri ]; then  LIBGL_DRIVERS_PATH=${LIBGL_DRIVERS_PATH}:/usr/lib32/fglrx/dri:/usr/lib/x86_64-linux-gnu/dri if [ ! -z $LD_LIBRARY_PATH ]; then  LD_LIBRARY_PATH=$LD_LIBRARY_PATH:  fi  LD_LIBRARY_PATH=${LD_LIBRARY_PATH}/usr/lib32 export LD_LIBRARY_PATH  fi  fi  export LIBGL_DRIVERS_PATH
Now save the file.

STEP 3 - Enjoy your hybrid graphic system ! :

Reboot your computer to see the changes, it should boot up with the discrete card.

Useful informations, commands :

Power consumption is a lot better now, it seems that my battery last 4 times more with the integrated card, but this isn't still good as in Windows. If someone find or know tricks to decrease power consumption a little more please post it !

I do not recommend to update the catalyst driver once it's installed (if it works), if you really want to upgrade then check this page to find instructions : http://wiki.cchtml.com/index.php/Ubuntu

The AMD driver GUI application doesn't provide settings for screen configuration, but only 3d settings. This is a missing feature.

Switching commands :
Code:
aticonfig --pxl # List current activated GPU sudo aticonfig --px-dgpu # Activate discrete GPU (High-Performance mode), must re-start X to take effect sudo aticonfig --px-igpu # Activate integrated GPU (Power-Saving mode), must re-start X to take effect
Verify the Open GL's libraries used :
Code:
fglrxinfo
Verify if the direct rendering is used :
Code:
glxinfo | egrep render
Install mesa-utils, and test the card 3d power (compare the fps) :
Code:
sudo apt-get install mesa-utils glxgears
If something goes wrong and your computer doesn't boot (i.e. black screen), press CTRL+ALT+F3, log yourself into your account and enter those commands :
Code:
sudo rm /etc/X11/xorg.conf sudo startx
And you should be able to see your desktop.

List of fully supported computers : // Updated 05/16/2012 (American date format).
  • ACER 7750g, Intel HD 3000, AMD 6650m, HDMI Intel/AMD: not tested/not tested, VGA Intel/AMD: not tested/not tested

  • DELL Inspiron 14R (N4110), Intel HD 3000, AMD 6470m, HDMI Intel/AMD: not tested/not tested, VGA Intel/AMD: not tested/not tested
  • DELL Vostro 3550, Intel HD 3000, AMD 6630m, HDMI Intel/AMD: not tested/not tested, VGA Intel/AMD: working/working

  • HP Envy 14t-2000 CTO, Intel HD 3000, AMD 6630m, HDMI Intel/AMD: not tested/not tested, Mini DisplayPort Intel/AMD: not tested/not tested
  • HP ENVY 15-3090CA, Intel HD 3000, AMD 6630m, HDMI Intel/AMD: not tested/not tested, Mini DisplayPort Intel/AMD: not tested/not tested
  • HP Pavilion dm4-2160sf, Intel HD 3000, AMD 6470m, HDMI Intel/AMD: not tested/not tested, VGA Intel/AMD: not tested/not tested
  • HP Pavillion dm4-2110sp, Intel HD 3000, AMD 6470m, HDMI Intel/AMD: not tested/not tested, VGA Intel/AMD: not tested/not tested
  • HP Pavilion dv6-6102sg, Intel HD 3000, AMD 6770m, HDMI Intel/AMD: not tested/not tested, VGA Intel/AMD: not tested/not tested
  • HP Pavilion dv6-6169sl, Intel HD 3000, AMD 6770m, HDMI Intel/AMD: not tested/not tested, VGA Intel/AMD: not tested/not tested
  • HP Pavilion dv6-6178sl, Intel HD 3000, AMD 6770m, HDMI Intel/AMD: working/working, VGA Intel/AMD: working/working
  • HP Pavilion dv6-6192sf, Intel HD 3000, AMD 6770m, HDMI Intel/AMD: not tested/not tested, VGA Intel/AMD: not tested/not tested
  • HP Pavilion dv7-6070ef, Intel HD 3000, AMD 6490m, HDMI Intel/AMD: not tested/working, VGA Intel/AMD: not tested/not tested
  • HP Pavilion g4-1001tx, Intel HD 3000, AMD 6490m, HDMI Intel/AMD: not tested/not tested, VGA Intel/AMD: not tested/not tested
  • HP Probook 4530s, Intel HD 3000, AMD 6490m, HDMI Intel/AMD: not tested/not tested, VGA Intel/AMD: not tested/not tested

  • Lenovo e520,Intel HD 3000, AMD 6630m, HDMI Intel/AMD: not tested/not tested, VGA Intel/AMD: not tested/not tested
  • Lenovo G-770,Intel HD 3000, AMD 6650m, HDMI Intel/AMD: not tested/not tested, VGA Intel/AMD: not tested/not tested

  • SONY Vaio VPC-SB1S1E, Intel HD 3000, AMD 6470m, HDMI Intel/AMD: not tested/not tested, VGA Intel/AMD: working/working
  • SONY Vaio VPC-SC1AFM/S, Intel HD 3000, AMD 6470m, HDMI Intel/AMD: not tested/not tested, VGA Intel/AMD: not tested/not tested

If you want to add your computer, please do want it (this will help other users), make a post and indicate your configuration like those above. 
I will then add it to the working list.
I repeat as many people do not get it : "like those above" ! It take you two minutes to write it, this saves me time, and I can update more frequently this thread. Also posts like "It works on HP Pavilion dm4" are USELESS, I won't add a computer with an incomplete computer model number. Exception for computers without a precise model name (example : DELL Vostro 3550, Lenovo e520).



Useful links :
http://forums.gentoo.org/viewtopic-p-6936730.html You can thanks that guy because his post really helped me to understand how the ati hybrid graphics works.
http://en.gentoo-wiki.com/wiki/Fglrx-hybrid-graphics You can also check this Gentoo wiki about hybrid graphics, this is some Gentoo's users that actually found first a solution on how to make AMD hybrid cards to work on Linux.

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值