-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnvidia-check.sh
executable file
·43 lines (36 loc) · 1008 Bytes
/
nvidia-check.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
echo "### Kernel command line"
cat /proc/cmdline
echo
echo "### Nvidia driver version"
cat /proc/driver/nvidia/version
echo
echo "### loaded nvidia modules"
lsmod | grep nvidia
echo
echo "### Modules parameters"
echo Module: nvidia
cat /proc/driver/nvidia/params
echo
declare -a modules=("nvidia_drm" "nvidia_modset" "nvidia_uvm")
for module in "${modules[@]}"; do
echo "$module:"
if [ -d "/sys/module/$module/parameters" ]; then
ls /sys/module/$module/parameters/ | while read param; do
echo -n " $param: "
cat /sys/module/$module/parameters/$param
done
fi
echo
done
echo "### Nvidia services status"
declare -a services=("nvidia-hibernate" "nvidia-resume" "nvidia-suspend" "nvidia-persistenced" "nvidia-powerd")
echo Services:
for service in "${services[@]}"; do
echo " $service: $(systemctl is-enabled ${service})"
done
echo
echo "### Nvidia services status"
if command -v rpm &> /dev/null; then
echo "$(rpm -qa | grep -E 'gnome-session|xorg')"
fi