[Solved] Can't get two displays working

Screen resolution, 3D Acceleration, nVidia, ATI
Forum rules
Before you post please read this
Post Reply
adityajh49
Level 1
Level 1
Posts: 7
Joined: Sun Aug 30, 2020 12:55 pm

[Solved] Can't get two displays working

Post by adityajh49 »

Hi All,
I have installed linux for the first time on my laptop. My specs are:
HP Omen 15
Ryzen 7 4800H
Nvidia GTX 1650ti
Linux mint 20 cinnamon
My problem is when I first installed it, my laptop display was working but my external monitor was not. I found out that automatic driver "nvidia 440" was not correct one and somehow I managed to install correct Nvidia 450 and got my external monitor working through HDMI port which connects to Nvidia card. Now the problem is after this, main display always shows omen icon and is not used. The main display is not getting detected and I tried finding reasons or updating AMD drivers but nothing seem to be working. Can't get it working even after disconnecting the external display.

Please help.

Thanks
Aditya
Last edited by adityajh49 on Mon Sep 07, 2020 9:49 am, edited 3 times in total.
adityajh49
Level 1
Level 1
Posts: 7
Joined: Sun Aug 30, 2020 12:55 pm

Re: Can't get two displays working

Post by adityajh49 »

Somehow

Code: Select all

sudo prime-select nvidia
sudo prime-select amd
this command switches from external to laptop display. But not both at same time
User avatar
SMG
Level 11
Level 11
Posts: 3787
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Can't get two displays working

Post by SMG »

Welcome to the forum, adityajh49.

Can you please give us information about your install by entering this command in a terminal:

Code: Select all

inxi -Fxxxrz
Enclose the results between [ⅽode] and [/ⅽode] code markers by selecting </> from the mini toolbar above the textbox where you type your reply.
LM20.1 Cinnamon
adityajh49
Level 1
Level 1
Posts: 7
Joined: Sun Aug 30, 2020 12:55 pm

Re: Can't get two displays working

Post by adityajh49 »

Please see below:

Code: Select all

inxi -Fxxxrz
System:
  Kernel: 5.4.0-42-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 
  Desktop: Cinnamon 4.6.7 wm: muffin 4.6.3 dm: LightDM 1.30.0 
  Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal 
Machine:
  Type: Laptop System: HP product: OMEN Laptop 15-en0xxx v: N/A 
  serial: <filter> Chassis: type: 10 serial: <filter> 
  Mobo: HP model: 8788 v: 22.52 serial: <filter> UEFI: AMI v: F.05 
  date: 06/22/2020 
Battery:
  ID-1: BAT0 charge: 17.0 Wh condition: 51.4/51.4 Wh (100%) volts: 11.1/11.6 
  model: Hewlett-Packard Primary type: Li-ion serial: <filter> 
  status: Discharging cycles: 462 
  Device-1: hidpp_battery_0 model: Logitech Wireless Keyboard 
  serial: <filter> charge: 55% (should be ignored) rechargeable: yes 
  status: Discharging 
  Device-2: hidpp_battery_1 model: Logitech Wireless Mouse B330/M330/M331 
  serial: <filter> charge: 55% (should be ignored) rechargeable: yes 
  status: Discharging 
CPU:
  Topology: 8-Core model: AMD Ryzen 7 4800H with Radeon Graphics bits: 64 
  type: MT MCP arch: Zen rev: 1 L2 cache: 4096 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
  bogomips: 92626 
  Speed: 1397 MHz min/max: 1400/2900 MHz boost: enabled Core speeds (MHz): 
  1: 1394 2: 1396 3: 1397 4: 1397 5: 1394 6: 1394 7: 1397 8: 1396 9: 1397 
  10: 1395 11: 1398 12: 1396 13: 1395 14: 1397 15: 1394 16: 1397 
Graphics:
  Device-1: NVIDIA vendor: Hewlett-Packard driver: nvidia v: 450.66 
  bus ID: 01:00.0 chip ID: 10de:1f95 
  Device-2: AMD Renoir vendor: Hewlett-Packard driver: N/A bus ID: 07:00.0 
  chip ID: 1002:1636 
  Display: x11 server: X.Org 1.20.8 driver: nvidia 
  resolution: 1920x1080~60Hz 
  OpenGL: renderer: GeForce GTX 1650 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 450.66 
  direct render: Yes 
