Switchable Graphics Ubuntu 10.10

Discussion in 'macOS' started by ccordenier, Jan 26, 2011.

  1. ccordenier

    ccordenier MDL Novice

    Jan 26, 2011
    4
    0
    0
    Hi,

    I have an HP Pavilion dv6 with switchable graphics: an integrated Intel GPU and a discrete ATI GPU (Radeon Mobility HD 4650). Any attempt to use the ATI driver (either proprietary or open-source) fails because on reboot it tries to use the Intel graphics and so X fails to start up.

    Normally there should be an option to disable the Switchable setting in the BIOS but HP have not allowed that set up (and I have contacted them to ask for them to fix that, but to no avail...)

    Basically I'm stuck.

    Thanks for your help!
     
  2. XSpiritusX

    XSpiritusX MDL Novice

    Jan 24, 2011
    8
    1
    0
    #2 XSpiritusX, Jan 27, 2011
    Last edited by a moderator: Apr 20, 2017
    Workin on it!

    Just postin an update to let you know that I have not forgotten you. I've been researching the heck out of this thing to see if I can find a satisfying solution to the whole switchable-graphics problem. I've moved on to implementing an initial plan to see if I have finally figured out a good way to do this. Being an obsessive and nerdy person, I can't accept not being able to get full function from computer in Ubuntu, and this includes fully-functional hybrid graphics!

    You can get Ubuntu up and running for now with the following simple procedure, though.

    1. Boot Ubuntu 10.10 off of a live cd or usb.

    2. Choose "try Ubuntu" (or something to that effect) INSTEAD OF "install ubuntu"

    3. To reduce power consumption, heat output, and confusion for Ubuntu, run the following command to turn off the discrete (ATI) graphics card (Ubuntu has it on when it's not even using it!):
    Code:
    sudo echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
    4. After this, run the installer off of your desktop and reboot your computer (you know the drill lol)

    5. Run this command again for the same reason as last time:
    Code:
    sudo echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
    Do NOT install the ATI driver; use the stock kernel graphics-detecting and engaging software.

    6. Using the following command, create a boot file for running a command that will turn off the ATI gpu during startup.
    Code:
    sudo gedit /etc/init.d/intel_startup
    *Note: I named my file "intel_startup," but you can name it whatever you want, really. Replace "intel_startup" in the following steps with whatever name you chose for your file.​

    7. Now we need to make the file into an executable.
    Code:
    sudo chmod +x /etc/init.d/intel_startup
    8. Integrate it into the startup process (not really sure how this particular step works, but it's what we're supposed to do lol)
    [CODEsudo update-rc.d intel_startup defaults][/CODE]

    Next, we move on to reactivating the ATI gpu during shutdown (this solves some sort of fan-speed problem or something during startup).

    9. Start by creating startup and restart config files (rc6.d is for shutdown, and rc0.d is for restart) like we did for startup.
    Code:
    gksudo gedit /etc/rc0.d/K99_shutdown_gpu
    gksudo gedit /etc/rc6.d/K99_shutdown_gpu
    Note: like before, you can name the file whatever you want as long as it starts with "K99," so in the following steps replace "K99_shutdown_gpu" with whatever you named your file. I named mine "shutdown_gpu" for the simple reason that it is an operation during shutdown relating to the gpus.​

    10. Paste the following command into both of those files
    Code:
    echo ON > /sys/kernel/debug/vgaswitcheroo/switch
    11. Last of all, make those files into executables!
    Code:
    sudo chmod +x /etc/rc0.d/K99_shutdown_gpu
    sudo chmod +x /etc/rc6.d/K99_shutdown_gpu
    That should get your system up and running for now. I'm working on tackling the much more complex challenge of getting a workable user-friendly switchable graphics solution for our systems.

    Will keep you posted.

    Regards,
    XSpiritusX
     
  3. XSpiritusX

    XSpiritusX MDL Novice

    Jan 24, 2011
    8
    1
    0
    Wireless card?

    By the way, if you have an Intel Wireless-N card that doesn't use a proprietary driver and isn't the Intel 5300 iwlagn, you probably have to unlock wireless-N by deleting file /etc/modprobe.d/intel-5300-iwlagn-disable11n.conf

    If you DO have the Intel 5300, then it's probably a good idea to leave that file in there lol.
     
  4. ccordenier

    ccordenier MDL Novice

    Jan 26, 2011
    4
    0
    0
    Thank you very much for that, but I'd already read about that solution online and have implemented it. It hasn't solved the problems I have with the ATI driver, which, when activated, does not allow X to start up at boot because the integrated graphics card is the one used at boot.

    To date, I have not been able to find any solutions to this problem that seem to work for me apart from finding a way to permanently turn off the Intel card (I am aware that this would lead to increased power consumption but this does not matter to me) that does not involve finding a way to turn it off at BIOS level.

    Basically, all the solution I have found suggest turning off the ATI card but I want to turn off the other one.

    Any way you can help?

    Cheers
     
  5. XSpiritusX

    XSpiritusX MDL Novice

    Jan 24, 2011
    8
    1
    0
    Dude, I know exactly what you mean! It seems like everyone else gets their problems in this matter solved just fine, but none of the solutions seem to work for us! It's kinda refreshing in a way to see that someone else shares my frustration. I will let you know if I figure out a workable solution. The temp solution I posted was just to get Ubuntu running. I thought you probly already heard about it (which, btw, didn't even work for me :p), but posted it just in case you hadn't. My theory was to disable the the ATI graphics driver upon shutdown and re-enable with macros written to switch to the ATI graphics card, but installing the proprietary driver tosses out vga switcheroo! How ratty!
     
  6. digitalli

    digitalli MDL Novice

    Feb 22, 2011
    8
    0
    0
    I have the same problem. My laptop is a DV6-3070ca and it has switchable graphics with a integrated Intel 4500MHD and a descrete ATI Mobility 5650. I don't care for the power saving as my laptop is always plugged in, I simply want to disable the Intel graphics altogether and only use the ATI card.

    With VGA_Switcheroo I am able to switch to the ATI card, however it always defaults to the Intel card, and when I try to install any ATI driver it results in a blank screen upon boot.
     
  7. XSpiritusX

    XSpiritusX MDL Novice

    Jan 24, 2011
    8
    1
    0
    Aha!

    Since our computers boot both graphics cards on boot-up, try this method!

    Go to ehow.com and search "How to Disable a Linux PCI Device." (I'd post the link, but I need 20 posts before this forum will let me post a link.) Click on the link to the article and follow the directions there to disable the Intel graphics device via the blacklist.

    This SHOULD result in the computer booting up only recognizing the discrete graphics card and therefor running normally as if it was the only graphics device available. Let me know how it works out or if you would rather wait until I try it myself. I'm trying to finish up some school stuff before I start messing around with Ubuntu again, but if you so desire, I can make an exception to try this out for you guys.
     
  8. digitalli

    digitalli MDL Novice

    Feb 22, 2011
    8
    0
    0
    Good idea but I just tried it and it didn't work. Maybe I entered the name of the card incorrectly or something though. I'll post back if I get it working.
     
  9. XSpiritusX

    XSpiritusX MDL Novice

    Jan 24, 2011
    8
    1
    0
    #9 XSpiritusX, Feb 28, 2011
    Last edited by a moderator: Apr 20, 2017
    Aha!

    Ok, I got it to work for me! I'll look for a way to get the proprietary driver to work also, but you can use the drivers from this page for now:
    launchpad.net/~xorg-edgers/+archive/radeon/

    Slap this into /etc/rc.local (you will need to edit it as root)

    Code:
    chown root:admin /sys/kernel/debug/vgaswitcheroo/switch
    echo DIS > /sys/kernel/debug/vgaswitcheroo/switch
    echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
    
    That should do the trick! It would tell the system to use your discrete graphics card and proceed to power down your integrated graphics card.

    If you are having fan troubles with startup, do this:

    Create a .sh file in /etc/init.d/ (I named mine A99graphics, so that's what I"ll be using in the example; use whatever name you want as long as it starts with A99 to ensure that it takes place at the right time)
    You can do this like so:
    Code:
    gksudo gedit /etc/init.d/A99graphics.sh
    
    Hey! How convenient! This command has the document all ready to edit, too! Slap the following code in there to turn both graphics card on when the system shuts down:
    Code:
    echo ON > /sys/kernel/vgaswitcheroo/switch
    
    Save the file. Now make it executable like so:
    Code:
    sudo chmod +x /etc/init.d/A99graphics.sh
    
    Link the file into rc0.d and rc6.d to add it to the restart and shutdown processes respectively. I don't know why this is supposed to work, but apparently it does.
     
  10. digitalli

    digitalli MDL Novice

    Feb 22, 2011
    8
    0
    0
    #10 digitalli, Feb 28, 2011
    Last edited: Feb 28, 2011
    Very nice, glad to hear you got it working.

    EDIT: Well I noticed the typo on DDIS. This only works by logging out and then logging back in. Restarting reverts to the integrated graphics, I then have to log out and then back in to switch to the discrete.
     
  11. genius17

    genius17 MDL Novice

    Apr 14, 2011
    5
    0
    0
    How about suspen and hibernate? Does it work ok?
     
  12. XSpiritusX

    XSpiritusX MDL Novice

    Jan 24, 2011
    8
    1
    0
    Concerning resume from suspend/hibernate..

    Resume from suspend does work now in the 11.04 beta 2. I don't know about hibernate, because I do not use hibernate. When resuming from suspend in Ubuntu 10.10, I believe I remember simply having a blank screen that could be fixed by pressing a screen-brightness hotkey. It is the same for 11.04 beta 2.

    It turns out that the scripts I previously posted for shutdown and restart are not at all necessary (for me, at least). I have had no problems with the fan running at full speed constantly after restarting my computer without turning the discrete graphics card back on before shutdown.

    I know that I have not visited this issue in a while, but I finally am at the point where I am ready to address the dual-graphics beast once more. It actually drove me to purchase the awesome and massive "Ubuntu Unleashed 2011 Edition." I looked through it, and it is a wonderful teaching resource to system administration in Ubuntu, but due to schoolwork (I am an electrical engineering student), I unfortunately haven't had a chance to REALLY dive into it yet. I have not dropped the dual-graphics issue and will not do so until I reach a completely satisfying solution, and "satisfying" for yours-truly is pretty much a synonym for "ideal."

    I will update this thread with any progress I make and will also make it a point to check in on it frequently to address questions and concerns.
     
  13. lawrencesilva

    lawrencesilva MDL Novice

    Jun 26, 2011
    1
    0
    0
    I just bought a new hp laptop with second gen i7 and radeon 6770m gpu.and is currently trying to install natty 11.04 ubuntu on it.
    i cant seem to make 11.04 to choose the discrete gpu instead of the igp, and i found this thread. just want to know how your experiments on switching gfx are, up to this point
    thanks!
     
  14. azertyfred

    azertyfred MDL Novice

    Feb 11, 2012
    1
    0
    0
    Hi there, I also have a HP DV6 3160 with switchable graphics and I wonder if there's a fix that makes it possible to access the ATI Mobility Radeon HD 5650 card (discrete) instead of the Intel (integrated).
    thx