[BUG] Recordere uses iGPU instead of dGPU
Closed this issue · 2 comments
Describe the bug
I cannot run gpu-screen-recorder on my NVIDIA dGPU. It defaults to my (considerably slower) Intel iGPU. This comes at a non-negligible performance cost when running with certain games. Other applications don't have any issue using my dGPU.
Quite similar to an issue mentioned here.
To Reproduce
I launch it by running gpu-screen-recorder -w DP-4 -f 60 -r 60 -c mp4 -o $HOME/Videos -a "$(pactl get-default-sink).monitor|$(pactl get-default-source)"
.
The issue also occurs with gpu-screen-recorder-gtk.
Screenshots
N/A
Desktop (please complete the following information):
- X11 or Wayland: Wayland
- Desktop environment/Window Manager: KDE Plasma
- Distro: Arch
- GPU: Intel Iris Xe (iGPU) and NVIDIA GeForce RTX 4070 (dGPU)
- Version (latest flatpak version, aur or source): AUR
Additional context
When I run the GUI app, the window is titled "GPU Screen Recorder | Running on Intel". Also, here is the output of gpu-screen-recorder --info
:
section=system_info
display_server wayland
section=gpu_info
vendor intel
section=video_codecs
h264
h264_software
hevc
hevc_hdr
vp9
section=capture_options
eDP-1 1920x1200
DP-4 1920x1080
portal
Here is my log.txt.
The effects of this issue are most noticeable with Team Fortress 2. It typically runs at 144-200 FPS, but with this software running on the iGPU it can drop below 100 (I know, woe is me). Minecraft with shaders doesn't seem to take any FPS hit at all, however.
I've never used OBS until now, so I can't provide a great comparison. I tested and it also seems to be using the iGPU, but again I'm not very familiar with OBS so I may have configured it wrong.
- I played the video with the command
mpv --no-config video.mp4
(if applicable) - I use a laptop with an integrated GPU and a dedicated GPU
This is not a bug. Your monitor is being displayed with your intel iGPU so thats where recording has to take place as well. But looking at the log.txt file your system doesn't even report that it has an nvidia gpu? did you create that log.txt file on wayland or x11? it should be visible on wayland, but not x11.
There are some things you can do to fix the performance issue:
- Run the game with prime-run. Then the game will run on your nvidia gpu and your intel iGPU will be free to record without heavy load on it.
- If you already run the game with prime-run then also run gpu screen recorder with prime-run. It may be possible to capture your screen with the desktop portal option then with your nvidia gpu. This option is only available on Wayland.
- Configure your system to use your nvidia gpu everywhere, including displaying your monitors. In other words, configure your system to run wayland with your nvidia gpu. Or if you want to use x11 configure your xorg.conf file.
Thanks for the quick reply. I created my log.txt on Wayland.
My system definitely utilizes the dGPU; for example, glmark2 and glxinfo both specify that they're running on NVIDIA, and nvtop shows both GPUs being used. lspci identifies both GPUs as well. I am fairly new to all this, but I'm slowly figuring it out. My system mostly works, but I've probably messed up the configuration somewhere.
I'll look into your suggestions and try to figure it out myself. I truly appreciate the help.