Showing posts with label Intel. Show all posts
Showing posts with label Intel. Show all posts

Sunday, August 26, 2018

HOWTO : Intel and nVidia GPUs on Ubuntu 18.04.1 LTS

The version of nVidia driver for Ubuntu 18.04.1 is 390 at the time of this writing. You have 3 methods to switch between Intel GPU and nVidia GPU. However, these require your box to reboot or relogin to make the change effect.

(A) nVidia Driver Install

sudo apt install bbswitch-dkms nvidia-dkms-390 nvidia-driver-390 nvidia-headless-390 nvidia-kernel-common-390 nvidia-prime nvidia-settings nvidia-utils-390 xserver-xorg-video-nvidia-390 nvidia-cuda-toolkit

Method 1 - Reboot is required
nvidia-settings

Select nVidia GPU or Intel GPU from "Prime" on the menu. After that, reboot your box.

This method is working only when nVidia driver is loaded. You need to reboot your box to make the change effect.

To confirm the change :

prime-select query

Method 2 - Reboot is required

To change to Intel GPU :

You need to reboot your box to make the change effect.

sudo prime-select intel

To change to nVidia GPU :

sudo prime-select nvidia

You need to reboot your box to make the change effect.

To check the settings :

prime-select query

Method 3 - Relogin is required

To install modified version of prime-select :

sudo apt install git rustc cargo lightdm
git clone https://github.com/matthieugras/Prime-Ubuntu-18.04

cd Prime-Ubuntu-18.04
cd prime_socket/src
sudo make install


The "prime-select" binary is located at /usr/local/bin.

Rename the original "prime-select" :

sudo mv /usr/bin/prime-select /usr/bin/prime-select-original

Change to lightdm :

sudo dpkg-reconfigure gdm3

Select lightdm and then reboot the box.

Prime sync for tear free laptop panel

sudo nano /etc/modprobe.d/zz-nvidia-modeset.conf

Add the following lines :

# enable prime-sync
options nvidia-drm modeset=1


Then run the following command and then reboot your box :

sudo update-initramfs -u

To change to Intel GPU :

sudo prime-select intel

The box will force you to logout and awaiting for your re-login.

To change to nVidia GPU :

sudo prime-select nvidia

The box will force you to logout and awaiting for your re-login.

To check the settings :

prime-select query

(B) Optional

To check what nVidia driver version is installed :

ubuntu-drivers devices

To auto install the nVidia driver :

sudo ubuntu-drivers autoinstall

(C) Conclusion

To set to Intel GPU for power saving while nVidia GPU for performance. For Kali Linux or Parrot Security OS users, I recommended to use Method 2 after installed the nVidia driver. The package name of nVidia driver for Kali Linux and Parrot Security OS are different from Ubuntu 18.04.1 LTS. When using Method 3, the Intel display card cannot be video properly. However,, Method 2 has no such problem.

That's all! See you.


Saturday, May 08, 2010

HOWTO : Fix blank screen on Ubuntu 10.04

You may experienced blank screen when bootup a Live CD of Ubuntu 10.04 if you have legacy display card no matter it is an Intel, nVidia, ATi or others. You can fix it by adding a Kernel parameter.

The Kernel parameter for different display cards is :

Intel display card - i915.modeset=1
nVidia display card - nomodeset
Generic - xforcevesa

Boot up - Live CD

Step 1 :
Bootup and press any key at the screen of a little keyboard and a human with a circle at the bottom of the screen.

Step 2 :
Press F6 and then Esc.

Step 3 :
Append one of the above Kernel parameter at the end of the command line.

Step 4 :
Select try out Ubuntu (i.e. the first option of the boot menu).

Boot up - after installation

You may also encounter blank screen after installation with the above method.

Step a :
Bootup with Live CD and follows the Step (1) to (4) as above mentioned.

Step b :
After bootup, mount the hard drive at the "Place".

Step c :
Open a terminal and issue the following command -

sudo nano /etc/default/grub

Step d :
Locate the following line and append the Kernel parameter and make the output looking like as the following if you have an Intel display card -

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.modeset=1"

OR

Step d(1) : (Optional)

sudo nano /boot/grub/grub.cfg

Locate the "linux" tag and add the parameter at the end of "quiet splash". Then jump to Step f.

Step e :
Save and exit. Then issue the following command -

sudo update-grub

Step f :
Then reboot the system without Live CD.

If Step a to f does not work, just do Step a, b, d(1) and then jump to Step f.

That's all! See you.