linuxmint / nvidia-prime-applet

39 stars 16 forks source link

nvidia-prime-applet not working on AMD/NVIDIA system #6

Closed mfreeman72 closed 3 years ago

mfreeman72 commented 3 years ago

I have an ASUS TUF Gaming A17 FA706IH_TUF706IH laptop. It has a Ryzen 7 4800H CPU with an intergrated Vega 7 GPU, as well as a discrete NVIDIA GTX 1650 GPU. I have the proprietary NVIDIA driver version 455 installed and running perfectly. I have set it up such that prime-select runs well from the command-line and can select the GPU from there. I normally run it in on-demand mode. The lower-power Vega 7 GPU runs the main desktop and I can use environment variables to run OpenGL/Vulkan and graphically-intensive programs/games on the GTX 1650 GPU, but the nvidia-prime-applet won't run. If I run it from a terminal, it says: "Aborting: prime not supported - is this a prime laptop and do you have nvidia drivers installed?" Also, the Cinnamon feature that, according to the LM 20 new features list, should allow me to select the GPU on a per-program basis from the menu, isn't there. Everything seems to be working perfectly with Prime from the command line, but not on the LM-specific GUI side of things. I'm currently running LM 20.1 (I just got this machine a couple weeks ago, and figured LM 20.1 is close enough to release to just install it).

