NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Screen resolution, 3D Acceleration, nVidia, ATI
Forum rules
Before you post please read this
Post Reply
joshred
Level 1
Level 1
Posts: 9
Joined: Sun Aug 02, 2020 10:32 am

NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by joshred »

This is a new laptop, so I went straight to Mint 20. I haven't gotten it working yet.
I suspect that my issue is similar to

viewtopic.php?f=49&t=323641, but I can't figure it out.

When Mint starts, I receive a message saying that I do not have hardware acceleleration, and I do not output on the HDMI port. (strangely, when I shut down, it briefly flashes the mint logo on the external monitor).

Output from:

Code: Select all

inxi -Fxxxz

Code: Select all

System:
  Kernel: 5.4.0-42-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 
  Desktop: Cinnamon 4.6.6 wm: muffin 4.6.2 dm: LightDM 1.30.0 
  Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal 
Machine:
  Type: Laptop System: LENOVO product: 82B5 v: Lenovo Legion 5 15ARH05 
  serial: <filter> Chassis: type: 10 v: Lenovo Legion 5 15ARH05 
  serial: <filter> 
  Mobo: LENOVO model: LNVNB161216 v: SDK0J40709 WIN serial: <filter> 
  UEFI: LENOVO v: EUCN16WW date: 03/13/2020 
Battery:
  ID-1: BAT0 charge: 62.8 Wh condition: 62.8/60.0 Wh (105%) volts: 17.5/15.4 
  model: SMP L19M4PC0 type: Li-poly serial: <filter> status: Full cycles: 2 
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: 92624 
  Speed: 1540 MHz min/max: 1400/2900 MHz boost: enabled Core speeds (MHz): 
  1: 1571 2: 1681 3: 3782 4: 4291 5: 1870 6: 1907 7: 1842 8: 1843 9: 1734 
  10: 1769 11: 2561 12: 2927 13: 1420 14: 1566 15: 1907 16: 1818 
Graphics:
  Device-1: NVIDIA vendor: Lenovo driver: N/A bus ID: 01:00.0 
  chip ID: 10de:1f99 
  Device-2: AMD Renoir vendor: Lenovo driver: N/A bus ID: 05:00.0 
  chip ID: 1002:1636 
  Display: x11 server: X.Org 1.20.8 driver: ati,fbdev 
  unloaded: modesetting,radeon,vesa resolution: 1920x1080~77Hz 
  OpenGL: renderer: llvmpipe (LLVM 10.0.0 128 bits) v: 3.3 Mesa 20.0.8 
  compat-v: 3.1 direct render: Yes 
Audio:
  Device-1: NVIDIA 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: Lenovo driver: snd_rn_pci_acp3x v: kernel bus ID: 05:00.5 
  chip ID: 1022:15e2 
  Device-3: AMD Family 17h HD Audio vendor: Lenovo driver: snd_hda_intel 
  v: kernel bus ID: 05: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: Lenovo driver: r8169 v: kernel port: 2000 bus ID: 03:00.0 
  chip ID: 10ec:8168 
  IF: eno1 state: down mac: <filter> 
  Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel port: 2000 
  bus ID: 04:00.0 chip ID: 8086:2723 
  IF: wlp4s0 state: up mac: <filter> 
Drives:
  Local Storage: total: 476.94 GiB used: 24.32 GiB (5.1%) 
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB512HBJQ-000L2 
  size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: 3L1QEXF7 
  scheme: GPT 
Partition:
  ID-1: / size: 217.23 GiB used: 24.28 GiB (11.2%) fs: ext4 
  dev: /dev/nvme0n1p5 
Sensors:
  System Temperatures: cpu: 37.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 343 Uptime: 14m Memory: 7.21 GiB used: 2.25 GiB (31.2%) 
  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 

I tried creating a .login file with:

Code: Select all

xrandr --setprovideroutputsource amdgpu NVIDIA-0
xrandr --auto
I also tried substituting the first line for xrandr --setprovideroutputsource 1 0
Adding

Code: Select all

display-setup-script=/home/my-user-name/.login
to 70-linuxmint.conf
and adding the following to /etc/X11/xorg.conf

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:5:0:0"
EndSection

Section "Screen"
    Identifier "amdgpu"
    Device "amdgpu"
EndSection
Any advice would be appreciated.
User avatar
roblm
Level 13
Level 13
Posts: 4503
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by roblm »

User ficus2 in this topic has the same Ryzen 7 4800H CPU as you do, which is very new hardware with a launch date of 1-6-20. He had to install the 5.7.1 kernel for better support:
viewtopic.php?f=59&t=325007

You can install Ukuu to make the kernel installation easier. The latest version of Ukuu now requires purchasing a license for $11, 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. Reboot and select the new kernel at the grub menu. When you get to the desktop, post the output of inxi -Gx to check if there is graphics hardware acceleration.
joshred
Level 1
Level 1
Posts: 9
Joined: Sun Aug 02, 2020 10:32 am

Re: NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by joshred »

I didn't get the hardware acceleration warning when I logged in., but the HDMI output isn't being recognized yet.

