summarylogtreecommitdiffstats
path: root/nvidia-full-beta.install
blob: df01ec362f9f004b9f6275b2b4db9b13c8f683c7 (plain)
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
44
45
46
47
48
49
_depmod() {
    _extramodules='extramodules-4.3-ARCH'

    # Update module dependencies
    depmod $(cat /usr/lib/modules/$_extramodules/version)
}

_rmmod() {
    # Try unloading
    if lsmod | grep -q nvidia; then
        rmmod nvidia
    fi

    # What?
    if [[ $? != 0 ]]; then
        # X running?
        if pidof Xorg >/dev/null; then
            echo ":: Please reboot or exit X first."
        fi
    fi
}

post_install() {
    _depmod

    # X running?
    if pidof Xorg >/dev/null; then
        echo ":: Please reboot or exit X to unload the current module."
    fi

	echo ":: NOTE: You may want to stick to .27: https://devtalk.nvidia.com/default/topic/950647/linux/black-screen-with-367-35/"
}

post_upgrade() {
    _depmod

    # Not rebuilding?
    if (( $(vercmp $1 $2) != 0 )); then
        _rmmod
    fi
	
	echo ":: NOTE: You might not want to clear Pacman cache from .27: https://devtalk.nvidia.com/default/topic/950647/linux/black-screen-with-367-35/"
}

post_remove() {
    _depmod

    _rmmod
}