Audio:
  Device-1: NVIDIA vendor: Hewlett-Packard driver: snd_hda_intel v: kernel 
  bus ID: 01:00.1 chip ID: 10de:10fa 
  Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor 
  vendor: Hewlett-Packard driver: snd_rn_pci_acp3x v: kernel bus ID: 07:00.5 
  chip ID: 1022:15e2 
  Device-3: AMD Family 17h HD Audio vendor: Hewlett-Packard 
  driver: snd_hda_intel v: kernel bus ID: 07:00.6 chip ID: 1022:15e3 
  Sound Server: ALSA v: k5.4.0-42-generic 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Hewlett-Packard driver: r8169 v: kernel port: e000 bus ID: 02:00.0 
  chip ID: 10ec:8168 
  IF: eno1 state: up speed: 100 Mbps duplex: full mac: <filter> 
  Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel port: e000 
  bus ID: 03:00.0 chip ID: 8086:2723 
  IF: wlo1 state: down mac: <filter> 
Drives:
  Local Storage: total: 476.94 GiB used: 14.99 GiB (3.1%) 
  ID-1: /dev/nvme0n1 vendor: Crucial model: CT1000P1SSD8 size: 931.51 GiB 
  speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: P3CR021 scheme: GPT 
  ID-2: /dev/nvme1n1 vendor: Western Digital 
  model: PC SN730 SDBPNTY-512G-1006 size: 476.94 GiB speed: 31.6 Gb/s 
  lanes: 4 serial: <filter> rev: HPS2 scheme: GPT 
Partition:
  ID-1: / size: 38.25 GiB used: 9.85 GiB (25.7%) fs: ext4 
  dev: /dev/nvme0n1p3 
  ID-2: /home size: 72.48 GiB used: 2.53 GiB (3.5%) fs: ext4 
  dev: /dev/nvme0n1p5 
  ID-3: swap-1 size: 11.18 GiB used: 0 KiB (0.0%) fs: swap 
  dev: /dev/nvme0n1p4 
Sensors:
  System Temperatures: cpu: 37.0 C mobo: N/A gpu: nvidia temp: 38 C 
  Fan Speeds (RPM): N/A 
Repos:
  No active apt repos in: /etc/apt/sources.list 
  Active apt repos in: /etc/apt/sources.list.d/additional-repositories.list 
  1: deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
  Active apt repos in: /etc/apt/sources.list.d/graphics-drivers-ppa-focal.list 
  1: deb http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
  1: deb http://packages.linuxmint.com ulyana main upstream import backport
  2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
  3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
  4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
  5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6: deb http://archive.canonical.com/ubuntu/ focal partner
  Active apt repos in: /etc/apt/sources.list.d/oibaf-graphics-drivers-focal.list 
  1: deb http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/surfshark.list 
  1: deb https://ocean.surfshark.com/debian stretch main
  Active apt repos in: /etc/apt/sources.list.d/webupd8team-y-ppa-manager-focal.list 
  1: deb http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu focal main
Info:
  Processes: 320 Uptime: 6m Memory: 22.92 GiB used: 858.9 MiB (3.7%) 
  Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Shell: bash 
  v: 5.0.17 running in: gnome-terminal inxi: 3.0.38
Last edited by Moem on Mon Aug 31, 2020 5:37 am, edited 1 time in total.
Reason: The output needs to be enclosed between the tags for them to work.
User avatar
SMG
Level 11
Level 11
Posts: 3787
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Can't get two displays working

Post by SMG »

The Nvidia drivers (red) appear to have have loaded, but the AMD driver (blue) has not.
Graphics:
Device-1: NVIDIA vendor: Hewlett-Packard driver: nvidia v: 450.66
bus ID: 01:00.0 chip ID: 10de:1f95
Device-2: AMD Renoir vendor: Hewlett-Packard driver: N/A bus ID: 07:00.0
chip ID: 1002:1636
Display: x11 server: X.Org 1.20.8 driver: nvidia
resolution: 1920x1080~60Hz
OpenGL: renderer: GeForce GTX 1650 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 450.66
direct render: Yes
The original poster in thread,
Linux Mint 20 on Lenovo ThinkPad T14s with AMD Ryzen 7 Pro 4750U - "no graphic acceleration" message
found success in getting the Renoir driver installed by using a newer kernel.

However, I'm not sure if that will get everything working properly given you have a combination of Ryzen, Nvidia, and AMD. The ability to get both the Nvidia and AMD working as you would like them to work may require some additional effort. That combo is beyond my current level of knowledge to help, but others with similar hardware have also had issues arise. Maybe this thread [SOLVED] Nvidia drivers not loading (Mint 20 - Ryzen 7 4800 - GTX 1660 Ti) or this thread NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon can help if you still have problems even after the driver is installed.

Post and let us know how it goes. Others with more experience on this type of issue may be able to offer more help if you still need it.
LM20.1 Cinnamon
adityajh49
Level 1
Level 1
Posts: 7
Joined: Sun Aug 30, 2020 12:55 pm

Re: Can't get two displays working

Post by adityajh49 »

Hi,
thanks for your reply. I tried that but it is not working. I also searched and searched the solution.

Will really appreciate if someone knows how to solve this issue.
User avatar
SMG
Level 11
Level 11
Posts: 3787
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Can't get two displays working

Post by SMG »

adityajh49 wrote:
Fri Sep 04, 2020 2:02 am
Hi,
thanks for your reply. I tried that but it is not working. I also searched and searched the solution.

Will really appreciate if someone knows how to solve this issue.
Which kernel version did you try? I know people have had success getting the Renoir device driver installed with versions of the 5.7 kernel.
LM20.1 Cinnamon
adityajh49
Level 1
Level 1
Posts: 7
Joined: Sun Aug 30, 2020 12:55 pm

Re: Can't get two displays working

Post by adityajh49 »

Hi,

Code: Select all

~$ hostnamectl
   Static hostname: aditya-OMEN-Laptop-15-en0xxx
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: b76cc7b1bbdc489e93909d2043031de8
           Boot ID: 7ee0584a348e4650a24191227047b4ee
  Operating System: Linux Mint 20
            Kernel: Linux 5.4.0-26-generic
      Architecture: x86-64
Perhaps it is 5.4?
I am really new to linux. I found this out on web on how to check.
How can I change kernel?
User avatar
SMG
Level 11
Level 11
Posts: 3787
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Can't get two displays working

Post by SMG »

adityajh49 wrote:
Fri Sep 04, 2020 12:28 pm
Hi,

Code: Select all

~$ hostnamectl
   Static hostname: aditya-OMEN-Laptop-15-en0xxx
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: b76cc7b1bbdc489e93909d2043031de8
           Boot ID: 7ee0584a348e4650a24191227047b4ee
  Operating System: Linux Mint 20
            Kernel: Linux 5.4.0-26-generic
      Architecture: x86-64
Perhaps it is 5.4?
I am really new to linux. I found this out on web on how to check.
How can I change kernel?
Yes, that is the 5.4 kernel which was showing in your earlier posting:
System:
Kernel: 5.4.0-42-generic x86_64 bits: 64 compiler: gcc v: 9.3.0
Desktop: Cinnamon 4.6.7 wm: muffin 4.6.3 dm: LightDM 1.30.0
Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal

The kernel you currently have is the standard one with Linux Mint 20 and is known as the LTS kernel (long term support kernel). It can sometimes take a bit of time before the drivers needed for newer equipment, such as your laptop, are available in the LTS kernel. The kernel is constantly being improved, but not all newer versions are considered LTS. They are only supported for a shorter period of time (shorter in relation to LTS which is supported for five years).

I have older equipment so I have not yet used a kernel newer than LTS, but the person who posted this thread Touchpad not detected on Linux Mint 20 Cinnamon also needed to get the Renoir driver installed and user hglee gave advice on how to do it. The original poster of that thread was having other issues as well, so keep that in mind as you read the thread.

There may be other threads which also explain the process, but it would take me some time to find them. hglee gave what appears to me to be pretty good details in that thread, so maybe that will be all you need. Just post again if you need more help. Perhaps I will be able to find more information or someone who has already done it will be able to help.
LM20.1 Cinnamon
User avatar
SMG
Level 11
Level 11
Posts: 3787
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Can't get two displays working

Post by SMG »