Here's the output of inxi -Gx

Code: Select all

Graphics:
  Device-1: NVIDIA vendor: Lenovo driver: nvidia v: 440.95.01 
  bus ID: 01:00.0 
  Device-2: AMD Renoir vendor: Lenovo driver: amdgpu v: kernel 
  bus ID: 05:00.0 
  Display: x11 server: X.Org 1.20.8 driver: amdgpu,ati 
  unloaded: fbdev,modesetting,nouveau,nvidia,vesa 
  resolution: 1920x1080~120Hz 
  OpenGL: renderer: AMD RENOIR (DRM 3.37.0 5.7.1-050701-generic LLVM 10.0.0) 
  v: 4.6 Mesa 20.0.8 direct render: Yes 
User avatar
roblm
Level 13
Level 13
Posts: 4503
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by roblm »

The amdgpu driver is now loading and driving the AMD GPU. You need to install the Nvidia-440 driver in Driver Manager.
joshred
Level 1
Level 1
Posts: 9
Joined: Sun Aug 02, 2020 10:32 am

Re: NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by joshred »

I have the drivers showing up.
Image

It doesn't seem to want to use the "recommended" driver. It keeps flipping back.

inxi -Gx looks the same. I'm posting it just in case I am overlooking anything.

Code: Select all

Graphics:
  Device-1: NVIDIA vendor: Lenovo driver: nvidia v: 440.95.01 
  bus ID: 01:00.0 
  Device-2: AMD Renoir vendor: Lenovo driver: amdgpu v: kernel 
  bus ID: 05:00.0 
  Display: x11 server: X.Org 1.20.8 driver: amdgpu,ati 
  unloaded: fbdev,modesetting,nouveau,nvidia,vesa 
  resolution: 1920x1080~120Hz 
  OpenGL: renderer: AMD RENOIR (DRM 3.37.0 5.7.1-050701-generic LLVM 10.0.0) 
  v: 4.6 Mesa 20.0.8 direct render: Yes 
User avatar
roblm
Level 13
Level 13
Posts: 4503
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by roblm »

Use this command to remove that driver: sudo apt-get purge *nvidia*
After rebooting, select the Nvidia-440.100 driver in Driver Manager.
joshred
Level 1
Level 1
Posts: 9
Joined: Sun Aug 02, 2020 10:32 am

Re: NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by joshred »

Ok. I have it set to the correct driver.

I don't see any change to inxi yet.

Code: Select all

$ inxi -Gx 
Graphics:
  Device-1: NVIDIA vendor: Lenovo driver: nvidia v: 440.100 bus ID: 01:00.0 
  Device-2: AMD Renoir vendor: Lenovo driver: amdgpu v: kernel 
  bus ID: 05:00.0 
  Display: x11 server: X.Org 1.20.8 driver: amdgpu,ati 
  unloaded: fbdev,modesetting,nouveau,nvidia,vesa 
  resolution: 1920x1080~120Hz 
  OpenGL: renderer: AMD RENOIR (DRM 3.37.0 5.7.1-050701-generic LLVM 10.0.0) 
  v: 4.6 Mesa 20.0.8 direct render: Yes 
Am I at the point where the other forum post should be more helpful, or was I on the wrong track with that?
User avatar
roblm
Level 13
Level 13
Posts: 4503
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by roblm »

Were the changes you made in your first post removed or still existing? If they were removed, then redo them. This is the correct line to use: xrandr --setprovideroutputsource 1 0
joshred
Level 1
Level 1
Posts: 9
Joined: Sun Aug 02, 2020 10:32 am

Re: NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by joshred »

Awesome! Appears to be working, and I have dual-monitors.

If I can see if I understand what we did...

We needed to make sure that I was using a newer kernel (5.7.1) because the old kernel didn't support all of my hardware.
We needed to make sure that I was using the current nVidia Driver(440.100).
We needed to make sure that the OS knew which video driver to load first (little unsure about this one), because it defaults to the AMD Driver.
User avatar
roblm
Level 13
Level 13
Posts: 4503
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by roblm »

Would you post the output of inxi -SGx to check if everything looks OK.

I’m still not sure what the purpose of the new nvidia-driver-440-server series is for. On this web page, the info says:
These releases provide both bug fixes and new features, and I’m assuming it can only be for the Nvidia-440.100 driver because it’s a new series, but why is it named Nvdiia-440.95.01, a lower number, instead of 440.100.01?
https://bugs.launchpad.net/ubuntu/+sour ... ug/1881137

At this time there is no good out-of-the-box support in Linux for laptops with hybrid graphics that have integrated AMD+Discrete Nvidia GPUs. A workaround has to be used, editing configuration files. That xorg.conf file was designed for laptops with Intel+Nvidia hybrid graphics, but I modified it for AMD+Nvidia.

Your system should be using the Nvidia GPU for the graphics rendering now. This is also needed because the HDMI port is usually internally connected to that GPU. If you don’t need to use an external monitor or require the greater graphics processing power of the Nvidia GPU, then you should switch back to the AMD GPU for graphics rendering. This will keep laptop temperatures down and prevent overheating problems.

