summaryrefslogtreecommitdiff
path: root/config/chroot_local-includes/lib/live/config/9026-intel-cfg
blob: f138e0e39adcdd5283195ea8222bf5e05826df72 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh

Intelcfg ()
{
	# Checking if configured
	if [ -e /var/lib/live/config/intelcfg ]
	then
		return
	fi
	echo -n " intel-cfg"
	Configure_intelcfg
}
Configure_intelcfg ()
{
	# Boot parameters can be acted up either this way...
	if [ -x /var/lib/dpkg/info/xserver-xorg-video-intel.postinst ]
	then
		if grep -qs "intelcfg" /proc/cmdline
		then
			#
			mkdir -p /etc/X11/xorg.conf.d
cat > /etc/X11/xorg.conf.d/25-xorg-intel.conf <<"EOF"
Section "Device"
    Identifier "Intel"
    Driver "intel"
    #Option "AccelMethod" "uxa"
    #Option "DRI" "2"
EndSection
EOF
			if grep -qs "intelcfgold" /proc/cmdline
			then
				#
cat > /etc/X11/xorg.conf.d/25-xorg-intel.conf <<"EOF"
Section "Device"
    Identifier "Intel"
    Driver "intel"
    Option "AccelMethod" "uxa"
    #Option "DRI" "2"
EndSection
EOF
			fi
		fi
	fi
# workaround radeon
if grep -qs "radeoncfg" /proc/cmdline
		then
			#
			mkdir -p /etc/X11/xorg.conf.d
cat > /etc/X11/xorg.conf.d/25-xorg-radeon.conf <<"EOF"
Section "Device"
    Identifier "DeviceRadeon"
    Driver "radeon"
    Option "AccelMethod" "glamor"
    Option "DRI" "3"
EndSection
EOF
fi
	# Creating state file
	touch /var/lib/live/config/intelcfg
}

Intelcfg