summaryrefslogtreecommitdiff
path: root/config/chroot_local-hooks/gfxdetect
blob: d782203d5b94328caeecd07cc2f082689ea73ad0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
if [ -d /usr/lib/mesa-diverted ]; then
 update-alternatives --set glx /usr/lib/mesa-diverted
fi

if [ -f /etc/kde4/kdm/kdmrc ]; then
 sed -i 's|\(ServerArgsLocal=-br -nolisten tcp\).*|\1 -dpi 96|' /etc/kde4/kdm/kdmrc
 sed -i 's/.*\(TerminateServer=\).*/\1true/' /etc/kde4/kdm/kdmrc
fi

if [ -f /etc/lightdm/lightdm.conf ]; then
 sed -i 's|^#*\(xserver-command=X\).*|\1 -dpi 96|' /etc/lightdm/lightdm.conf
fi

if [ -f /usr/share/initramfs-tools/scripts/init-bottom/01gfxdetect ]; then
 if [ -f /etc/alternatives/glx--fglrx-blacklists-radeon.conf ]; then
  sed -i 's/.*\(blacklist\)/#\1/' /etc/alternatives/glx--fglrx-blacklists-radeon.conf
 fi
 if [ -f /etc/modprobe.d/nvidia-kernel-common.conf ]; then
  sed -i 's/.*\(blacklist\)/#\1/' /etc/modprobe.d/nvidia-kernel-common.conf
 fi
fi