Here's the copy/paste from system info: System: Kernel: 5.8.0-33-generic x86_64 bits: 64 compiler: N/A Desktop: Cinnamon 4.8.5 wm: muffin dm: LightDM Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal Machine: Type: Laptop System: ASUSTeK product: ASUS TUF Gaming A17 FA706IH_TUF706IH v: 1.0 serial: Mobo: ASUSTeK model: FA706IH v: 1.0 serial: UEFI: American Megatrends v: FA706IH.314 date: 12/17/2020 Battery: ID-1: BAT1 charge: 47.3 Wh condition: 47.5/48.1 Wh (99%) volts: 12.7/11.7 model: ASUS A32-K55 serial: status: Unknown Device-1: hidpp_battery_0 model: Logitech Wireless Mouse M510 serial: charge: 55% (should be ignored) 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: 92630 Speed: 1273 MHz min/max: 1400/2900 MHz Core speeds (MHz): 1: 1623 2: 1695 3: 1397 4: 1396 5: 1397 6: 1397 7: 1396 8: 1397 9: 1378 10: 1359 11: 1546 12: 1487 13: 1571 14: 1596 15: 1398 16: 1397 Graphics: Device-1: NVIDIA vendor: ASUSTeK driver: nvidia v: 455.45.01 bus ID: 01:00.0 chip ID: 10de:1f99 Device-2: AMD Renoir vendor: ASUSTeK driver: amdgpu v: kernel bus ID: 05:00.0 chip ID: 1002:1636 Display: x11 server: X.Org 1.20.8 driver: amdgpu,ati,nvidia unloaded: fbdev,modesetting,nouveau,vesa resolution: 1920x1080~120Hz OpenGL: renderer: AMD RENOIR (DRM 3.38.0 5.8.0-33-generic LLVM 10.0.0) v: 4.6 Mesa 20.0.8 direct render: Yes Audio: Device-1: AMD vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 05:00.1 chip ID: 1002:1637 Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor vendor: DekTec Digital Video B.V. driver: N/A bus ID: 05:00.5 chip ID: 1022:15e2 Device-3: AMD Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 05:00.6 chip ID: 1022:15e3 Sound Server: ALSA v: k5.8.0-33-generic Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK driver: r8169 v: kernel port: e000 bus ID: 02:00.0 chip ID: 10ec:8168 IF: enp2s0 state: down mac: Device-2: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter vendor: AzureWave driver: rtw_8822ce v: N/A port: d000 bus ID: 03:00.0 chip ID: 10ec:c822 IF: wlp3s0 state: up mac: IF-ID-1: vmnet1 state: unknown speed: N/A duplex: N/A mac: IF-ID-2: vmnet8 state: unknown speed: N/A duplex: N/A mac: Drives: Local Storage: total: 1.38 TiB used: 363.41 GiB (25.8%) ID-1: /dev/nvme0n1 vendor: Kingston model: OM8PCP3512F-AB size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 serial: ID-2: /dev/sda vendor: Toshiba model: MQ04ABF100 size: 931.51 GiB speed: 6.0 Gb/s serial: Partition: ID-1: / size: 224.57 GiB used: 33.16 GiB (14.8%) fs: ext4 dev: /dev/nvme0n1p6 ID-2: /home size: 457.44 GiB used: 330.22 GiB (72.2%) fs: ext4 dev: /dev/sda2 Sensors: System Temperatures: cpu: 40.4 C mobo: N/A gpu: amdgpu temp: 35 C Fan Speeds (RPM): cpu: 2400 Repos: No active apt repos in: /etc/apt/sources.list Active apt repos in: /etc/apt/sources.list.d/additional-repositories.list 1: deb [arch=amd64] https: //download.virtualbox.org/virtualbox/debian focal contrib 2: deb https: //repo.vivaldi.com/archive/deb/ stable main 3: deb https: //dl.winehq.org/wine-builds/ubuntu/ focal main Active apt repos in: /etc/apt/sources.list.d/alexlarsson-flatpak-focal.list 1: deb http: //ppa.launchpad.net/alexlarsson/flatpak/ubuntu focal main Active apt repos in: /etc/apt/sources.list.d/boltgolt-howdy-focal.list 1: deb http: //ppa.launchpad.net/boltgolt/howdy/ubuntu focal main Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list 1: deb [arch=amd64] https: //brave-browser-apt-release.s3.brave.com/ stable main No active apt repos in: /etc/apt/sources.list.d/cappelikan-ppa-focal.list Active apt repos in: /etc/apt/sources.list.d/celestia-obs.list 1: deb https: //dl.bintray.com/celestia/releases-deb bionic universe Active apt repos in: /etc/apt/sources.list.d/gambas-team-gambas3-focal.list 1: deb http: //ppa.launchpad.net/gambas-team/gambas3/ubuntu focal main Active apt repos in: /etc/apt/sources.list.d/gerardpuig-ppa-focal.list 1: deb http: //ppa.launchpad.net/gerardpuig/ppa/ubuntu focal main Active apt repos in: /etc/apt/sources.list.d/google-chrome.list 1: deb [arch=amd64] http: //dl.google.com/linux/chrome/deb/ stable main Active apt repos in: /etc/apt/sources.list.d/google-earth-pro.list 1: deb [arch=amd64] http: //dl.google.com/linux/earth/deb/ stable main 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/home:manuelschneid3r.list 1: deb http: //download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_20.04/ / Active apt repos in: /etc/apt/sources.list.d/iteas.list 1: deb https: //apt.iteas.at/iteas focal main Active apt repos in: /etc/apt/sources.list.d/jonaski-strawberry-focal.list 1: deb http: //ppa.launchpad.net/jonaski/strawberry/ubuntu focal main Active apt repos in: /etc/apt/sources.list.d/libreoffice-ppa-focal.list 1: deb http: //ppa.launchpad.net/libreoffice/ppa/ubuntu focal main Active apt repos in: /etc/apt/sources.list.d/linuxuprising-java-focal.list 1: deb http: //ppa.launchpad.net/linuxuprising/java/ubuntu focal main Active apt repos in: /etc/apt/sources.list.d/lutris-team-lutris-focal.list 1: deb http: //ppa.launchpad.net/lutris-team/lutris/ubuntu focal main Active apt repos in: /etc/apt/sources.list.d/mono-official-stable.list 1: deb https: //download.mono-project.com/repo/ubuntu stable-focal main Active apt repos in: /etc/apt/sources.list.d/mono-official-vs.list 1: deb https: //download.mono-project.com/repo/ubuntu vs-bionic main Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 1: deb http: //packages.linuxmint.com ulyssa main upstream import backport #id:linuxmint_main 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/openshot_developers-ppa-focal.list 1: deb http: //ppa.launchpad.net/openshot.developers/ppa/ubuntu focal main Active apt repos in: /etc/apt/sources.list.d/pkgcrosswire-ppa-focal.list 1: deb http: //ppa.launchpad.net/pkgcrosswire/ppa/ubuntu focal main Active apt repos in: /etc/apt/sources.list.d/saiarcot895-flightgear-focal.list 1: deb http: //ppa.launchpad.net/saiarcot895/flightgear/ubuntu focal main Active apt repos in: /etc/apt/sources.list.d/scribus-ppa-focal.list 1: deb http: //ppa.launchpad.net/scribus/ppa/ubuntu focal main Active apt repos in: /etc/apt/sources.list.d/skype-stable.list 1: deb [arch=amd64] https: //repo.skype.com/deb stable main Active apt repos in: /etc/apt/sources.list.d/slgobinath-gcalendar-focal.list 1: deb http: //ppa.launchpad.net/slgobinath/gcalendar/ubuntu focal main Active apt repos in: /etc/apt/sources.list.d/spotify.list 1: deb http: //repository.spotify.com stable non-free Active apt repos in: /etc/apt/sources.list.d/team-xbmc-ppa-focal.list 1: deb http: //ppa.launchpad.net/team-xbmc/ppa/ubuntu focal main Active apt repos in: /etc/apt/sources.list.d/teams.list 1: deb [arch=amd64] https: //packages.microsoft.com/repos/ms-teams stable main Active apt repos in: /etc/apt/sources.list.d/thomas-schiex-blender-focal.list 1: deb http: //ppa.launchpad.net/thomas-schiex/blender/ubuntu focal main Active apt repos in: /etc/apt/sources.list.d/ubuntuhandbook1-dvdstyler-focal.list 1: deb http: //ppa.launchpad.net/ubuntuhandbook1/dvdstyler/ubuntu focal main Active apt repos in: /etc/apt/sources.list.d/vscode.list 1: deb [arch=amd64,arm64,armhf] http: //packages.microsoft.com/repos/vscode stable main Info: Processes: 383 Uptime: 6h 41m Memory: 15.13 GiB used: 2.71 GiB (17.9%) Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Client: Unknown python3.8 client inxi: 3.0.38

