Update readme
This commit is contained in:
parent
ba86d20b2d
commit
7f2099b3ca
@ -16,7 +16,7 @@ GPU Screen Recorder only supports h264 and hevc codecs at the moment which means
|
|||||||
### AMD/Intel root permission
|
### AMD/Intel root permission
|
||||||
When recording a window under AMD/Intel no special user permission is required, however when recording a monitor the program needs root permission (to access KMS).
|
When recording a window under AMD/Intel no special user permission is required, however when recording a monitor the program needs root permission (to access KMS).
|
||||||
To make this safer, the part that needs root access has been moved to its own executable (to make it as small as possible) and a GUI sudo prompt is shown to run this executable as root. The executable is called "gsr-kms-server".
|
To make this safer, the part that needs root access has been moved to its own executable (to make it as small as possible) and a GUI sudo prompt is shown to run this executable as root. The executable is called "gsr-kms-server".
|
||||||
However this doesn't work if you want to start replay at startup for example. To fix this, run: `sudo setcap cap_sys_admin+ep /usr/bin/gsr-kms-server` if you have installed GPU Screen Recorder.
|
However this doesn't work if you want to start replay at startup for example. To fix this, run: `sudo setcap cap_sys_admin+ep /usr/bin/gsr-kms-server` if you have installed GPU Screen Recorder from source or AUR.
|
||||||
|
|
||||||
# Performance
|
# Performance
|
||||||
On a system with a i5 4690k CPU and a GTX 1080 GPU:\
|
On a system with a i5 4690k CPU and a GTX 1080 GPU:\
|
||||||
|
@ -167,28 +167,29 @@ static int kms_get_plane_ids(gsr_drm *drm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(uint32_t i = 0; i < planes->count_planes && drm->num_plane_ids < GSR_KMS_MAX_PLANES; ++i) {
|
for(uint32_t i = 0; i < planes->count_planes && drm->num_plane_ids < GSR_KMS_MAX_PLANES; ++i) {
|
||||||
|
drmModeFB2Ptr drmfb = NULL;
|
||||||
drmModePlanePtr plane = drmModeGetPlane(drm->drmfd, planes->planes[i]);
|
drmModePlanePtr plane = drmModeGetPlane(drm->drmfd, planes->planes[i]);
|
||||||
if(!plane) {
|
if(!plane) {
|
||||||
fprintf(stderr, "kms server warning: failed to get drmModePlanePtr for plane %#x: %s (%d)\n", planes->planes[i], strerror(errno), errno);
|
fprintf(stderr, "kms server warning: failed to get drmModePlanePtr for plane %#x: %s (%d)\n", planes->planes[i], strerror(errno), errno);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!plane->fb_id) {
|
if(!plane->fb_id)
|
||||||
drmModeFreePlane(plane);
|
goto next;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(plane_is_cursor_plane(drm->drmfd, plane->plane_id))
|
if(plane_is_cursor_plane(drm->drmfd, plane->plane_id))
|
||||||
continue;
|
goto next;
|
||||||
|
|
||||||
// TODO: Fallback to getfb(1)?
|
// TODO: Fallback to getfb(1)?
|
||||||
drmModeFB2Ptr drmfb = drmModeGetFB2(drm->drmfd, plane->fb_id);
|
drmfb = drmModeGetFB2(drm->drmfd, plane->fb_id);
|
||||||
if(drmfb) {
|
if(drmfb) {
|
||||||
drm->plane_ids[drm->num_plane_ids] = plane->plane_id;
|
drm->plane_ids[drm->num_plane_ids] = plane->plane_id;
|
||||||
drm->connector_ids[drm->num_plane_ids] = get_connector_by_crtc_id(&c2crtc_map, plane->crtc_id);
|
drm->connector_ids[drm->num_plane_ids] = get_connector_by_crtc_id(&c2crtc_map, plane->crtc_id);
|
||||||
++drm->num_plane_ids;
|
++drm->num_plane_ids;
|
||||||
drmModeFreeFB2(drmfb);
|
drmModeFreeFB2(drmfb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
next:
|
||||||
drmModeFreePlane(plane);
|
drmModeFreePlane(plane);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user