## Description
Adds new `-device` argument for gpu-screen-recorder which allows
specifying a GPU to use (by `/dev/dri/cardN` path)
This fixes an issue with multi-gpu systems when device such as
`/dev/dri/card1` is passed through but gpu-screen-recorder will still
try to access `/dev/dri/card0` for capturing and failing.
Added relevant bits to `gpu_helpers.sh` to find the card path - I assume
all modern modesetting drivers will have a `/drm/` path that tells the
card number. If not, the script will fall back to gpu-screen-recorder's
own method of finding the card.
Edit: Forgot to mention patches are now copied to /tmp/ rather than
/etc/
Co-authored-by: Kristian Ollikainen <DatCaptainHorse@users.noreply.github.com>
## Description
### This is a DRAFT - Changes will be discussed and made upon requests!
In nutshell, this adds support for running Nestri with Intel and AMD
GPU's. Both integrated and dedicated.
It took a few days to find a trick for having output without dummy plugs
or connected displays, but I think I got it.
`gpu-screen-recorder` requires a custom patch to skip the check for
connected displays (as we're using a xrandr workaround which makes them
stay "unconnected")
Most likely fixes#68
### Changes
The NVIDIA sections have been split in their own code branches since
there's some NVIDIA specific things I didn't feel approriate to poke
more than necessary for the goal of this PR.
Added a script with helper functions related to GPU discovery and
gathering some basic info off from them (note: it might be better to
declare the helper script arrays outside it's initially run function).
The helper scripts rely on `lshw`.
NVIDIA code was slightly adjusted to use the bus-id's provided by the
helper functions to have some code re-use.
Cleaned up few things on the side.
---------
Co-authored-by: Kristian Ollikainen <DatCaptainHorse@users.noreply.github.com>
Co-authored-by: Wanjohi <71614375+wanjohiryan@users.noreply.github.com>