Installed 18.10 on Thinkpad X1 Extreme. Needed to change to Discrete Graphics first in BIOS to do that. After installation only Nvidia 1050ti is used. How to enable automatic hybrid switching of GPUs and also manual switching of the two GPUs? Thanks

  • If you installed the correct Nvidia drivers then you also have the Nvidia X Server Settings tool where you can change profiles. – user880592 Oct 22 '18 at 1:39
  • Where can I find the Nvidia X Server Settings tool? – lovedrinking Oct 22 '18 at 1:56
  • Find it like any any software. – user880592 Oct 22 '18 at 1:57
  • Could you please check if I installed the Nvidia driver the right way? I followed "Automatic Install using standard Ubuntu Repository" in: linuxconfig.org/… I issued: "ubuntu-drivers devices" followed by "sudo ubuntu-drivers autoinstall" and then rebooted. I went back to the BIOS to change display setting from Discrete Graphics back to Hybrid Graphics. Nothing seemed to have changed. Am I supposed have "Nvidia X Server Settings tools" installed using the approach I installed the Nvidia driver described here? – lovedrinking Oct 22 '18 at 2:03
  • 2
    I found "NVIDIA X Server Settings" but there is no "PRIME Profiles" listed. Could you please let me know how to get it? Thanks – lovedrinking Oct 22 '18 at 3:23

I saw that there are many posts around asking about how to set up correctly the Thinkpad X1E with Ubuntu. These are my installation instructions (note, I use the Nvidia X Server to switch between intel and nvidia graphics - which still requires a log out and log in).

My Laptop: Thinkpad X1E (Gen 1)
Laptop           = LENOVO ThinkPad X1 Extreme 20MGS0EQ00
BIOS             = N2EET42W (1.24 )
Operating System = Dual Boot - Windows 10 / Ubuntu 18.04.3 LTS

Relevant status on Ubuntu 18.04.3:
  * System running on BIOS > Hybrid Graphics
  * Can switch between intel and nvidia using the Nvidia X Server application (requires log out/log in)
  * External monitor can be connected through the HDMI port (only available when nvidia card is used) [R2]
  * Power-saving mode is automatically switched on when on battery by TLP [R1]

