~alextu/+git/ubuntu-drivers-common:metapackages

Last commit made on 2019-09-12
Get this branch:
git clone -b metapackages https://git.launchpad.net/~alextu/+git/ubuntu-drivers-common
Only Alex Tu can upload to this branch. If you are Alex Tu please log in for upload directions.

Branch merges

Branch information

Name:
metapackages
Repository:
lp:~alextu/+git/ubuntu-drivers-common

Recent commits

2578da2... by Alberto Milone

Pylint fixes

c1f51bb... by Alberto Milone

Add DKMS fallback

1c45530... by Alberto Milone

Add accessory get_linux functions

FIXME: complete

06fd1a3... by Alberto Milone

Fix linux metapackage detection

This was meant to be driven by the latest kernel version
But it was only partially implemented.

Complete the implementation and update the tests.

3788643... by Alberto Milone

UbuntuDrivers/kerneldetection.py: fix condition

55f0163... by Alberto Milone

gpu-manager.c: drop prime_is_action_on() and update the description

31d5588... by Daniel Dadap

gpu-manager: increase string storage on stack for path names

gcc emits the following warnings when building up path names:

gpu-manager.c: In function ‘count_connected_outputs’:
gpu-manager.c:919:31: warning: ‘%s’ directive writing up to 255 bytes into a region of size 49 [-Wformat-overflow=]
             sprintf(name, "%s/%s/status", drm_dir, dp->d_name);
                               ^~
gpu-manager.c:919:13: note: ‘sprintf’ output 9 or more bytes (assuming 264) into a destination of size 50
             sprintf(name, "%s/%s/status", drm_dir, dp->d_name);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpu-manager.c: In function ‘has_driver_connected_outputs’:
gpu-manager.c:957:42: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 19 [-Wformat-truncation=]
         snprintf(path, sizeof(path), "%s/%s", dri_dir, dir_entry->d_name);
                                          ^~
gpu-manager.c:957:9: note: ‘snprintf’ output 2 or more bytes (assuming 257) into a destination of size 20
         snprintf(path, sizeof(path), "%s/%s", dri_dir, dir_entry->d_name);

These warnings are based on assuming the maximum possible length for the
d_name field in the struct dirent records. The allocated space is likely
sufficient for the directory names that are expected to occur, but it
doesn't hurt to allocate a few hundred more bytes to definitively prevent
overflowing the buffer.

Rather than accommodating just the maximum length of d_name, just allocate
PATH_MAX bytes for the relevant path names, in case other aspects of the
format string change in the future. As a measure of additional paranoia,
use snprintf for both paths and explicitly NUL-terminate the buffer just
in case the format string and its arguments somehow manage to evaluate to
a string longer than PATH_MAX.

Signed-off-by: Daniel Dadap <email address hidden>
Reviewed-by: Aaron Plattner <email address hidden>

45d95e4... by Daniel Dadap

gpu-manager: enable power management in NVIDIA on-demand mode

The NVIDIA driver can suspend the GPU when it's being used as a
PRIME render offload source and it isn't actively being used.
disable_power_management() sets the NVIDIA GPU's power/control
mode to "on", which prevents the GPU from suspending when it
might otherwise be possible to do so.

Signed-off-by: Daniel Dadap <email address hidden>
Reviewed-by: Aaron Plattner <email address hidden>

282fd61... by Alberto Milone

Start work on 1:0.7.6

2253921... by Alberto Milone

Release 1:0.7.5