Page 1 of 9 123 ... LastLast
Results 1 to 10 of 83

Thread: Setup Guide: ASUS U36Jc - Ubuntu 11.04 Alpha3 64-bit

  1. #1
    Join Date
    May 2008
    Beans
    109

    Lightbulb Setup Guide: ASUS U36Jc - Ubuntu 11.04 64-bit

    I know there are other guides out there for the U36Jc but I thought I'd post this up to help those who really want to be on the bleeding edge running Ubuntu 11.04.

    The guide applies to 64-bit versions but should also apply for 32-bit should you wish to run it.

    ASUS U36Jc Setup Guide - Ubuntu 11.04 64-bit

    * Reduce Hard Disk Power Cycling

    If you are running the standard SSH/HDD then you will want to reduce the frequency of head parking so as to not prematurely wear out the drive. You can do this by running:

    Code:
    gksu gedit /etc/hdparm.conf
    Adding in the following text...

    <INSERT BELOW TEXT>

    Code:
    /dev/sda {
    	    apm = 254
    	    apm_battery = 254
    	}
    * Enable Palm Detection & Horizontal Scrolling on Touchpad

    You can enable two-finger scrolling on the touchpad by going to:

    Code:
    System > Preferences > Mouse > Touchpad > Scrolling > Two Finger Scrolling [check]
    Additionally we can enable horizontal scrolling and palm detection by editing the following file:

    Code:
    gksu gedit /usr/share/X11/xorg.conf.d/50-synaptics.conf
    Inserting in the following text before EndSection:

    <INSERT BELOW TEXT>

    Code:
    Option "HorizTwoFingerScroll" "on"
    Option "PalmDetect" "on"
    * Disable NVidia GPU/NVidia Optimus

    ------------------------------------------------------------------------------------------------------------------------------------------------------------

    Important Note: Under NO circumstances should you install the nvidia restricted drivers!

    Due to the design of optimus, the NVidia card is unable to be utilised in Linux with the nVidia restricted drivers. People are currently working on enabling Optimus through the use of the open source nVidia drivers, see here for more details [Warning: Links below are very experimental, do not attempt if you are not an expert]:

    http://linux-hybrid-graphics.blogspo...tops-with.html

    https://github.com/awilliam/asus-switcheroo

    The guide however does not mess with extremely-alpha software (as linked above) and instead will allow you to run only on the Intel GPU when using Ubuntu, thus saving power by having the NVidia GPU switched off.

    If you are trying to disable Optimus on a laptop other than the U36Jc, please read this post:

    http://ubuntuforums.org/showpost.php...51&postcount=5
    ------------------------------------------------------------------------------------------------------------------------------------------------------------

    The ASUS U36Jc uses the NVidia Optimus system of switchable graphics. Unfortunately, because NVidia are absolute champions (and because of the hardware design of Optimus/way it functions), this system will likely never be officially supported by NVidia on Linux.

    As a result, the NVidia GPU is constantly switched on - although due to the design of Optimus - it is not able to be used. This is bad for battery life since your laptop will be using another ~6W just idling.

    So what we need to do is switch off the NVidia GPU so that we can reclaim our battery life whilst making use of the Intel GPU.

    So let's get started... make a hidden directory in your home directory and change into it by entering:

    Code:
    mkdir ~/.optimus
    cd ~/.optimus/
    Next, let's install git so we can grab the acpi_call module that will let us switch the NVidia GPU off...

    Code:
    sudo apt-get install git
    git clone http://github.com/mkottman/acpi_call.git
    Once that's downloaded, let's change into the acpi call directory and make the module.

    Code:
    cd acpi_call/
    make
    Now let's insert the module and copy it to the acpi folder for our kernel...

    Code:
    sudo insmod ./acpi_call.ko
    Run this command and take note of the kernel version number...

    Code:
    uname -r
    Copy the module in and run depmod...

    Code:
    sudo cp acpi_call.ko /lib/modules/<UNAME -R VALUE>/kernel/drivers/acpi/
    sudo depmod
    Now let's edit /etc/modules so that it's loaded on startup...

    Code:
    gksu gedit /etc/modules
    <INSERT BELOW TEXT>

    Code:
    acpi_call
    Now that we've done all of that, let's make a "service" that can be started/stopped to turn the GPU on and off for us.

    Code:
    gksu gedit /etc/init.d/optimusoff
    <INSERT BELOW TEXT>

    Code:
    #! /bin/sh
    ### BEGIN INIT INFO
    # Provides: 		optimusoff
    # Required-Start: 	$local_fs $syslog
    # Required-Stop: 	$local_fs $syslog
    # Default-Start: 	2 3 4 5
    # Default-Stop: 	0 1 6
    # Short-Description: 	Disables/Enables the NVidia graphics card
    #			within the NVidia Optimus system
    #			
    #			Modified for the U36Jc and Ubuntu 11.04
    #			using details from
    #			
    #			http://robbyx.net/blog/?p=190
    ### END INIT INFO
     
    . /lib/lsb/init-functions
     
    set -e
     
    case "$1" in
    start)
    #
    echo '\_SB.PCI0.PEG1.GFX0._OFF' > /proc/acpi/call
    ;;
    stop)
    echo '\_SB.PCI0.PEG1.GFX0._ON' > /proc/acpi/call
    ;;
    *)
    echo '\_SB.PCI0.PEG1.GFX0._OFF' > /proc/acpi/call
    N=/etc/init.d/optimusoff
    echo "Usage: $N {start|stop}\nBy default, 'start' is executed.\n" >&2
    exit 1
    ;;
    esac
     
    exit 0
    Now let's make it executable and run at startup.

    Code:
    sudo update-rc.d optimusoff defaults 98 02
    sudo chmod a+x /etc/init.d/optimusoff
    Now's a good time to make sure it works... let's check our current power consumption. Make sure the laptop is running on battery before testing this - otherwise your readings will not be correct.

    Code:
    grep rate /proc/acpi/battery/BAT0/state
    You should get a value similar to this...

    present rate: 15148 mW
    OK so now let's see if we can turn the NVidia GPU off and check how much power we're saving...

    Code:
    sudo service optimusoff start
    Now let's check the power usage again...

    Code:
    grep rate /proc/acpi/battery/BAT0/state
    You can see if it's working, the power usage has dropped dramatically, by around 54% in my case.

    present rate: 9828 mW
    Now lets just make sure to blacklist the nouveau and nvidia modules since they will cause problems if enabled.

    Code:
    gksu gedit /etc/modprobe.d/blacklist-nvidia.conf
    Now we need to insert this text...

    <INSERT BELOW TEXT>

    Code:
    blacklist nouveau
    blacklist nvidia
    Now run this and we're all done for this section!

    Code:
    sudo update-initramfs -u
    * Fix Suspend/Resume Issues

    Let's fix some issues with the USB buses and also the NVidia/Intel GPUs when undertaking suspend/resume operations.

    Code:
    gksu gedit /etc/pm/sleep.d/20_custom-asus-u36jc
    <INSERT BELOW TEXT>

    Code:
    #!/bin/sh
    
    BUSES="0000:00:1a.0 0000:00:1d.0"
    BUSES3="0000:07:00.0"
    
    case "${1}" in
        hibernate|suspend)
    	# Switch USB buses off
    	for bus in $BUSES; do
    	    echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind
    	done
    	# Switch USB 3.0 buses off
    	for bus in $BUSES3; do
    	    echo -n $bus | tee /sys/bus/pci/drivers/xhci_hcd/unbind
    	done
    	# Switch optimus back on before going to sleep, avoids the "constant on"
    	# bug that occurs after 2 suspend/resume cycles (thanks kos888)
    	/etc/init.d/optimusoff stop
    	;;
        resume|thaw)
    	# Switch USB buses back on
    	for bus in $BUSES; do
    	    echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind
    	done
    	# Switch USB 3.0 buses back on
    	for bus in $BUSES3; do
    	    echo -n $bus | tee /sys/bus/pci/drivers/xhci_hcd/bind
    	done
    	# Switch optimus off before resuming, avoids unneccessary power draw
    	/etc/init.d/optimusoff start
    	;;
    esac
    Next just make it executable and we're done for this section.

    Code:
    sudo chmod +x /etc/pm/sleep.d/20_custom-asus-u36jc
    * Fix USB3.0 Port (thanks to DeeKey)

    To fix the USB 3.0 (Fresco Logic FL1000G) port, we need to update the parameters when launching Ubuntu via GRUB.

    Code:
    gksu gedit /etc/default/grub
    Find the line:

    Code:
    GRUB_CMDLINE_LINUX_DEFAULT
    and add the following within the quotation marks, being sure to separate it with a space from any other entries:

    Code:
    pci=nomsi,noaer
    Now run...

    Code:
    sudo update-grub
    and on the next reboot the USB 3.0 port should work.

    * Fix Camera Issues

    Let's add a PPA and some updated packages to fix the camera issues.

    Code:
    sudo add-apt-repository ppa:libv4l
    sudo apt-get update && sudo apt-get install gtk-v4l libv4l-0
    Next be sure to edit this file and add in the following text...

    Code:
    gksu gedit /etc/environment
    <INSERT BELOW TEXT>

    Code:
    LIBV4LCONTROL_FLAGS=2
    We can also run non-native GTK apps by preloading the updated module.

    Code:
    LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so <appname>
    You can put this in a script, e.g. appname.sh and then use sh to run said script (e.g. sh appname.sh) from a desktop or applications menu link.

    OK so that's it! Your U36Jc should be all set up and ready to use. Enjoy Ubuntu 11.04! Hopefully in time Optimus will be able to be used with some "hacking" or native support will be provided for it by providing asus-switcheroo by default in distributions.

    References:

    Special thanks/mention to the authors of the following resources who's efforts enabled me to make this guide and get everything working:

    Sergio Fernández Marcos & Andrej Sokol: https://help.ubuntu.com/community/Asus_U36JC

    Olivier Robert: http://robbyx.net/blog/?p=190

    DeeKey: http://ubuntuforums.org/showpost.php...0&postcount=44
    Last edited by Menthu_Rae; May 21st, 2011 at 04:41 AM. Reason: Added USB 3.0 Port Information

  2. #2
    Join Date
    Nov 2005
    Beans
    13

    Re: Setup Guide: ASUS U36Jc - Ubuntu 11.04 Alpha3 64-bit

    This guide is a life saver - Thank you so much!!!!

  3. #3
    Join Date
    Sep 2006
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Setup Guide: ASUS U36Jc - Ubuntu 11.04 Alpha3 64-bit

    Thanks, I used these tips to turn off the nvidia optimus card (gt 325m) in my asus n61j series (n61jv) laptop, too.

  4. #4
    Join Date
    Apr 2006
    Beans
    20

    Re: Setup Guide: ASUS U36Jc - Ubuntu 11.04 Alpha3 64-bit

    so there is no way to use the nvidia card under linux??

  5. #5
    Join Date
    May 2008
    Beans
    109

    Re: Setup Guide: ASUS U36Jc - Ubuntu 11.04 Alpha3 64-bit

    Quote Originally Posted by dugh View Post
    Thanks, I used these tips to turn off the nvidia optimus card (gt 325m) in my asus n61j series (n61jv) laptop, too.
    Please be careful with this. I have actually omitted the part where you figure out which ACPI call to use to switch off the GPU since this guide is intended only for the U36Jc.

    If anyone reading this would like to switch off their NVidia GPU in their Optimus-enabled Laptop, I would suggest following this guide below (the ./test_off part) and modifying the calls to echo to /proc/acpi/call.

    Using acpi_call module to switch on/off discrete graphics card in Linux

    One of the hybrid-graphics-linux Launchpad team members has
    created a Linux kernel module to call ACPI methods through
    /proc/acpi/call. The code is here:

    http://github.com/mkottman/acpi_call

    You can try it by installing the module and calling it like this:

    git clone http://github.com/mkottman/acpi_call.git

    cd acpi_call

    make

    sudo insmod acpi_call.ko

    ./test_off.sh
    Source: http://linux-hybrid-graphics.blogspo...tch-onoff.html

    Quote Originally Posted by Trevice View Post
    so there is no way to use the nvidia card under linux??
    This is correct. The way Optimus works is that the Intel and NVidia GPUs work in tandem (when necessary). Basically the NVidia GPU takes over GPU calculations from the Intel GPU but still writes the results back out (framebuffer) to the Intel GPU.

    As a result, drivers for both GPUs need to be loaded (and support Optimus). Unfortunately due to the architecture of Linux in regards to graphics / X / etc - this is not possible (as far as I am aware)

    The workaround is to use something being developed called "vga_switcheroo" - that restarts X but with the appropriate driver loaded - however, it only works with open source drivers, not the closed nvidia blobs. I'm not sure whether nouveau supports it yet or not.

    If anyone knows if any of the above is wrong, please let me know! But that's my understanding of the current situation.

  6. #6
    Join Date
    Jun 2009
    Beans
    7

    Re: Setup Guide: ASUS U36Jc - Ubuntu 11.04 Alpha3 64-bit

    So you are definitively the best!

    I haven't read many guides as clear as yours.
    It seems very clear and complete to me, and I am so happy that a linux user like you got this model so soon. (I am not so happy about the lack of support for optimus on linux, no matter about whose the fault is)

    Unfortunately i don't have the u36 yet, because I'm still waiting for the sandy bridge + nvidia 520m refresh (which will hopefully be announced soon -does anyone knows something about this?-).

    Anyway, as you saw your guide has already been useful

    Thank you very much again, when I will apply your guide I will surely write to you!

    Happy linux-ing!

  7. #7
    Join Date
    Mar 2011
    Beans
    2

    Re: Setup Guide: ASUS U36Jc - Ubuntu 11.04 Alpha3 64-bit

    great info.. thanks for that

    Once you've disabled the nvidia card is it possible to change the amount of memory that the Intel GPU uses or are you stuck with whatever the standard is? Is the Intel GPU powerful enough to run compiz desktop effects
    Trying to decide whether to grab it still as this laptop was of interest to me, but the lack of support for optimus / the nvidia card is disappointing.

  8. #8
    Join Date
    May 2008
    Beans
    109

    Re: Setup Guide: ASUS U36Jc - Ubuntu 11.04 Alpha3 64-bit

    Quote Originally Posted by macrostheblonde View Post
    great info.. thanks for that

    Once you've disabled the nvidia card is it possible to change the amount of memory that the Intel GPU uses or are you stuck with whatever the standard is? Is the Intel GPU powerful enough to run compiz desktop effects
    Trying to decide whether to grab it still as this laptop was of interest to me, but the lack of support for optimus / the nvidia card is disappointing.
    Yes the Intel GPU is perfectly fine with Compiz effects, no slowdown/lag at all - very smooth and snappy.

    If you are going to dual-boot with Windows, grab the U36Jc. At least then you can still use the NVidia card where it's needed (games/CAD work).

    If you aren't going to dual-boot, and JUST run Ubuntu, grab the U31F. It's the same spec as the U36Jc - just minus the NVidia card.

    Quote Originally Posted by korg91 View Post
    So you are definitively the best!

    I haven't read many guides as clear as yours.
    It seems very clear and complete to me, and I am so happy that a linux user like you got this model so soon. (I am not so happy about the lack of support for optimus on linux, no matter about whose the fault is)

    Unfortunately i don't have the u36 yet, because I'm still waiting for the sandy bridge + nvidia 520m refresh (which will hopefully be announced soon -does anyone knows something about this?-).

    Anyway, as you saw your guide has already been useful

    Thank you very much again, when I will apply your guide I will surely write to you!

    Happy linux-ing!
    Thanks for the kind words guys - but it's mainly a compilation of other peoples work as noted. Without their help I couldn't have made it work for the U36!

  9. #9
    Join Date
    Mar 2011
    Beans
    2

    Re: Setup Guide: ASUS U36Jc - Ubuntu 11.04 Alpha3 64-bit

    Quote Originally Posted by Menthu_Rae View Post
    Yes the Intel GPU is perfectly fine with Compiz effects, no slowdown/lag at all - very smooth and snappy.

    If you are going to dual-boot with Windows, grab the U36Jc. At least then you can still use the NVidia card where it's needed (games/CAD work).

    If you aren't going to dual-boot, and JUST run Ubuntu, grab the U31F. It's the same spec as the U36Jc - just minus the NVidia card.
    Thanks for the advice I will be running just ubuntu. I had looked at the U31F, but i prefer the look and weight of the U36JC. I don't need to play games / do any CAD work so the Intel GPU should be fine for my purposes. Do you know how much of the system memory the Intel GPU uses?

    Thanks!

  10. #10
    Join Date
    Mar 2011
    Beans
    1

    Re: Setup Guide: ASUS U36Jc - Ubuntu 11.04 Alpha3 64-bit

    Quote Originally Posted by korg91 View Post
    So you are definitively the best!

    I haven't read many guides as clear as yours.
    It seems very clear and complete to me, and I am so happy that a linux user like you got this model so soon. (I am not so happy about the lack of support for optimus on linux, no matter about whose the fault is)

    Unfortunately i don't have the u36 yet, because I'm still waiting for the sandy bridge + nvidia 520m refresh (which will hopefully be announced soon -does anyone knows something about this?-).

    Anyway, as you saw your guide has already been useful

    Thank you very much again, when I will apply your guide I will surely write to you!

    Happy linux-ing!
    where did you heard about the Sandy Bridge + Nvidia 520m ?

Page 1 of 9 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •