Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

mhwd-gpu: Do not configure Xorg #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions scripts/mhwd-gpu
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#!/bin/bash

# set -x

PARAM=$#
MHWDXORGCONF="/etc/X11/xorg.conf.d/90-mhwd.conf"
CHECKCONFIG="false"
SETXORGCONF=""
SETMOD=""
ARCH=$(uname -m)
MODULES_LOAD="/etc/modules-load.d"
Expand All @@ -21,10 +16,6 @@ set_modules() {
for module in $2
do
echo "blacklist ${module}" >> "/etc/modprobe.d/mhwd-gpu.conf"
# Unload module if X is not running
if [ ! "$(pgrep X)" ]; then
rmmod -f ${module}
fi
done

echo "##" > "${MODULES_LOAD}/mhwd-gpu.conf"
Expand All @@ -42,21 +33,6 @@ set_modules() {
done
}

# param 1: Xorg configuration file
set_xorg()
{
if [ -e "${MHWDXORGCONF}" ]; then
rm "${MHWDXORGCONF}"
fi

if [ -e "$1" ]; then
ln -sf "$1" "${MHWDXORGCONF}"
echo "xorg configuration file: '$1'"
else
echo "warning: could not find '$1'!"
fi
}

print_link_destination_if_exists()
{
if [ -e "$1" ]; then
Expand All @@ -79,8 +55,6 @@ print_help()
echo ""
echo " --help show help"
echo " --status show current status"
echo " --check check for invalid symlinks and repair"
echo " --setxorg [PATH] set xorg configuration file"
echo " --setmod [nvidia/catalyst] set modules"
echo ""
}
Expand All @@ -100,13 +74,6 @@ for (( I=1; $I <= $PARAM; I++ ));do
print_status
exit 0
;;
--check)
CHECKCONFIG="true"
;;
--setxorg)
shift
SETXORGCONF="$1"
;;
--setmod)
shift
SETMOD="$1"
Expand Down Expand Up @@ -138,18 +105,3 @@ elif [ "${SETMOD}" != "" ]; then
echo "error: invalid argument '${SETMOD}'"
exit 1
fi

# Set xorg configuration file
if [ "${SETXORGCONF}" != "" ]; then
set_xorg "${SETXORGCONF}"
fi

# Check config
if [ "${CHECKCONFIG}" == "true" ]; then
if [ -L "${MHWDXORGCONF}" -a ! -e "${MHWDXORGCONF}" ]; then
echo "'${MHWDXORGCONF}' symlink is invalid! Removing it..."
rm "${MHWDXORGCONF}"
elif [ -e "${MHWDXORGCONF}" ]; then
echo "xorg configuration symlink valid..."
fi
fi