[R1] https://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html
[R2] (pomm0's answer) https://www.dell.com/community/Precision-Mobile-Workstations/External-Monitor-not-working-Ubuntu-nvidia/td-p/6241315

Installation instructions:
 ** 0. First install Windows 10 or stick to pre-installed Windows 10  **
 ** 1. Update the BIOS firmware to the latest version **
    A short google query will let you know that Lenovo had problems with some old BIOS version that would render your 
laptop unsuble if you tried to switch the Graphics Device on the BIOS to "Discrete". The fact that a lot of people
recommended switching to "Discrete" graphics during the Ubuntu installation did not help.
    Anyway, short answer: update the BIOS firmware to the latest version.
 ** 2. Set the Graphics Device on the BIOS to "Hybrid Graphics" **
    BIOS/System Setup > Config > Display > Graphics Device > Hybrid Graphics
 ** 3. Test boot using Ubuntu live stick with "nomodeset" **
    In Grub (the menu that appears when you boot from the stick before starting Ubuntu) click "e" with the option 
"Try Ubuntu without installing", and add "nomodeset" in the GRUB in the line that has "quiet splash ---". Then press
F10 to proceed with the boot (and try Ubuntu without installing). If the Ubuntu desktop loads normally then you are 
good to go.
    Note: with the "nomodeset" option, only the intel graphics can be used.
    Note-2: even once Ubuntu is installed, you can still use the "nomodeset" option to make sure that the nvidia card 
will not be used (once the system is set up correctly there is no need to do this anymore).
 ** 4. Install Ubuntu as usual, with a separate swap partition of size equals to your RAM size (16 GB for me) **
 ** 5. Try booting Ubuntu normally (without adding "nomodeset") **
    If it boots normally, then try to install the nvidia-driver-390.
    Note: I have tested also the latest driver recommended by "ubuntu-drivers devices" (nvidia-driver-440) and it also
          works fine. It seems to consume more power than he 390 driver though, and the output of the command 
          "lshw -numeric -C display" looks different (nvidia card appears as UNCLAIMED when in intel graphics).
    Approximate instructions: 
      sudo apt update
      sudo apt upgrade
      sudo add-apt-repository ppa:graphics-drivers/ppa
      sudo apt update
      ubuntu-drivers devices
      sudo apt install nvidia-driver-390
      sudo apt upgrade
      (unsure about the necessity of this) Blacklist nouveau driver using GRUB config. In /etc/default/grub look for a line GRUB_CMDLINE_LINUX . Add nouveau.blacklist=1 into that parameter. If the line is not present add this line GRUB_CMDLINE_LINUX="nouveau.blacklist=1"
      (unsure about the necessity of this) sudo update-grub
    restart the computer. Hopefully you can get back to the Ubuntu desktop screen without problems.
 ** 6. Test switching from intel to nvidia graphics using the "Nvidia X Server" application **
    Result: can switch between intel and nvidia graphics using the Nvidia X Server application (requires log out/log in)
    Additionally: Check output of the command: "lshw -numeric -C display"
    Remark: for me, the nvidia graphics card appears on the lshw output only when nvidia graphics is selected.
    Remark 2: After restart the last setting, intel or nvidia graphics, stays.
 ** 7. Change configuration as reparted in [R2] to make HDMI port accessible in Ubuntu **
    Result: External monitor can be connected through the HDMI port (only available when nvidia card is selected on the 
            Nvidia X Server)
    [R2] (pomm0's answer) https://www.dell.com/community/Precision-Mobile-Workstations/External-Monitor-not-working-Ubuntu-nvidia/td-p/6241315
    Open the file in your favorite editor (vim, nano, gedit, etc.).
      sudo nano /lib/modprobe.d/nvidia-kms.conf
    And comment out the the nvidia-drm modeset option.
      # This file was generated by nvidia-prime
      # Set value to 0 to disable modesetting
      # options nvidia-drm modeset=1
 ** 8. Best power-saving options using TLP [R1] - should work great on thinkpads **
    [R1] https://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html#check
      sudo add-apt-repository ppa:linrunner/tlp
      sudo apt-get update 
      sudo apt-get install tlp tlp-rdw
      # For ThinkPads an additional
      sudo apt-get install acpi-call-dkms 
      # Installing the tp-smapi-dkms package might be useless depending on your laptop model, see comments from linrunner below. For the Lenovo X1E it is useless, so I scrapped the corresponding line from the instructions.
      (restart and test commands listed on [R1])
    To test power consumption
      sudo apt install powertop
      sudo powertop
      # powertop: when running on battery consumption is displayed on the "Device Stats" tab
      sudo tlp-stat -s  # check that laptop detects being on battery or on AC (conntected to power supply)
      # powertop: check the "Tunables" tab, when on battery or on AC, this are configuration changes to make your laptop
                  consume less power
      # powertop: check power consumption with/without WiFi, min to max brightness and on intel or nvidia graphics.
    Note on power consumption with my laptop:  
      Consumption of computer WITHOUT Nvidia card in idle: min brightness, min reading 7.1W. (lowest ever reading 4-5W)
      Consumption of computer WITH Nvidia card in idle: min brightness, 11-20W. (min reading 11W)
 ** 9. Done! - Enjoy your well configured laptop - Additional tips are wellcome! ** 
  • 1
    Hint: don't recommend to install tp-smapi-dkms on the X1E, it's only unused ballast there. – linrunner Oct 25 '19 at 14:40
  • @linrunner , please, can you elaborate on your comment. Why is the tp-smapi-dkms not recommended on the X1E? Why is it unused/unnecessary on the X1E? – jespestana Oct 28 '19 at 16:26
  • 1
    Because it doesn't support your hardware. In fact ThinkPad Sandy Bridge generation (T420/X220) is the last one to be supported. You could deduce this from the output of tlp-stat -b (TLP > 1.2) or TLP's install docs. – linrunner Oct 29 '19 at 10:07
  • Thanks a lot for the information! I will change my installation instruction set accordingly :-) – jespestana Oct 30 '19 at 9:52
  • 1
    Sorry, but I don't get it. Your instructions are specifically for the X1E, right? Why don't you just scrap the tp-smapi-dkms line then? tp-smapi-dkms is useless there. – linrunner Nov 7 '19 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.