Hybrid Graphics with AMD and NVIDIA in Ubuntu 13.10 and 12.04.3

In this Ubuntu release cycle I worked, among other things, on improving user experience with hybrid systems and proprietary graphics drivers. The aim was to make it easier to enable the discrete card when in need of better performance i.e. when the integrated card wouldn’t be enough.

In 13.10 I focused mainly on enablement, making sure that by installing one extra package together with the driver, users would end up with a fully working system with no additional configuration required on their end.

As for 12.04.3, I backported my work from 13.10 and I also made sure that Jockey (the restricted drivers manager in Precise) detects systems with hybrid graphics, recommends the correct driver – hiding any drivers which may support the card but not in a hybrid graphics context – and installs the extra package when users decide to enable the discrete card. The installation process is very straightforward, however, if you’re still using the old kernel/X stack, Jockey won’t show any drivers. The backported stack from Raring (which comes by default with 12.04.3) is required.

There are some known issues, which will be fixed in a near future.

If you would like to try this work on your system, you can find the instructions here.

 

40 thoughts on “Hybrid Graphics with AMD and NVIDIA in Ubuntu 13.10 and 12.04.3

  1. Hi Alberto
    How does that compare to, or is different from the bumblebee project
    Have working setup via bumblebee ppa..

  2. Bumblebee uses a different approach. We use NVIDIA’s officially supported solution. Put simply, the desktop is rendered by the NVIDIA GPU on the screen connected to Intel card.

  3. I dont want render the desktop with my nvidia card just wnat use it with blender, what happen in that case?

  4. :(, in that case is better, xubuntu better? what happen if i swich off the nvidia graphics with the button and wait the unity desktop load? and then switch on?

    i really like unity but, sometimes is so heavy, and i need the power for renders.

  5. I don’t see the problem with using NVIDIA for the desktop and for applications but, if you really want to keep things separate, you can try Bumblebee, which probably does what you need (we don’t officially support it though).

  6. mm because it can be more slow when i need a render no? is the problem what i think, but i really apreciate your great work there. 🙂

  7. Will this allow me to use both the discrete GPU and the integrated graphics at the same time, in a dualhead (actually triplehead) setup? Better yet, a multiseat setup, where one user would use the discrete GPU and the other one would use the integrated graphics?

  8. @skarmiglione: it really depends on what you’re looking for. They are both amazing Ubuntu releases.

    @Wilco: no, sorry, that’s not the scope of this work

    @extraymond: I’m not sure. Using my work, the discrete card would do all the rendering. Maybe Bumblebee will help.

  9. i can use unity 2d? beter is because i really like unity but dont need all effects, and i want that it use on effect on 3d renders, i mean if i can save 1 second for 1 frame in a render not loading my desktop on the discreet card then i can won minutes on a large render, then to me this is important, but that bar like machintosh of unity is very good to me, how can conservate that good thing without sacrifice of my needs?.

  10. Thanks for this amazing work!

    I have been following your blog via RSS for many years, as I used Envy on my previous laptop to install nvidia drivers. I switched two years ago to another laptop with AMD/Intel hybrid graphics, and it was both a surprise and a pleasure to read this post.

    I until now relied on various more or less reliable tutorials to make my hybrid graphics work properly, so I was a bit sceptical at first about this improvement in 13.10. But I still made the update today. Black screen on reboot. Uninstallation of fglrx old drivers, reboot. Still black screen. Installation of the packages mentionned in the help page. Reboot. Works perfectly!

    So thanks again. 🙂

    1. Please file a bug report about it and make sure to include your /var/log/Xorg.0.log and the output of dmesg.

  11. I’ve been hopeless with my HP dv6 3160us, with:

    * 0. 01:05.0 ATI Mobility Radeon HD 4200 Series
    1. 02:00.0 AMD Radeon HD 6500M/5600/5700 Series

    I’ve never could make the discrete (5650) card work, only the 4250. I read this article and I gave it a chance… I’M HOPELESS AGAIN. It doesn’t work on my computer.

    I’m on Ubuntu 12.04.3, with Catalyst 12.4. Older drivers made artifacts, newer’s don’t support the 4250 card… and they don’t even suport the 5650!

    Following all your steps, I get a text screen in the boot or a blank screen… and no X. It is the same result I always had when testing EVERY ATI DRIVER VERSION.

    Here, in Argentina, it’s very difficult to buy imported electronics. I spent a lot of money because of the discrete card, to use in Linux… and I could never use it. And I can’t buy another one.

    If you are interested in helping me or… me to help you debugging, just write me a email. Or tell me what should I do.

    1. First of all, the driver has to support the card for this to work. I’m afraid my package won’t help here. Doesn’t the open source driver work with both cards?

  12. Thanks for the fast response!

    I use realtime 3D rendering Blender Game Engine.

    Someday, I could configure Ubuntu to use vgaswitcheroo, and it was the first time the discrete was running on Linux. But the discrete card wasn’t as fast as integrated with proprietary drivers. And the laptop was so hot!

    It takes me some time to install drivers, booting, start tty1 to configure again… look for packages that they were lost installing the others… reboot again… and, now, I have a daughter… so, I have no time to spare!

    If you think you can help me… or I can help you to improve the drivers, just tell me. Maybe I could upgrade another old Ubuntu 12.04 partition using chroot and try there without using this OS.

    Do you have any direct contact with AMD developers? Because they never answer mails. Or they say that HP is guilty of this “hardware configuration”.

  13. with the open drivers you need to: 1) use the switcheroo if you need to disable the discrete card; 2) offload the rendering with xrandr if you want to use the discrete card for rendering; 3) enable power management (available in recent kernels) for the radeon driver so that the system doesn’t get too hot.

    My work, however, focuses on proprietary drivers, at least for now. The steps to get the open drivers to work as desired are a bit tedious as there’s no UI to do this at the moment.

  14. As I told you, I use realtime 3D rendering. So… I REALLY NEED PROPRIETARY DRIVERS. They are the only that take advantage of 3D acceleration. I told you about vgaswitcheroo to demonstrate that open drivers are not for my purpose.

  15. Unfortunately you can’t use fglrx and the open driver at the same time because fglrx can’t coexist (at least the kernel module) with the radeon driver.

    One solution could be to use the modesettings driver to drive the integrated AMD card and fglrx for the discrete AMD card but I’m not really sure if AMD supports this at all (I’m pretty sure it only works with intel and it won’t accept the modesettings driver). Either way, my work does not really support this configuration.

  16. Sorry of my ignorance… what is “modesettings driver”?

    Anyway, if you suggest to use the fglrx for the discrete, I remind you that I could never boot with the discrete using proprietary drivers (I think I tried every single version). In a moment, it boot, but using vgaswitcheroo.

  17. My nVidia 740m isn’t even picked up. It appears as 3D controller but not VGA controller. Hardware Manager in Mint 16 doesn’t bring up any possible drivers.

    1. There can be a number of reasons for that. Please file a bug report against the fglrx driver on Launchpad and make sure to mention that you’re using hybrid graphics.

  18. My NVidia Gefore 740 does not get initialized:
    “(EE) NVIDIA(0): Failed to initialize the NVIDIA GPU at PCI:4:0:0”

    Do you have any idea on what is went wrong? I’m on ubuntu 13.10. I’m afraid if I try to install 12.04.3 it will end up the same.

    Thanks, Alberto

      1. please file a bug report on launchpad against nvidia-graphics-drivers-319 and attach your /var/log/Xorg.0.log and the content of your /var/log/lightdm directory

        1. how do I get the logs that when I can’t boot into my computer at all? I had to boot into the terminal and purge all nvidia-* and then start boot it – but then the logs will be clear again, no?

          1. You can reproduce the problem, get to the black screen, press CTRL+ALT+F2, log in from the command line then type:
            cp /var/log/Xorg.0.log ~/
            sudo tar -czvf lightdm.tar.gz /var/log/lightdm

            Then remove nvidia-prime and nvidia-$flavour (whatever you’re using). Keep nvidia-common. Reboot and report the problem on launchpad attaching lightdm.tar.gz and Xorg.0.log from your home directory.

  19. The package “nvidia-prime” pulls down an *incredible* number of additional packages on my fresh Gnome-desktop Ubuntu 13.10 installation. Things like accounts-friends and accounts-facebook (don’t quote me on package names) and all the “-lens” packages. Added ~450MB to my drive. Is this really necessary for a video driver switcher?

  20. Hi Alberto,
    I tried your solution on Trusty.
    At this stage, I’ve never been able to have my AMD work, unfortunately, does’nt work with pxpress either :

    :~$ lspci | grep “VGA compatible controller”
    00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
    01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Thames [Radeon HD 7500M/7600M Series]

    (I get a crash, have to reboot on terminal & purge)

    1. Please file a bug report against the fglrx package on launchpad. You can do so by opening a terminal and typing “ubuntu-bug fglrx”.

      1. I can’t : when I install fglrx I now get to the desktop, but is it totally freezed, no access to the terminal possible. If I manage to get the terminal just after boot, the only way to have something functional is to purge fglrx. Thus “ubuntu-bug fglrx” returns “no fglrx installed”.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.