LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 08-22-2021, 10:46 AM   #1
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 931

Rep: Reputation: 44
Ubuntu 20.04 switch between Intel and Nvidia


Ubuntu 20.04
Laptop with Intel and Nvidia VGA.

Question:
Is there a way to switch between Nvidia and Intel VGA without installing proprietary Nvidia drivers and going to "nvidia-settings"?
As it is described here: https://www.linuxbabe.com/desktop-li...cs-card-ubuntu
Preferably CLI tool.

For the moment my workaround/solution (but this is switch one way ) is:
Code:
sudo apt purge nvidia*
In 2021 there must be more civilized way to do that?

Last edited by czezz; 08-22-2021 at 10:49 AM.
 
Old 08-22-2021, 04:14 PM   #2
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by czezz View Post
In 2021 there must be more civilized way to do that?
For some folks, the civilized way is full on command line and homemade scripts instead of software that does all that and more.
For others, the civilized way is point & click, (just install the software)

Since you have Nvidia Optimus, it's probably best to let Nvidia toggle the devices. Without Nvidia drivers, no switching on the fly.

I have dual graphics Nvidia/Intel, switching between the two is done by pressing a switch while running Windows which requires a reboot. No Nvidia drivers needed, just need to install firmware-linux-nonfree (Debian) for nouveau to do 3D. Some computers require switching graphics devices via Firmware settings.

However, switching on the fly?
It appears you can do that with an Optimus system, since both graphics devices are enabled. A system without Optimus typically only has one of the two enabled, as such there's no switching on the fly.
 
Old 08-23-2021, 03:53 AM   #3
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 931

Original Poster
Rep: Reputation: 44
These are VGAs in my PC.

Code:
$ lspci | grep -E "VGA|3D"
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GF116M [GeForce GT 555M/635M] (rev a1)
1. How can I find out which one is in use?
2. How can I switch from one to another one?
 
Old 08-24-2021, 02:45 AM   #4
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,897
Blog Entries: 1

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by czezz View Post
1. How can I find out which one is in use?
A relatively simple way:
Code:
inxi -G[x,xx,xxx,a]
x,xx,xxx,a are options that increase the amount of resulting graphics information.

A way requiring more technological prowess: examine /var/log/Xorg.0.log, if it exists, or ~/.local/share/xorg/Xorg.0.log, if it doesn't. It can probably be found also in some system info app found in Ubuntu's main menu.
 
Old 08-24-2021, 02:19 PM   #5
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 931

Original Poster
Rep: Reputation: 44
Thank mrmazda.
This however still does not say which VGA is in use.

Code:
$ inxi -G -xxx
Graphics:  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics vendor: ASUSTeK driver: i915 v: kernel 
           bus ID: 00:02.0 chip ID: 8086:0116 
           Device-2: NVIDIA GF116M [GeForce GT 555M/635M] vendor: ASUSTeK driver: nouveau v: kernel bus ID: 01:00.0 
           chip ID: 10de:1247 
           Display: x11 server: X.Org 1.20.11 driver: modesetting unloaded: fbdev,vesa resolution: 1360x768~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 3000 (SNB GT2) v: 3.3 Mesa 21.0.3 compat-v: 3.0 direct render: Yes
 
Old 08-24-2021, 06:40 PM   #6
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,897
Blog Entries: 1

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
If what you mean by "VGA" is which output is connected to your display, yes it does. Read the last line to see only Intel. -a gives more detailed info than -xxx.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compatibility between AMD and Intel PC's when moving boot disk between computers. mahabubemu123 Linux - Hardware 6 05-13-2019 07:54 AM
LXer: Some Common Ubuntu Display Managers and How to Switch Between them LXer Syndicated Linux News 0 08-22-2018 03:40 PM
[SOLVED] using switch in a function to call another function with a switch but it is not going into 2 switch ... BW-userx Programming 2 08-20-2017 11:47 PM
[SOLVED] Forgot to use nvidia-switch --remove before removing Slackbuilds.org nvidia-driver package Strela9K Slackware 6 12-13-2016 04:29 PM
Can I switch between Gnome and Ubuntu Netbook Remix on Ubuntu? markw10 Ubuntu 2 04-04-2009 12:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 07:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration