You will have to save the following script so that it can switch to Intel card before it gets boot.
Code:
#!/bin/bash
# Enable intel glx on Asus EeePC 1015pn
# Check if we are root, else exit
if [[ $EUID -ne 0 ]]; then
echo "This script needs to be run as root"
exit 1
fi
# is the acpi module loaded?
if lsmod | grep -q acpi_call; then
echo "ACPI does not need to be loaded."
else
echo "ACPI needs to be loaded."
cd path_to_acpi_call
insmod acpi_call.ko
sleep 3
fi
# The call for the next time
echo ""
echo "Mode 1 is now set: After the next boot only the Intel chip is visible."
echo "\OSGS 0x01" > /proc/acpi/call
echo ""
echo "The 'update-alternatives' has been set"
update-alternatives --set gl_conf /usr/lib/mesa/ld.so.conf
ldconfig
# Very important: fiddle with glx and libgl
if [ -f "/usr/lib/xorg/extra-modules/libglx.so" ]
then
echo ""
echo "The library 'libglx.so' has been deleted."
sudo rm /usr/lib/xorg/extra-modules/libglx.so
else
echo ""
echo "The library 'libglx.so' doesn't exist and must therefore not be deleted."
fi
here also you have tor replace the 'path_to_acpi_call' with correct path.
In order to switch nvidia card before the boot process you will need to get the following script.
Code:
#!/bin/bash
# Disabe Intel Chip and enable nvidia on Asus EeePC 1015pn
# Check if we are root, else exit
if [[ $EUID -ne 0 ]]; then
echo "This script needs to be run as root"
exit 1
fi
# is the acpi module loaded?
if lsmod | grep -q acpi_call; then
echo "ACPI does not need to be loaded."
else
echo "ACPI needs to be loaded."
cd path_to_acpi_call
insmod acpi_call.ko
sleep 3
fi
# The system is prepared such that the nvidia card is onlt visible
echo ""
echo "Mode 2 is now set: After the next boot only the Nvidia chip is visible."
echo "\OSGS 0x02" > /proc/acpi/call
# Copy the libglx file into usr/lib/xorg/extra-modules/
# Without doing this, compiz does not work properly (I have no idea why)
if ! [ -f "/usr/lib/xorg/extra-modules/libglx.so.260.19.06" ]
then
cp /usr/lib/nvidia-current/xorg/libglx.so.260.19.06 /usr/lib/xorg/extra-modules/
chmod 644 /usr/lib/xorg/extra-modules/libglx.so.260.19.06
echo ""
echo "The libglx has been copied"
fi
# Copy also the nvidia_drv.so file into usr/lib/xorg/extra-modules/
# As above: compiz needs this (I have no idea why)
if ! [ -f "/usr/lib/xorg/extra-modules/nvidia_drv.so" ]
then
cp /usr/lib/nvidia-current/xorg/nvidia_drv.so /usr/lib/xorg/extra-modules/
chmod 644 /usr/lib/xorg/extra-modules/nvidia_drv.so
echo ""
echo "The nvidia_drv.so has been copied"
fi
update-alternatives --set gl_conf /usr/lib/nvidia-current/ld.so.conf
ldconfig
echo ""
echo "update-alternatives ... and ... ldconfig"
# Very important: The link 'libglx.so' needs to be created
if ! [ -f "/usr/lib/xorg/extra-modules/libglx.so" ]
then
ln -s /usr/lib/xorg/extra-modules/libglx.so.260.19.06 /usr/lib/xorg/extra-modules/libglx.so
echo ""
echo "The libglx link has been set"
else
echo ""
echo "The libglx link already exists"
fi
echo ""
echo "Push a button ..."
read eingabe
Bookmarks