Make sure to make a Timeshift snapshot before you make any changes. I think that is mentioned in the other thread, but that is the easiest way to get back to the start point if what you try does not work.
LM20.1 Cinnamon
adityajh49
Level 1
Level 1
Posts: 7
Joined: Sun Aug 30, 2020 12:55 pm

Re: Can't get two displays working

Post by adityajh49 »

Well, I upgraded the kernel and now the display is getting detected but nothing is showing on it. I tried mirror, extend and all, the display is just blank.

I feel we're close to the solution now. Do you happen to know why or how?
User avatar
SMG
Level 11
Level 11
Posts: 3787
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Can't get two displays working

Post by SMG »

adityajh49 wrote:
Sun Sep 06, 2020 3:03 am
Well, I upgraded the kernel and now the display is getting detected but nothing is showing on it. I tried mirror, extend and all, the display is just blank.

I feel we're close to the solution now. Do you happen to know why or how?
If you have the Renoir device driver (which was N/A earlier) loaded I think you are at this stage:
SMG wrote:
Mon Aug 31, 2020 9:04 am
However, I'm not sure if that will get everything working properly given you have a combination of Ryzen, Nvidia, and AMD. The ability to get both the Nvidia and AMD working as you would like them to work may require some additional effort. That combo is beyond my current level of knowledge to help, but others with similar hardware have also had issues arise. Maybe this thread [SOLVED] Nvidia drivers not loading (Mint 20 - Ryzen 7 4800 - GTX 1660 Ti) or this thread NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon can help if you still have problems even after the driver is installed.
There are other threads referenced within the two I mentioned, so you may need to read a bit to determine which one might be the closest match to your situation.

If those threads do not help, please post your current inxi -SMCGx information.
LM20.1 Cinnamon
User avatar
roblm
Level 13
Level 13
Posts: 4904
Joined: Sun Feb 24, 2013 2:41 pm

Re: Can't get two displays working

Post by roblm »

adityajh49,

You have the same CPU and almost the same GPU as user ficus2 in this topic, which SMG previously posted, except he has a GTX 1660 Ti. So those instructions should work. However, there is one difference. Your inxi output shows the BusID is 7 for the AMD GPU. In all the other similar topics I have been involved in, the BusID was 5.
viewtopic.php?f=59&t=325007

Also, you may have done other steps that are interfering with those instructions. In your second post, you show this:
adityajh49 wrote:
Sun Aug 30, 2020 1:46 pm
Somehow

Code: Select all

sudo prime-select nvidia
sudo prime-select amd
this command switches from external to laptop display. But not both at same time
There is no sudo prime-select amd command.

I suggest doing a fresh installation or use a Timeshift restore point if available that reverts back to a time before you made any changes.

Then install the 5.7.1 kernel or higher. You can install Ukuu to make the kernel installation easier. The latest version of Ukuu now requires purchasing a license but you can get an older version here:
https://github.com/teejee2008/ukuu/releases

Download the ukuu-v18.9.1-amd64.deb file. Install the 5.7.1 kernel and reboot.

Open the File Manager. Create a document in Home (/home/your-user-name) named .login and add these lines:

Code: Select all

xrandr --setprovideroutputsource 1 0
xrandr --auto
Right click on the file and select Properties > Permissions. Mark the checkbox next to Allow executing file as program.

Open the 70-linuxmint.conf file: xed admin:///etc/lightdm/lightdm.conf.d/70-linuxmint.conf

Add this line: display-setup-script=/home/your-user-name/.login, changing your-user-name to your actual user name.

Create an xorg.conf file: sudo touch /etc/X11/xorg.conf

Open the file for editing: xed admin:///etc/X11/xorg.conf

Add these lines, which contains the correct BusID for the AMD GPU:

Code: Select all

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "amdgpu"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID  "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration"
EndSection

Section "Device"
    Identifier "amdgpu"
    Driver "amdgpu"
    BusID  "PCI:7:0:0"
EndSection

Section "Screen"
    Identifier "amdgpu"
    Device "amdgpu"
EndSection

CONFIGURATION CHANGE MADE: The line BusID "PCI:7:0:0" in this section can be removed. This simplifies the configuration of this file, since the BusID value can be different on other systems:

Code: Select all

Section "Device"
    Identifier "amdgpu"
    Driver "amdgpu"
    BusID  "PCI:7:0:0"
EndSection
Reboot.

If there is a problem getting back to the desktop, then press Ctrl+Alt+F1 to enter virtual console tty1. Use this command to remove the xorg.conf file and reboot: sudo rm /etc/X11/xorg.conf; reboot
Last edited by roblm on Mon Nov 09, 2020 8:12 am, edited 1 time in total.
motoryzen
Level 4
Level 4
Posts: 371
Joined: Sun Dec 08, 2019 12:25 am

Re: Can't get two displays working

Post by motoryzen »

roblm wrote:
Sun Sep 06, 2020 10:27 am
adityajh49,

You have the same CPU and almost the same GPU as user ficus2 in this topic, which SMG previously posted, except he has a GTX 1660 Ti. So those instructions should work. However, there is one difference. Your inxi output shows the BusID is 7 for the AMD GPU. In all the other similar topics I have been involved in, the BusID was 5.
viewtopic.php?f=59&t=325007

Also, you may have done other steps that are interfering with those instructions. In your second post, you show this:
adityajh49 wrote:
Sun Aug 30, 2020 1:46 pm
Somehow

Code: Select all

sudo prime-select nvidia
sudo prime-select amd
this command switches from external to laptop display. But not both at same time
There is no sudo prime-select amd command.

I suggest doing a fresh installation or use a Timeshift restore point if available that reverts back to a time before you made any changes.

Then install the 5.7.1 kernel or higher. You can install Ukuu to make the kernel installation easier. The latest version of Ukuu now requires purchasing a license but you can get an older version here:
https://github.com/teejee2008/ukuu/releases

Download the ukuu-v18.9.1-amd64.deb file. Install the 5.7.1 kernel and reboot.

Open the File Manager. Create a document in Home (/home/your-user-name) named .login and add these lines:

Code: Select all

xrandr --setprovideroutputsource 1 0
xrandr --auto
Right click on the file and select Properties > Permissions. Mark the checkbox next to Allow executing file as program.

Open the 70-linuxmint.conf file: xed admin:///etc/lightdm/lightdm.conf.d/70-linuxmint.conf

Add this line: display-setup-script=/home/your-user-name/.login, changing your-user-name to your actual user name.

Create an xorg.conf file: sudo touch /etc/X11/xorg.conf

Open the file for editing: xed admin:///etc/X11/xorg.conf

Add these lines, which contains the correct BusID for the AMD GPU:

Code: Select all

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "amdgpu"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID  "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration"
EndSection

Section "Device"
    Identifier "amdgpu"
    Driver "amdgpu"
    BusID  "PCI:7:0:0"
EndSection

Section "Screen"
    Identifier "amdgpu"
    Device "amdgpu"
EndSection
Reboot.

If there is a problem getting back to the desktop, then press Ctrl+Alt+F1 to enter virtual console tty1. Use this command to remove the xorg.conf file and reboot: sudo rm /etc/X11/xorg.conf; reboot
How do you update to that kernel from that link from dated Jan 2019 if it's newer than 5.4 if using LM 20 cinnamon ..manually? I'm new to this
adityajh49
Level 1
Level 1
Posts: 7
Joined: Sun Aug 30, 2020 12:55 pm

Re: Can't get two displays working

Post by adityajh49 »

OMG OMG OMG!!!

Thanks SMG, roblm, motoryzen for all the support. I have the monitors working now and I am sooo happy
Thanks a LOTT
bruce744
Level 1
Level 1
Posts: 15
Joined: Sun Sep 06, 2020 12:00 pm

Re: [Solved] Can't get two displays working

Post by bruce744 »

These are the steps as outlined from Ubuntuhandbook.org to upgrade to Kernel 5.7.

I just completed the following on my HP Pavilion running Linux Mint 20 Cinnamon. I noticed a good increase in performance after going from Kernel 5.4 to 5.7.

Code: Select all

cd /tmp/

Code: Select all

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7/amd64/linux-headers-5.7.0-050700_5.7.0-050700.202006082127_all.deb

Code: Select all

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7/amd64/linux-headers-5.7.0-050700-generic_5.7.0-050700.202006082127_amd64.deb

Code: Select all

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7/amd64/linux-image-unsigned-5.7.0-050700-generic_5.7.0-050700.202006082127_amd64.deb

