Edit: The script has been improved and the corresponding text changed, thanks to the help from red-flex. (13/02/2011)
Edit No. 2: I updated the script, more details in message #1 (16/02/2011)
Hi all.
After some 'experiments' I found somewhat a 'solution' for switching between the cards. However, you need to stay with the 2.6.32 Kernel and you need to install the restricted drivers for the nvidia again (only one time) after you have booted with the 2.6.32 Kernel. All seems to work nicely.
So, follow these steps:
1. Instructions of mtron (message #3): http://ubuntuforums.org/showpost.php...93&postcount=3 (including step 3 but then stop)
2. Boot with the 2.6.32 Kernel and install via internet the restricted drivers for the nvidia card.
3. Use the ones below. Check all paths, nvidia version numbers, etc.
*************** Start ***************
Here is what I always use for switching to the intel card before a boot - it is basically a modified script from mtron. (execute: sudo Switch_intel.sh)
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 /home/cle/Switch
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
# Set intel xorg.conf
echo ""
echo "A xorg.conf file has been prepared such that the Intel chip can be used for X11."
cp /etc/X11/xorg.conf.intel /etc/X11/xorg.conf
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
echo ""
echo "Finished! Push a button ..."
read eingabe
Replace 'path_to_acpi_call' with the correct path.
Here is what I use for switching to the nvidia card before a boot (execute: sudo Switch_nvidia.sh)
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 /home/cle/Switch
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
# Set the intel xorg.conf
echo ""
echo "A xorg.conf file has been prepared such that the Nvidia chip can be used for X11."
cp /etc/X11/xorg.conf_nvidia /etc/X11/xorg.conf
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
You need to search the right name for the lib 'libglx.so...' and 'nvidia_drv.so' in the /usr/lib/nvidia-current/xorg/ directory.
The xorg.files can be taken from mtron (see above).
********* That's it *********
Notes (old, more details in message #1)
1. Note that you have to execute always the script 'Switch_intel.sh' whenever you want to boot and use the intel card. In the case of the nvidia card you must execute the script 'Switch_nvidia' only once for all other following 'future boots' with the nvida card.
2. In intel-mode: If the 1015PN is put to sleep and afterwards waken up (closing and opening the 1015PN), the nvidia must not be switched off!
3. The scripts are written such you can call them from a starter of a panel. Don't forget to make the scripts executable.
4. There is some output text, which comments all operations and can be used to see what the system is doing.
5. HDMI is perfectly working with Nvidia.
I hope that all this helps.
Cheers.
Bookmarks