My fourth post in the other linked topic will discuss how to switch GPUs and how to use a desktop script I created to facilitate the switching.

My eighth post in this topic discusses some optional changes to make the script run automatically:
viewtopic.php?f=59&t=325007
Last edited by roblm on Sat Aug 22, 2020 9:19 am, edited 1 time in total.
joshred
Level 1
Level 1
Posts: 9
Joined: Sun Aug 02, 2020 10:32 am

Re: NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by joshred »

Oh no! Now I'm going to give you a headache.

Once I felt like I had a better handle on what was going on, I decided to look into installing CUDA capable drivers, so everything looks a bit different. (My next task is to try and run some of the nVidia sample files, but this is probably the wrong forum for that. )

In any case, here is the output, though it isn't exactly what you requested:

Code: Select all

inxi -SGx
System:
  Host: joshred-lgn Kernel: 5.7.1-050701-generic x86_64 bits: 64 
  compiler: gcc v: 9.3.0 Desktop: Cinnamon 4.6.6 
  Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal 
Graphics:
  Device-1: NVIDIA vendor: Lenovo driver: nvidia v: 450.51.05 
  bus ID: 01:00.0 
  Device-2: AMD Renoir vendor: Lenovo driver: amdgpu v: kernel 
  bus ID: 05:00.0 
  Display: x11 server: X.Org 1.20.8 driver: amdgpu,nvidia 
  resolution: 1920x1080~60Hz, 1920x1080~120Hz 
  OpenGL: renderer: GeForce GTX 1650/PCIe/SSE2 v: 4.6.0 NVIDIA 450.51.05 
  direct render: Yes 
User avatar
roblm
Level 13
Level 13
Posts: 4503
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by roblm »

The output shows you installed the Nvidia-450 driver but it looks OK. You could have left the 440 driver and used this command to install CUDA Toolkit version 10.1 from the repos: apt install nvidia-cuda-toolkit.

If you need the newest version, CUDA Toolkit 11.0, then go here, but this is a 2.3 GB download:
https://developer.nvidia.com/cuda-downloads

Select Linux > x86_64 > Ubuntu > 20.04 (for Mint 20) or 18.04 (for Mint 19.x) > deb (local).
Follow the first 6 steps of the instructions for installing the Base Installer, but don’t do the last step to install cuda. Instead, use the command apt install cuda-toolkit-11-0


Did you create and test the desktop script for switching which GPU will do the graphics rendering?
joshred
Level 1
Level 1
Posts: 9
Joined: Sun Aug 02, 2020 10:32 am

Re: NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by joshred »

Maybe I should have waited for you to reply.

I followed the Ubuntu instructions on Nvidia's site, and their guide automatically installed driver v450. (Yes, it took awhile). The latest driver was a requirement of the package. I didn't realize any of this was available through apt. They don't mention it anywhere on Nvidia's site. And I was just following their instructions. I know they aren't the best when it comes to open source.

I didn't setup the switching script yet, but I do want to get you some data. It can be my small contribution to open source. I'm just a little bit backed up between work and school, but hopefully in the next few days.
joshred
Level 1
Level 1
Posts: 9
Joined: Sun Aug 02, 2020 10:32 am

Re: NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by joshred »

Ok, I started playing with this.
I have this in xorg.conf

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:5:0:0"
EndSection

Section "Screen"
    Identifier "amdgpu"
    Device "amdgpu"
EndSection
I don't suppose you know what to put in xorg.conf.old?
I guess I can dig around in my backups.
User avatar
roblm
Level 13
Level 13
Posts: 4503
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by roblm »

joshred wrote: I don't suppose you know what to put in xorg.conf.old?
You don’t need to create a separate xorg.conf.old file. The xorg.conf file is needed to allow switching to the Nvidia GPU for the graphics rendering. When you want to switch back to using the AMD GPU, then the xorg.conf file must be disabled and this is done by renaming it to xorg.conf.old. The switching can be done manually by using commands or automatically by using the script I created.
joshred
Level 1
Level 1
Posts: 9
Joined: Sun Aug 02, 2020 10:32 am

Re: NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by joshred »

Ah. Well... in that case, the script broke some stuff on reboot.

I had to go into recovery mode and revert the xorg file.
User avatar
roblm
Level 13
Level 13
Posts: 4503
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVidea GeForce GTX 1650 with AMD Ryzen and AMD Radeon

Post by roblm »

Try to switch GPUs manually. First use this command to check what GPU is doing the graphics rendering: inxi -G
If it’s the Nvidia GPU, then use this command to switch to the AMD GPU:
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.old

Then log out and back in or reboot. Use the inxi -G command to check if the AMD GPU is now doing the graphics rendering.


If it’s the AMD GPU, then use this command:
sudo mv /etc/X11/xorg.conf.old /etc/X11/xorg.conf

If those commands work, then you made some error in using the script.
Post Reply

Return to “Graphics Cards & Monitors”