Code: Select all

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7/amd64/linux-modules-5.7.0-050700-generic_5.7.0-050700.202006082127_amd64.deb

Code: Select all

sudo dpkg -i *.deb
Reboot the machine and enjoy.
Intel Core i7 9700F / Cooler Master 212 Evo / Radeon RX 5600 XT / 16 GB G.SKILL RAM @ 2666MHz / GA-B365M-DS3H / EVGA 500w PSU
Lenovo Ideapad 3 / Intel Core i5 1035G1 / 12 GB @ 2666MHz
User avatar
roblm
Level 13
Level 13
Posts: 4904
Joined: Sun Feb 24, 2013 2:41 pm

Re: [Solved] Can't get two displays working

Post by roblm »

adityajh49,

The Nvidia GPU is now doing the graphics rendering. For situations where you don’t need to use the monitor attached to the HDMI port and the greater processing power of the Nvidia GPU, then the integrated AMD GPU should be used. This will help keep laptop temperatures down and prevent overheating problems.

The following info comes from this post. I have added it here so everything is in one topic:
viewtopic.php?p=1840990#p1840990

The presence or absence of the xorg.conf file will determine if the Nvidia GPU is used. The file can be disabled by using this command to rename it. Then log out and back in or reboot:
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.old

Now only the integrated AMD GPU will be used. To revert back to the Nvidia GPU, use this command to enable the xorg.conf file again: sudo mv /etc/X11/xorg.conf.old /etc/X11/xorg.conf

Instead of using those commands, I suggest using my desktop script, along with it's custom icons, to automatically switch the GPU that will be doing the graphics rendering. To create the script, right click on the desktop and select Create New Document > Empty Document. Name it Switch GPU. Open the file and add these lines:

Code: Select all

#!/bin/sh

if [ $(ls /etc/X11/ | grep xorg.conf) = "xorg.conf" ]; then
   gio set $HOME/Desktop/Switch\ GPU -t string metadata::custom-icon file://$HOME/Pictures/AMD-logo.svg   
   sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.old; reboot

elif [ $(ls /etc/X11/ | grep xorg.conf) = "xorg.conf.old" ]; then
   gio set $HOME/Desktop/Switch\ GPU -t string metadata::custom-icon file://$HOME/Pictures/Nvidia-logo.svg  
   sudo mv /etc/X11/xorg.conf.old /etc/X11/xorg.conf; reboot
fi
Save the file and close it. Right click on it and select Properties > Permissions. Mark the checkbox next to Allow executing file as program. When you click on the desktop script, choose the option Run in Terminal.

The script’s icon will be changed to show what GPU is now doing the graphics rendering. It will look like one of the two icons below:

Switch GPU.png
Switch GPU.png (10.1 KiB) Viewed 2400 times

For this feature to work, download the switch-gpu.zip file below, which contains the Nvidia-logo.svg and AMD-logo.svg icons. Right click on it and select Extract Here. Move the icons to the Pictures folder.

switch-gpu.zip
(18.21 KiB) Downloaded 43 times

If the icon is not changed, then check in /etc/X11/. Only xorg.conf or xorg.conf.old should be listed.
There should not be any other file with xorg.conf in it, such as xorg.conf.nvidia-xconfig-original.


This post has some advanced tweaking of the script operation:
viewtopic.php?p=1848567#p1848567
Last edited by roblm on Mon Nov 09, 2020 8:19 am, edited 1 time in total.
bruce744
Level 1
Level 1
Posts: 15
Joined: Sun Sep 06, 2020 12:00 pm

Re: [Solved] Can't get two displays working

Post by bruce744 »

Thank you very much for this information roblm.

When I utilize the nVidia GPU my laptop gets quite warm and the battery only lasts about 2 - 3 hours. When I use the AMD integrated GPU the laptop doesn't get warm at all, the battery lasts 5 - 6 hours and the overall performance seems much better. So this trick helps me a ton.
Intel Core i7 9700F / Cooler Master 212 Evo / Radeon RX 5600 XT / 16 GB G.SKILL RAM @ 2666MHz / GA-B365M-DS3H / EVGA 500w PSU
Lenovo Ideapad 3 / Intel Core i5 1035G1 / 12 GB @ 2666MHz
Post Reply

Return to “Graphics Cards & Monitors”