#!/bin/sh

set -x

#G-sensor is not in scope, blacklist this module to avoid hybrid sleep hang on broadwell platform.
#LP: 1349655
cat > /etc/modprobe.d/blacklist-gsensor.conf <<EOF
blacklist lis3lv02d
EOF

#on Nagoya Arroyo4-2 I doubt that sometimes radeon driver module
#will interfere with vesafb and cause failback graphics error.
#Blacklist radeon and nouveau , intel machines will not affect.
#(LP: #1143898)
cat > /etc/modprobe.d/blacklist-opensource-graphics.conf <<EOF
blacklist radeon
blacklist lbm-radeon
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
options radeon modeset=0
EOF

#Blacklist amdgpu during installation/recovery, this will be unblacklisted after installing amdgpu-pro dkms
cat > /etc/modprobe.d/blacklist-amdgpu.conf <<EOF
blacklist amdgpu
EOF
