Tags
1212tx, 6470, acpi, amd, auto, bridge, call, cpu, debian, disable, discrete, dual, g4, gpu, graphic, high, hot, hp, intel, linux, off, open, pavilion, radeon, redhat, sandy, script, start, suse, switch, switchable, switcheroo, temp, termperature, turn, vga

Linux is my fave Operating System, since I’m in collage until now, in the office, hahaha. From Knoppix, Ubuntu, Backtrack, OpenSUSE, Debian are running well enough in my (old) laptop, Acer Aspire 4520.
But when I was working in the office with the ‘borrowed’ laptop (thanks for beautiful gaming laptop
). There is a serious issue! The heat that burns my left hand palm!!
Yup my (office) laptop temp is too high:
$ sensors acpitz-virtual-0 Adapter: Virtual device temp1: +90.0°C radeon-pci-0100 Adapter: PCI adapter temp1: +91.0°C coretemp-isa-0000 Adapter: ISA adapter Physical id 0: +90.0°C (high = +86.0°C, crit = +100.0°C) Core 0: +90.0°C (high = +86.0°C, crit = +100.0°C) Core 1: +90.0°C (high = +86.0°C, crit = +100.0°C)
Whooo! 90.0°C !! the heat is generated by thermal ventilation. Owh ya, I almost forget, the laptop is HP Pavilion g4 1212tx with dual switchable VGA. Running well in Wind*ws, but not well in Linux, that’s HOT!!
)
Enough with talk!!
Let’s messing around, quickly. I’m using acpi_call method, another method could be vga_switcheroo, i’m using acpi_call cause i’m not using ‘beautiful’ windows manager, just fluxbox/mate
1. Install dkms, git and dev package:
sudo apt-get install dkms git build-essential linux-headers-$(uname -r)
2. Clone acpi_call repo by git and copy it to system
git clone http://github.com/mkottman/acpi_call.git mkdir /usr/src/acpi_call-0.0.1 cp -rp acpi_call-0.0.1/* /usr/src/acpi_call-0.0.1
3. Create a new file dkms.conf
nano /usr/src/acpi_call-0.0.1/dkms.conf
paste this:
PACKAGE_NAME="acpi_call" PACKAGE_VERSION="0.0.1" CLEAN="make clean" BUILT_MODULE_NAME[0]="acpi_call" DEST_MODULE_NAME[0]="acpi_call" MAKE[0]="make IGNORE_CC_MISMATCH=1 KDIR=$kernel_source_dir PWD=$dkms_tree/acpi_call/0.0.1/build" DEST_MODULE_LOCATION[0]="/kernel/drivers/acpi" AUTOINSTALL="yes"
4. Edit/replace Makefile
nano /usr/src/acpi_call-0.0.1/Makefile
paste this:
obj-m := acpi_call.o KVERSION := $(shell uname -r) KDIR := /lib/modules/$(KVERSION)/build PWD := $(shell pwd) default: $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules clean: rm acpi_call.mod.o acpi_call.o acpi_call.ko install: $(MAKE) -C $(KDIR) M=$(PWD) modules_install load: -/sbin/rmmod acpi_call /sbin/insmod acpi_call.ko
5. Install module to dkms
add the module
sudo dkms add -m acpi_call -v 0.0.1
build it
sudo dkms build -m acpi_call -v 0.0.1
last, install it
sudo dkms install -m acpi_call -v 0.0.1
6. Load & check the module that installed
sudo modprobe acpi_call modinfo acpi_call
7. Test it
sudo chmod +x /usr/src/acpi_call-0.0.1/test_off.sh /usr/src/acpi_call-0.0.1/test_off.sh
The output is something like this
Trying \_SB.PCI0.P0P1.VGA._OFF: failed Trying \_SB.PCI0.P0P2.VGA._OFF: failed Trying \_SB_.PCI0.OVGA.ATPX: failed Trying \_SB_.PCI0.OVGA.XTPX: failed Trying \_SB.PCI0.P0P3.PEGP._OFF: works!
Check VGA states
lspci | grep VGA
The output is something like this
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Caicos [Radeon HD 6400M/7400M Series] (rev ff)
*important part is my Radeon GPU state : (rev ff) that means the GPU is now disconnected
8. Make it autostart with system
Load acpi_call module at startup
sudo echo acpi_call >> /etc/modules
Create autostart script in /etc/init.d
sudo nano /etc/init.d/dis_off
*”dis_off” is the name of the script, name you want
paste this:
#!/bin/bash
### BEGIN INIT INFO
# Provides: script_name_you_want
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
# /etc/init.d/script_name_you_want
#
# Carry out specific functions when asked to by the system
case "$1" in
start)
echo "Disabling Discrete VGA "
/usr/src/acpi_call-0.0.1/test_off.sh
;;
*)
echo "Usage: /etc/init.d/script_name_you_want {start}"
exit 1
;;
esac
exit 0
Add symbolic links to be automatically executed by system
update-rc.d dis_off defaults
if we want to disable it from being autostart
update-rc.d dis_off remove
Thanks
Source:
http://garyservin.wordpress.com/2012/01/06/disabling-discrete-gpu-in-debian-gnulinux-wheezy/ with a little fix on script and *nix trick
great script it helped me a lot, after trying vga_switcheroo without success on my sony vaio/SB turning debian wheezy