9 |
# - Get information about enabled driver modules |
# - Get information about enabled driver modules |
10 |
# - Check that the loaded modules are correct |
# - Check that the loaded modules are correct |
11 |
# |
# |
12 |
|
# Note that drivers not known by this script are handled normally, i.e. |
13 |
|
# loaded automatically as udev normally would've. |
14 |
|
# |
15 |
# Licensed under terms of GPLv2 or later. |
# Licensed under terms of GPLv2 or later. |
16 |
# |
# |
17 |
# When updating, check: |
# When updating, check: |
20 |
# - check_dkms_status function |
# - check_dkms_status function |
21 |
# |
# |
22 |
|
|
23 |
|
# DEBUG_DISPLAY_DRIVER_HELPER=yes |
24 |
|
|
25 |
if [ -n "$DEBUG_DISPLAY_DRIVER_HELPER" ]; then |
if [ -n "$DEBUG_DISPLAY_DRIVER_HELPER" ]; then |
26 |
echo "$(date) $*" >> /dev/ddh_debug |
echo "$(date) $*" >> /dev/ddh_debug |
27 |
exec 2>>/dev/ddh_debug |
exec 2>>/dev/ddh_debug |
201 |
} |
} |
202 |
|
|
203 |
# Note: no /usr |
# Note: no /usr |
204 |
# parameter 1: xorg driver |
# parameter 1: KMS module or xorg driver |
205 |
# parameter 2: 1 the check if the driver is explicitely enabled |
# parameter 2: 1 - check if the driver is explicitely enabled |
206 |
# 0 means that check only for conflicts |
# 0 - check only for conflicts |
207 |
check_xorg() { |
check_xorg() { |
208 |
local driver="$1" |
local driver="$1" |
209 |
local explicit_only="$2" |
local explicit_only="$2" |
251 |
# Load the driver for the specified modalias, if configured. |
# Load the driver for the specified modalias, if configured. |
252 |
# Note: no /usr |
# Note: no /usr |
253 |
load_driver() { |
load_driver() { |
254 |
|
local modalias="$1" |
255 |
local modulename |
local modulename |
256 |
local load_default=1 |
local load_default=1 |
257 |
|
|
258 |
for modulename in $(/sbin/modprobe -Rq "$1"); do |
for modulename in $(/sbin/modprobe -Rq "$modalias"); do |
259 |
check_driver "$modulename" |
check_driver "$modulename" |
260 |
case $? in |
case $? in |
261 |
1) # a driver which needs handling by this script matches |
1) # a driver which needs handling by this script matches |
283 |
|
|
284 |
# no specially handled modules were loaded, so load all modules normally |
# no specially handled modules were loaded, so load all modules normally |
285 |
# unless $load_default was set above |
# unless $load_default was set above |
286 |
[ -z "$load_default" ] || /sbin/modprobe -b "$1" |
[ -z "$load_default" ] || /sbin/modprobe -b "$modalias" |
287 |
} |
} |
288 |
|
|
289 |
is_kms_allowed() { |
is_kms_allowed() { |
384 |
Does --check-dkms-status and --check-loaded. |
Does --check-dkms-status and --check-loaded. |
385 |
|
|
386 |
--check-loaded-strict |
--check-loaded-strict |
387 |
As --check-loaded, and consider ambigious cases (e.g. nvidia where |
As --check-loaded, and consider ambiguous cases (e.g. nvidia where |
388 |
we can't detect if the loaded driver has the correct version) as |
we can't detect if the loaded driver has the correct version) as |
389 |
failure. |
failure. |
390 |
|
|