Announcement

Collapse
No announcement yet.

How to use dedicated graphics on laptop

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to use dedicated graphics on laptop

    Hi there! I'm running on a laptop with an AMD integrated graphics card and a NVIDIA 3050ti mobile dedicated graphics card. I'd like my programs to default to using the NVIDIA graphics card because my main use-case for the computer is gaming and it's almost always plugged in, but I can't seem to get it to work.

    Following a guide online, I used "prime-select nvidia" to switch from on-demand to nvidia, and I restarted my computer afterwards. "prime-select query" says that my nvidia gpu is selected, but when I run "nvidia-smi," the only process shown using my nvidia card is Xorg.

    Could I please get some help on actually using my nvidia graphics for games?

    Required info from the sticky:
    • The version/release of Kubuntu you are using. Kubuntu 25.04
    • Whether Kubuntu is actually installed, or is running "live" from a bootable USB Flash Drive or LiveCD. Installed
    • If Kubuntu is installed, is it the only OS on the PC, or is it installed alongside another OS (Windows or ...) or is it installed in a VM (Virtual Machine)? Only OS on the PC
    • The version of KDE Plasma installed. 6.3.4
    the first and last item can be obtained by pressing Alt+F2 and typing: About this System and pressing Enter/Return.

    2) Information about your PC:​

    System:
    Host: ada-dellg15 Kernel: 6.14.0-24-generic arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 6.3.4 Distro: Kubuntu 25.04 (Plucky Puffin)
    Machine:
    Type: Laptop System: Dell product: Dell G15 5515 v: 1.22.0
    serial: <superuser required>
    Mobo: Dell model: 00VT1V v: A00 serial: <superuser required> UEFI: Dell
    v: 1.22.0 date: 09/04/2024
    Battery:
    ID-1: BAT1 charge: 39.5 Wh (100.0%) condition: 39.5/86.0 Wh (45.9%)
    CPU:
    Info: 8-core model: AMD Ryzen 7 5800H with Radeon Graphics bits: 64
    type: MT MCP cache:L2: 4 MiB
    Speed (MHz):avg: 3095 min/max: 400/4465 cores:1: 3095 2: 3095 3: 3095
    4: 3095 5: 3095 6: 3095 7: 3095 8: 3095 9: 3095 10: 3095 11: 3095 12: 3095
    13: 3095 14: 3095 15: 3095 16: 3095
    Graphics:
    Device-1: NVIDIA GA107M [GeForce RTX 3050 Ti Mobile] driver: nvidia
    v: 570.169
    Device-2: Advanced Micro Devices [AMD/ATI] Cezanne [Radeon Vega Series /
    Radeon Mobile Series] driver: amdgpu v: kernel
    Device-3: Microdia Integrated_Webcam_HD driver: uvcvideo type: USB
    Display: wayland server: X.org v: 1.21.1.16 with: Xwayland v: 24.1.6
    compositor: kwin_wayland driver:X:loaded: amdgpu,nvidia
    unloaded: fbdev,modesetting,nouveau,vesa dri: radeonsi gpu: amdgpu
    resolution: 1920x1080~120Hz
    API: EGL v: 1.5 drivers: kms_swrast,nouveau,nvidia,radeonsi,swrast
    platforms: gbm,wayland,x11,surfaceless,device
    API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: amd mesa
    v: 25.0.7-0ubuntu0.25.04.1 renderer: AMD Radeon Graphics (radeonsi renoir
    ACO DRM 3.61 6.14.0-24-generic)
    API: Vulkan v: 1.4.304 drivers: N/A surfaces: xcb,xlib,wayland
    Info:Tools:api: clinfo, eglinfo, glxinfo, vulkaninfo
    de: kscreen-console,kscreen-doctor gpu: nvidia-settings,nvidia-smi
    wl: wayland-info x11: xdriinfo, xdpyinfo, xprop, xrandr
    Audio:
    Device-1: NVIDIA GA107 High Definition Audio driver: snd_hda_intel
    Device-2: Advanced Micro Devices [AMD/ATI] Renoir Radeon High Definition
    Audio driver: snd_hda_intel
    Device-3: Advanced Micro Devices [AMD] ACP/ACP3X/ACP6x Audio Coprocessor
    driver: snd_rn_pci_acp3x
    Device-4: Advanced Micro Devices [AMD] Family 17h/19h/1ah HD Audio
    driver: snd_hda_intel
    Device-5: Corsair HS80 RGB USB Gaming Headset
    driver: hid-generic,snd-usb-audio,usbhid type: USB
    API: ALSA v: k6.14.0-24-generic status: kernel-api
    Server-1: PipeWire v: 1.2.7 status: active
    Network:
    Device-1: Realtek RTL8125 2.5GbE driver: r8169
    IF: enp3s0 state: down mac: 60:18:95:42:89:f6
    Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi
    IF: wlp4s0 state: up mac: c4:23:60:a3:59:a3
    Bluetooth:
    Device-1: Intel AX200 Bluetooth driver: btusb type: USB
    Report: hciconfig ID: hci0 state: up address: C4:23:60:A3:59:A7 bt-v: 5.2
    Drives:
    Local Storage:total: 953.87 GiB used: 201.47 GiB (21.1%)
    ID-1: /dev/nvme0n1 vendor: SK Hynix model: BC711 NVMe 1TB size: 953.87 GiB
    Partition:
    ID-1: / size: 937.53 GiB used: 201.47 GiB (21.5%) fs: ext4
    dev: /dev/nvme0n1p2
    ID-2: /boot/efi size: 299.4 MiB used: 7.8 MiB (2.6%) fs: vfat
    dev: /dev/nvme0n1p1
    Swap:
    ID-1: swap-1 type: file size: 512 MiB used: 511 MiB (99.8%) file: /swapfile
    Sensors:
    System Temperatures:cpu: 86.0 C mobo: 57.0 C sodimm: SODIMM C gpu: amdgpu
    temp: 69.0 C
    Fan Speeds (rpm):cpu: 4700 mobo: 4400
    Info:
    Memory:total: 16 GiB note: est. available: 14.97 GiB
    used: 12.59 GiB (84.1%)
    Processes: 438 Uptime: 9m Shell: Bash inxi: 3.3.37


    #2
    Hi all! With some more digging and experimenting, I actually managed to get a solution for running specific apps with my GPU.

    Using the custom prime-run function from [this ask ubuntu thread](https://askubuntu.com/questions/1364...mand-not-found), I was able to run *some* things, but not flatpaks. The reason is because flatpaks don't take environment variables in the same way that other programs do. I followed [this unix & linux stackexchange post](https://unix.stackexchange.com/quest...atpak-applicat)
    to set the environment variables, and personally just used Flatseal so I could be sure it went right.

    Then, I just went through the different flatpak programs that I wanted to use my nvidia card and just set their environment variables to the same things prime-run would've set them to. Now, everything runs with nvidia that I want to, and everything else runs on my integrated.

    The one little change I made to the prime-run setup is that I **DO NOT** use the environment variable "VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json". I personally don't have that file, so I took it out and it still seems to work. Lutris also used to be complaining about me not having Vulkan before, and after changing that environment variable the complaint went away.​

    Hope this helps anyone else who ends up in my situation!

    Comment

    Users Viewing This Topic

    Collapse

    There are 0 users viewing this topic.

    Working...
    X