Game not running on GPU

I want to run krunker.io on GPU. I have downloaded its appimage file.
I read several threads regarding running game on GPU (Nvidia GTX 1650).
So I ran this command.

prime-run ./setup.AppImage

But the fps is around 15-20.

While if I run it normally like

./setup.AppImage

then it runs on intel integrated GPU and gives around 60 -70 fps.

Info Regarding System:
Device: Laptop

  • Installed Manjaro with proprietary drivers.
    CPU: Intel i5 9th gen
    DGPU: Nvidia GTX 1650
    Drivers:

:confused:

:+1: Welcome to Manjaro! :+1:

  1. Please read this:
    How to provide good information
    and press the three dots below your post and press the :pencil2: to give us more information so we can see what’s really going on.
    Now we know the symptom of the disease, but we need some more probing to know where the origin lies… :grin:

  2. An inxi --admin --verbosity=7 --filter --no-host --width would be the minimum required information for us to be able to help you. (Personally Identifiable Information like serial numbers and MAC addresses will be filtered out by the above command)
    Also, please copy-paste that output in-between 3 backticks ``` at the beginning and end of the code/text.

  3. What’s the output of both:

    glxgears
    prime-run glx-gears
    

    and letting it run for 2 minutes each time?

:+1:

P.S. If you want to notify me that you did provide this information, please :heart: this message and I’ll come back and have another look.

Why not download krunker from the AUR?

pamac build krunker

then search it on your installed programs for easy access.

Also,krunker is running on a web browser,I think the browser have problems running to the NVIDIA card so is better to have the iGPU running on this case,is not like krunker is a demanding game afterall lol.

inxi --admin --verbosity=7 --filter --no-host --width
https://0x0.st/-gy9.txt

glxgears

Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
344 frames in 5.0 seconds = 68.667 FPS
300 frames in 5.0 seconds = 59.998 FPS
300 frames in 5.0 seconds = 59.978 FPS
300 frames in 5.0 seconds = 59.976 FPS
300 frames in 5.0 seconds = 59.978 FPS
300 frames in 5.0 seconds = 59.973 FPS
300 frames in 5.0 seconds = 59.984 FPS
300 frames in 5.0 seconds = 59.983 FPS
300 frames in 5.0 seconds = 59.972 FPS
300 frames in 5.0 seconds = 59.981 FPS
300 frames in 5.0 seconds = 59.975 FPS
300 frames in 5.0 seconds = 59.976 FPS
300 frames in 5.0 seconds = 59.982 FPS
300 frames in 5.0 seconds = 59.974 FPS
300 frames in 5.0 seconds = 59.979 FPS
300 frames in 5.0 seconds = 59.984 FPS
300 frames in 5.0 seconds = 59.971 FPS
300 frames in 5.0 seconds = 59.961 FPS
300 frames in 5.0 seconds = 59.993 FPS
300 frames in 5.0 seconds = 59.979 FPS
300 frames in 5.0 seconds = 59.972 FPS
300 frames in 5.0 seconds = 59.983 FPS
300 frames in 5.0 seconds = 59.978 FPS
300 frames in 5.0 seconds = 59.977 FPS

prime-run glxgears

Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
301 frames in 5.0 seconds = 60.156 FPS
300 frames in 5.0 seconds = 59.968 FPS
300 frames in 5.0 seconds = 59.983 FPS
300 frames in 5.0 seconds = 59.972 FPS
300 frames in 5.0 seconds = 59.986 FPS
300 frames in 5.0 seconds = 59.931 FPS
301 frames in 5.0 seconds = 60.019 FPS
300 frames in 5.0 seconds = 59.974 FPS
300 frames in 5.0 seconds = 59.983 FPS
300 frames in 5.0 seconds = 59.978 FPS
300 frames in 5.0 seconds = 59.979 FPS
300 frames in 5.0 seconds = 59.972 FPS
300 frames in 5.0 seconds = 59.983 FPS
300 frames in 5.0 seconds = 59.976 FPS
300 frames in 5.0 seconds = 59.979 FPS
300 frames in 5.0 seconds = 59.977 FPS
300 frames in 5.0 seconds = 59.975 FPS
300 frames in 5.0 seconds = 59.984 FPS
300 frames in 5.0 seconds = 59.965 FPS
300 frames in 5.0 seconds = 59.954 FPS
301 frames in 5.0 seconds = 60.012 FPS
300 frames in 5.0 seconds = 59.978 FPS
300 frames in 5.0 seconds = 59.975 FPS
300 frames in 5.0 seconds = 59.981 FPS

my monitor has a refresh rate of 60hz only.
prime-run is working fine here :thinking:

The file used there is same. What can be the difference if I run it directly without integrating and if I integrate it and then run?

Maybe AppImage can not use the Nvidia graphic card properly because of the nature of such kind of packages (everything is “pre-made” all integrated within the package so maybe something within the package is not allowing Nvidia to properly work).

But yeah if there is program available in the AUR, you should prefer that to other methods in my opinion. Here is my recommendation from prefered to least prefered methods:

package available from repositories → AUR → Flatpak/AppImage → Snap

Sure I will try the AUR one. :+1:

Okay so I tried the AUR one.
image

It’s the same :confused: at the end it just adds a shortcut to menu. (check PKGBUILD)

ig it’s something related to AppImage specifically :thinking:

No, I agree with @XRaTiX

so you’re running the appimage or the AUR package on the dGPU, but not the browser itself, so you have to run both or neither on the dGPU, so you have 2 options:

  • use the iGPU only as both the iGPU and the dGPU’s performance both outperform your monitor anyway (both 300 fps on a 60Hz monitor so 60-70 fps in-game is more than enough for your hardware)
  • Optimize both the browser and the game to run on the dGPU.

:man_shrugging:

The problem here is because Krunker is a electron app,meaning you are just running a web browser that runs the krunker.io page,thats why I said maybe NVIDIA card running with prime-run has some problems.

You can avoid this problem if you install optimus-manager and change from hybrid mode to NVIDIA mode,but in my experience I have the same FPS as with iGPU.

2 Likes