The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Who else is trying to run linux (Ubuntu) on an Optimus notebook?

    Discussion in 'Linux Compatibility and Software' started by ursoouindio, Apr 14, 2011.

  1. ursoouindio

    ursoouindio Notebook Evangelist

    Reputations:
    66
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    Hey folks.
    When I read that nVidia won't support Optimus on Linux I didn't realized it would be so problematic.

    After some trials of Ubuntu stable releases and ending up with only a terminal, I managed to get it into a GUI using the actual 11.04 Beta release.

    But yet the interface looks crooked sometimes and Compiz effects are promptly discarded.

    At first, I though that even that I couldn't take advantage of nVidia graphics I would still be able to use Intel's iGPU, which is enough for most of Linux eye candy and other Compiz features, I believe.

    Is there any way to activate the iGPU? (even if the dGPU still remain sucking power, it already does nothing anyway)
    Or is there any other solution that I ignore?


    Other thing, I'm quite a noob on Linux and this is the first machine with dedicated graphics I got to install it. So, probably anything else than what I already stated would not be that obvious for me :p
     
  2. bigtourist

    bigtourist Notebook Enthusiast

    Reputations:
    0
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    5
    from what i have been reading, the best option is to get a system that allows you to disable the switching between dedicated and integrated graphics in the bios.

    i believe that the thinkpad's have this option, but that the dell's do not.
     
  3. Volker

    Volker Notebook Consultant

    Reputations:
    49
    Messages:
    232
    Likes Received:
    2
    Trophy Points:
    30
    Agree, optimus will never work unless NVidia publishes some documentation for it.

    My Thinkpad W520 allows to switch the graphics card to Intel only / Optimus / NVidia only. Integrated and discrete only work perfectly.
     
  4. Thaenatos

    Thaenatos Zero Cool

    Reputations:
    1,581
    Messages:
    5,346
    Likes Received:
    126
    Trophy Points:
    231
    That is great news. Lenovo does do a great job with GPU bios switching.
     
  5. ursoouindio

    ursoouindio Notebook Evangelist

    Reputations:
    66
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    Happens that I already got mine, and it don't have a Bios switch support.
    Could I be hopeful on a Bios update?

    Using Linux wasn't the only concern when I got this laptop.
    Actually, this one was the only one I could find with a good screen around here, and that was more important for me.
    I also use Windows, but I do need some Linux applications with my studies on the university. I really didn't gave that much attention to it because I just assumed it would not be that hard to get to work.
    I have two graphic options and simply can't use any of them. :(

    I wonder if there isn't a way to enable Intel Graphics in order to have some compiz functionalities running. At this time I don't mind having nVidia still awake.

    Let me know if there is any possibilities to get it to work, or any other ideas going on.
    I'll be looking around too, but I'm not that much familiar with this GPU thing on Linux.

    Thanks!
     
  6. cpm22

    cpm22 Notebook Consultant

    Reputations:
    15
    Messages:
    106
    Likes Received:
    0
    Trophy Points:
    30
    @Volker Did you install Ubuntu on your W520? I have a W520 and want to install it. Which version of Ubuntu should I install? Is it easy? I've never done it before....

    Thanks!
     
  7. lloydhrld

    lloydhrld Newbie

    Reputations:
    0
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    5
    @bigtourist... I am a newbie in addition to being a 2nd gen (baby boomer). My question is do you know of any other laptops that allow this switching... be it automatically and/or manually that will work with linux...Thanks for the help.
     
  8. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Only some thinkpads have the BIOS switch.

    For other machines you'll have to hack around with acpi_call to disable the card so that it doesn't eat battery.
     
  9. lloydhrld

    lloydhrld Newbie

    Reputations:
    0
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    5
    Thanks for the info!
     
  10. ursoouindio

    ursoouindio Notebook Evangelist

    Reputations:
    66
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    I've been reading on this acpi_call thing. Looks some like greek to me, but sometime I'll figure it out and put to use.

    I already have installed nVidia drivers (couldn't do much otherwise) and I am running Ubuntu 11.04 Beta.
    Do I need to get rid of that driver before using acpi_call or can I just leave it as it is and make Ubuntu look for Intel iGPU instead of the useless nVidia dGPU?
     
  11. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Why did you install the nvidia driver? It's pretty much useless on an optimus system. :p

    I'm not sure about acpi_call in terms of the nitty gritty details, I have never owned an optimus system to test it out. There are some threads here on NBR and other places that explain how to get it working. If you run into a problem with it I can try to help but I'm afraid I don't have very specific answers for a general how-to.
     
  12. ursoouindio

    ursoouindio Notebook Evangelist

    Reputations:
    66
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    Actually it was Ubuntu that installed by itself, on this newer release, I never asked for...
    but before, on older stable releases, I couldn't even get to the GUI, it stopped at a terminal-only interface.
    I tried to remove it (maybe by the wrong way) but then I end up without the panels, just with gnome-do or the ctr+alt+F2 terminal to save me.


    But thanks anyway!
    I'll look around for answers...
     
  13. olegsomphane

    olegsomphane Notebook Guru

    Reputations:
    14
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    15
    I remember some sony's and dells may have a bios switch for i/d graphics. If you need linux in school, why not install virtual box on windows and run it that way?
     
  14. Thaenatos

    Thaenatos Zero Cool

    Reputations:
    1,581
    Messages:
    5,346
    Likes Received:
    126
    Trophy Points:
    231
    @ursoouindio

    Unless there is a switch now I doubt they would include it in a later bios update. There is no incentive sadly.

    Its really easy.

    -Either request a cd/dvd or download the iso here.

    -Then follow the directions in step 2 on that page to making a bootable disc (I preferred ISO recorder as it works cleaner).

    -Once the disc is made its a matter of making partitions for linux (if you want to keep windows installed) and then booting to the disc.

    -In order to boot to the disc press the blue thinkvantage button at startup and choose temp device and from the list select the dvd drive.

    -Follow the directions on the screen and ubuntu will install.

    I had two selections in my alienware m11x they were switchable and dedicated. Most OEMs think you got the machine to use the discrete gpu and sadly dont offer the IGP as an option.

    The VM option is always a great way to test out if you would like the OS. I use it as a test bed for windows software and for applications I dont want to run under wine. I also make VMs for distros I want to test and see if I would like to hop to instead of wiping my system and starting from scratch.
     
  15. lllars

    lllars Notebook Enthusiast

    Reputations:
    1
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    5
    i'm also running ubuntu 11.04 on a np5160. i've managed to get the intel card working at least well enough to run compiz and play bluray movies. i'll try to walk you through what worked for me. i tried a lot of things, and not necessarily in this order, but here's what i'd do if i had to do it all over again. no guarantees, but at least i don't think you'll screw anything up worse than it already is.

    1.) turn off the nvidia card. there's no way to use it under linux currently, but it's still powered up, making heat, and sucking battery. this allows you to turn it off, and will get you an extra hour or so of battery:
    Code:
    git clone http://github.com/mkottman/acpi_call.git
    cd acpi_call
    make
    sudo insmod acpi_call.ko
    ./test_off.sh
    2.) automate step 1. the way i did it is to add 'acpi_call' to /etc/modules. you also need to copy the acpi_call.ko file into the directory with the rest of your kernel modules. for me that's '/lib/modules/2.6.38-8-generic-pae/kernel'. finally, go into the menu for system>>preferences>>startup applications, and add the test_off.sh script. that way it will run automatically each time you log in.

    3.) get the intel card running good. steps 1 & 2, i was saving battery power, but still had poor graphics. the following got the intel card working a lot better:
    Code:
    sudo apt-get purge nvidia*
    sudo apt-get install --reinstall xserver-xorg-video-intel  libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
    sudo dpkg-reconfigure xserver-xorg
    sudo update-alternatives --remove gl_conf /usr/lib/nvidia-current/ld.so.conf
    4.) xorg-edgers has the latest graphics drivers. adding the ppa to your sources list will allow you to get frequent updates. this will generally keep your hardware running the best it can, but be prepared to deal with bugs sometimes. [not sure this step is really necessary, since i tried it before step 3, but it seems like a good thing to me anyways]
    Code:
    sudo add-apt-repository ppa:xorg-edgers/ppa
    sudo apt-get update
    sudo apt-get upgrade
     
  16. lllars

    lllars Notebook Enthusiast

    Reputations:
    1
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    5
    btw, my understanding is that the optimus stuff on sandy bridge laptops is different than the optimus you got with the previous generation core processors. i don't think it's possible anymore for manufacturers to put in a bios or hardware switch that allows you to switch to running only the discrete card.

    is your w520 sandy bridge?
     
  17. ursoouindio

    ursoouindio Notebook Evangelist

    Reputations:
    66
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    llars, thanks a bunch!!

    I'll follow your steps soon and then I'll let you know if I could get it right!

    Rep'ed you! :)
     
  18. psymin

    psymin Notebook Enthusiast

    Reputations:
    0
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    5
  19. ursoouindio

    ursoouindio Notebook Evangelist

    Reputations:
    66
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    lllars, I tried following those steps but had problems at #2. Actually I don't know much on compiling kernel modules so I probably did something wrong here.

    At first, I got the acpi_call files, and could run the test_off.sh script in order to turn off the discrete GPU. The GPU led turned green :)



    What I did:
    1) edited the /etc/modules text file, simply added the following line:
    Code:
    acpi_call
    2) copied the file acpi_call.ko: /lib/modules/2.6.38-8-generic/kernel/acpi_call.ko

    3) added the test_off.sh script to the Startup Applications using the Browse button to locate it.


    Now, I rebooted it sometimes and it doesn't seem to work. It doesn't turn the GPU off on startup and if I try to run the script it says that the module is not loaded.
    If I try to load it with sudo insmod acpi_call.ko and then run test_off.sh it fails at all attempts.


    I'm probably doing something wrong here, since at first I could turn off the GPU.

    And other thing, I would need to do this every time I download and install a kernel update?


    Well, I would follow through the other parts now, getting Intel Graphics to work, I think it wouldn't be a problem...


    Thanks again!
     
  20. lllars

    lllars Notebook Enthusiast

    Reputations:
    1
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    5
    your gpu led turned green? crazy, i've never seen mine any color other than orange. you're talking about the led in the vga button right? the only way i really know it's working on my machine is by listening to the fan and watching the temperatures.

    anyway, try using modprobe instead of insmod for your testing. i think insmod requires the full path to the module as an argument.
    Code:
    sudo modprobe acpi_call
    also, double check that you've got the module in the correct directory. you said you put it in /lib/modules/2.6.38-8-generic/kernel/acpi_call.ko. on my machine it's slightly different: /lib/modules/2.6.38-8-generic -pae/kernel/acpi_call.ko. the directory should match the output of
    Code:
    uname -r
    other than that, it sounds like you're doing everything right to me. good luck

    EDIT: yes, i think you'd have to do this everytime you get a kernel update, but it probably won't be too long before someone comes up with a better solution. there's a couple projects listed over at the hybrid linux graphics page to develop support for optimus systems using the nouveau driver.
     
  21. ursoouindio

    ursoouindio Notebook Evangelist

    Reputations:
    66
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    Yeah, when I was talking about green I meant the led besides the VGA button. The VGA button itself is always orange.

    right now I tried this other command (modprobe), but couldn't get the test_off.sh script to work (fails at all attempts). Maybe after a fresh reboot? (I wouldn't now, I'm downloading a ton of tex packages).

    That is strange, I managed to get the green led a couple of times, but mostly the test_off.sh fails. It never worked "automatically" from boot.


    The directory I used did matched the output of 'uname -r'. After little googlin' I find that PAE is a technology of 32 bit linux to be able to use more RAM. I'm using a 64 bit here.
    (but after reading that I'm starting to think on formatting it and getting the 32 bit too!)

    Do you happen to use more than 3,6 GB of Ram in your 32-bit system?
     
  22. ursoouindio

    ursoouindio Notebook Evangelist

    Reputations:
    66
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    Just saw your EDIT now.

    BTW, what is this nouveau driver that I read about everywhere around this?
    Some good souls developing open source driver where the proprietary worth nothing?

    :)
     
  23. redrazor11

    redrazor11 Formerly waterwizard11

    Reputations:
    771
    Messages:
    1,309
    Likes Received:
    0
    Trophy Points:
    55
    Ubuntu works great on my m11x r1. Have to set the bios to :DISCRETE ONLY option.

    If I leave it in :SWITCHABLE, it will only allow command-level interaction. No gui.
     
  24. ursoouindio

    ursoouindio Notebook Evangelist

    Reputations:
    66
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    well, I just boot up the computer again and, for a surprise, green led! (green led = Intel iGPU for non Sager owners)

    Then I decided to reboot it just to make sure everything is fine and now it' still orange :( ( = dGPU)

    Isn't it odd??

    Well, at least I could put the Intel driver to work. I'm not using the experimental drivers (4th step from lllars walkthrough), but maybe I'll give it a soon.
     
  25. ursoouindio

    ursoouindio Notebook Evangelist

    Reputations:
    66
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    Talking about surprises?
    When I booted on Windows 7, where were the dGPU? It couldn't find in any way!

    I had to go back to Linux and make a similar scripts to turn ON the dGPU. Then it worked.

    I'm done with this. I'll let nVidia alive on Linux before it get scrambled so bad that I couldn't get it back on again.

    I'm glad I made the Intel iGPU to work on Linux. Thanks again, lllars.
     
  26. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    @ursoouindio out of curiosity, did you reboot or cold boot into w7?
     
  27. ursoouindio

    ursoouindio Notebook Evangelist

    Reputations:
    66
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    Rebooted several times, both Windows and Linux, trying to 'reset' the hardware. Always a fresh boot.

    I even tried reinstalling nVidia drivers on Windows and the setup app just said it couldn't go on because it doesn't found "needed files".

    It just came back to normal when I managed to run a "turn_ON.sh" script on Linux and then rebooted to Windows.
    I made this other script by editing the original one and following the acpi_call readme file - basically replacing OFFs by ONs on the strings.
     
  28. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    I was just wondering if you powered the system off completely. :)

    That's a weird one.
     
  29. ursoouindio

    ursoouindio Notebook Evangelist

    Reputations:
    66
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    I did!

    I just came from the University (where I was using Linux) and turned on to Windows at home, to refresh on some game before getting back to work again.
     
  30. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    I wonder if taking out the battery and AC (to reset the EC) would have reset the graphics settings too. If you try it let me know. :D
     
  31. ursoouindio

    ursoouindio Notebook Evangelist

    Reputations:
    66
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    heheh
    I followed your thought, I agree that the hardware might reset then.

    But I'm not comfortable testing it. Maybe some other time :p
     
  32. lllars

    lllars Notebook Enthusiast

    Reputations:
    1
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    5
    ha, sounds like you've been having some fun over there ursoouindio. i'm planning to get win7 one of these days. hopefully my nvidia card isn;t bonked by then, but maybe i'll have to make a turn_on script too.

    the nouveau driver is an open source replacement for the nvidia driver. the drivers that nvidia provides are closed source, but have better performance than nouveau. it sounds like nouveau is catching up though.

    i am running the 32 bit version of ubuntu. how did you get 64 bit? is see i386 and amd64 options on the download page. is amd64 not only for amd cpus?
     
  33. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
  34. ursoouindio

    ursoouindio Notebook Evangelist

    Reputations:
    66
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    AMD was the first to release 64-bit PC processors...

    Then they couldn't miss the opportunity to leave their mark ahn?


    Well it seems that its possible to turn the GPU back on easily, but my fear is that (in the middle of all this experimentations) Linux get screwed bad and I couldn't get to run such script at all. So let's leave it like this for a while ;)
     
  35. lllars

    lllars Notebook Enthusiast

    Reputations:
    1
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    5
    well, suddenly i'm having the same problems as you, ursoouindio.

    i rebooted and found the discrete card was stuck on. tried unloading/reloading acpi_call, etc. to no avail. after a bunch of trial and error though, i seem to have found some repeatable behaviors:

    1. rebooting after running test_off.sh results in discrete card stuck on, trying to run test_off.sh fails.

    2. shutdown & manual power on restores functionality.

    3. running test_on script before rebooting avoids problem. results in retained ability to control discrete card after rebooting.

    i skimmed the hybrid graphics mailing list to see if anyone else noticed the same thing. didn't see anything, so i signed up and told them about it. maybe it'll be useful to someone over there.

    also! noticed that someone has actually gotten the nvidia card working with a kernel patch and the nouveau drivers! sounds pretty experimental at the moment, but its a good sign that the card will useable sooner rather than later.
     
  36. ursoouindio

    ursoouindio Notebook Evangelist

    Reputations:
    66
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    Exactly the same, as it looks. It seemed like arbitrary behavior each time I boot up Linux.

    And I also thought that it might be usable if there were a script to "reset" the dGPU when shutting down Linux. But and if Linux crashes, or there's an energy outage? I wouldn't like to manage it myself, I rather leave it for more experienced developers out there.

    When I read that nVidia wouldn't support Optimus on Linux, I didn't thought that they would leave it like this.
    I'm sure that sometime soon a good soul will get us some nice open source driver. It may be sooner than expected if your rumors are true :)

    Although I would rather wait for stable well-tested releases than jumping on new cutting edge developments.

    Btw, are those newer Intel Graphics drivers better? (step 4 of your walkthrough)
    I'm finding the whole system quite unstable. I don't know if it is this driver, or just normal Beta distribution behavior.
     
  37. ursoouindio

    ursoouindio Notebook Evangelist

    Reputations:
    66
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    30
    Hey, lllars and other interested:

    I just found this other walkthrough, on a Ubuntu forum thread.
    [LINUX] HOW-TO use VAAPI HW Acceleration on new Intel Sandy Bridge platform - XBMC Community Forum

    People that are not interested in XBMC could stop after installing MESA and LIBVA. Although I find XBMC pretty cool hehehe

    I just did a fresh install here (32-bit, 64-bit was giving too much headache on some compatibilities) and I'm following this one, before enabling the repositories you suggested.

    BTW, would I still need to run this part of your guide?
    Code:
    sudo apt-get install --reinstall xserver-xorg-video-intel  libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
    sudo dpkg-reconfigure xserver-xorg
    
     
  38. Pavel15

    Pavel15 Notebook Enthusiast

    Reputations:
    2
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    15
    Last edited by a moderator: May 8, 2015
  39. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
  40. CalBear96

    CalBear96 Notebook Geek

    Reputations:
    1
    Messages:
    96
    Likes Received:
    0
    Trophy Points:
    15
    Forgive the n00b question. I went to the site of MrMEEE and his bumblebee project. How do I install that on my computer? I am used to .deb files or tar's with a make or configure file. Is this a wget situation? Or are git's different?
     
  41. cri-cri

    cri-cri Notebook Consultant

    Reputations:
    43
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    30
    First get the source code. You can either use the direct "Downloads" button (on the right side of the page) or wget:
    or git clone... :)
    Unpack the archive, open a terminal in the resulting directory and run:
     
  42. danger89

    danger89 Newbie

    Reputations:
    0
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    5
    It's a lame solution. At least I don't like MrMEEE/bumblebee :(

    It's too hacked, it seems not work very well. My battery life is still very poor under Linux with my nvidia optimus laptop. I really hope the Ubuntu team will look at it seriously - and finally has a out-of-the-box support of nVidia Optimus!!

    Plz nvidia plz.....