mfreeman72 commented 3 years ago

After today's nvidia-prime package update, the applet is now showing up. One last question: Is there a way to make the applet recognize that I am using an AMD/NVIDIA hybrid system and not Intel/NVIDIA? It would be nice to have AMD icons and menu references instead of Intel, since there is no Intel graphics on this computer. The applet's menu does see that I'm using AMD (it's listed at the top of the menu as "AMD RENOIR (DRM 3.38.0, 5.8.0-40-generic, LLVM 11.0.0)".

mtwebster commented 3 years ago

Any way you can provide a screenshot? I'd like to see what the menu looks like currently.

mfreeman72 commented 3 years ago

Here's the screenshot...

nvidia-prime-applet_screenshot

mfreeman72 commented 3 years ago

Looking at the list of files included in the nvidia-prime-applet's package, it only includes icons for Intel and NVIDIA.

mfreeman72 commented 3 years ago

So, just for clarification, it would be a more accurate representation of my system if the icon (highlighted in purple on the panel in the screenshot) were the AMD logo instead of the Intel logo, and where it says, "Switch to: Intel (Power Saving Mode)", it should say, "Switch to: AMD (Power Saving Mode)". I know it's a pretty nit-picky thing, since it actually does function correctly, but it still bugs me for some reason.

mtwebster commented 3 years ago

I understand, it should reflect the system properly - the trick for us is detecting AMD support properly.

Can you supply the output of lshw -C display

Also, when you're in amd/integrated mode, the output of prime-select query

Thanks

mfreeman72 commented 3 years ago

Output of lshw -C display:

WARNING: you should run this program as super-user. -display
description: VGA compatible controller product: NVIDIA Corporation vendor: NVIDIA Corporation physical id: 0 bus info: pci@0000:01:00.0 version: a1 width: 64 bits clock: 33MHz capabilities: vga_controller bus_master cap_list rom configuration: driver=nvidia latency=0 resources: irq:77 memory:fb000000-fbffffff memory:b0000000-bfffffff memory:c0000000-c1ffffff ioport:f000(size=128) memory:fc000000-fc07ffff
-display description: VGA compatible controller product: Renoir vendor: Advanced Micro Devices, Inc. [AMD/ATI] physical id: 0 bus info: pci@0000:05:00.0 version: c6 width: 64 bits clock: 33MHz capabilities: vga_controller bus_master cap_list configuration: driver=amdgpu latency=0 resources: irq:45 memory:d0000000-dfffffff memory:e0000000-e01fffff ioport:c000(size=256) memory:fc500000-fc57ffff WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

When in AMD/integrated mode, prime-select query says "intel".

mtwebster commented 3 years ago

Hi, would you mind giving this package a try:

nvidia-prime-applet.zip

unzip nvidia-prime-applet.zip
sudo dpkg -i *.deb

Unfortunately until the nvidia-prime package it updated to really support AMD integrated graphics, my implementation isn't great, but it should work.

Thanks

mfreeman72 commented 3 years ago

That looks acceptable. It puts the right icon on the panel, and instead of identifying either Intel or AMD, it just says "Integrated graphics". That's reasonable. I'll have to blacklist the nvidia-prime-applet in Update Manager, though, since the current official version (1.2.6) is past the version on this package (1.2.3). Thanks for the putting this together!

mtwebster commented 3 years ago

Ah sorry I didn't realize I was working on the old version - the only difference though is translation updates and some additional logging info from the terminal - they're functionally the same.

I may go back to using proper names rather than "Integrated", I'm not certain yet.

Thanks for testing it out.

mfreeman72 commented 3 years ago

You're welcome! I've also submitted a bug report to Ubuntu for the nvidia-prime package, as it's also listed incorrectly on the nvidia-prime plugin for nvidia-settings. Hopefully, if they actually do something about it, this will help on our end as well.

clefebvre commented 3 years ago

@mfreeman72 Can you confirm the content of /var/lib/ubuntu-drivers-common/last_gfx_boot?

I need to make sure it contains 1002 basically.

mfreeman72 commented 3 years ago

/var/lib/ubuntu-drivers-common/last_gfx_boot contains the following:

1002:1636;0000:05:00:0;1 10de:1f99;0000:01:00:0;0