Page 1 of 7 123 ... LastLast
Results 1 to 10 of 67

Thread: Setting up Ubuntu Lucid Lynx (10.04) on the Asus U35JC

  1. #1
    Join Date
    Feb 2006
    Beans
    18
    Distro
    Ubuntu 10.04 Lucid Lynx

    Setting up Ubuntu Lucid Lynx (10.04) on the Asus U35JC

    Install a newer kernel

    Code:
    $ sudo add-apt-repository ppa:kernel-ppa/ppa
    $ sudo apt-get update
    $ sudo apt-get install linux-image-generic-pae-lts-backport-maverick \
                         linux-headers-generic-pae-lts-backport-maverick \
                         build-essential
    Reboot to use the new kernel (2.6.35-19 at the time of writing).

    Update: 2.6.35-19 is the best kernel I tried so far regarding battery usage, I can get as low as 8W with it, while newer kernels don't drop below 12W (tried 2.6.35-22 and 2.6.37-7 from the kernel PPA).

    Install acpi_call to disable the Nvidia card

    The Nvidia discrete graphics card doesn’t work at the time of this writing, so it’s best to completely disable it to save battery. You’ll need the acpi_call module to do so:
    Code:
    $ git clone http://github.com/mkottman/acpi_call.git
    $ cd acpi_call
    $ make
    This builds a kernel module named acpi_call.ko. Try it and see if it works:
    Code:
    $ grep rate /proc/acpi/battery/BAT0/state
    present rate:            19913 mW
    $ sudo insmod acpi_call.ko
    $ sudo echo '\_SB.PCI0.PEG1.GFX0._OFF' > /proc/acpi/call
    $ grep rate /proc/acpi/battery/BAT0/state
    present rate:            12558 mW
    Copy the module to the current kernel's modules library. You'll need to do this after each kernel upgrade :
    Code:
    $ sudo cp acpi_call.ko /lib/modules/`uname -r`/kernel/drivers/acpi/
    $ sudo depmod
    And have it loaded at boot time: edit /etc/modules and add an acpi_call line to it. This is how it looks on my system after a fresh install:
    Code:
    # /etc/modules: kernel modules to load at boot time.
    #
    # This file contains the names of kernel modules that should be loaded
    # at boot time, one per line. Lines beginning with "#" are ignored.
    
    lp
    acpi_call
    To disable the discrete graphics card at startup, edit /etc/rc.local and add the acpi_call command to it, e.g.:
    Code:
    #!/bin/sh -e
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    
    echo '\_SB.PCI0.PEG1.GFX0._OFF' > /proc/acpi/call
    
    exit 0
    Last but not least, blacklist the nouveau driver (it caused instability on my system when playing with acpi_call). Create a file named /etc/modprobe.d/blacklist-nvidia.conf with this content:
    Code:
    blacklist nouveau
    blacklist nvidia
    And regenerate the initramfs image for the current kernel:
    Code:
    $ sudo update-initramfs -u
    Reboot, and verify your power consumption is at its minimum.

    To have the acpi_call recompiled after each kernel upgrade, copy the acpi_call source to /usr/local/src:
    Code:
    $ cd .. && sudo mkdir -p /usr/local/src && sudo cp -r acpi_call /usr/local/src
    Then create a script named /etc/kernel/postinst.d/acpi-call and put the following in it:
    Code:
    #!/bin/bash
    
    # We're passed the version of the kernel being installed
    inst_kern=$1
    
    if [ ! -e /usr/local/src/acpi_call ] ; then
        echo "acpi_call: WARNING - Failed to find source directory /usr/local/src/acpi_call.  Cannot proceed" >&2
        exit 0
    fi
    
    cd /usr/local/src/acpi_call/
    rm -f acpi_call.ko
    make
    
    if [ ! -e acpi_call.ko ] ; then
        echo "acpi_call: WARNING - Failed to build.  Will not be installed in the new kernel" >&2
        exit 0
    fi
    
    cp acpi_call.ko /lib/modules/${inst_kern}/kernel/drivers/acpi/
    And make it executable:
    Code:
    $ sudo chmod 755 /etc/kernel/postinst.d/acpi-call
    Make the trackpad toggle (Fn+F9) button work

    Edit /etc/acpi/asus-touchpad.sh and replace the script with this:
    Code:
    #!/bin/sh
    [ -f /usr/share/acpi-support/state-funcs ] || exit 0 
    
    . /usr/share/acpi-support/power-funcs
    
    getXconsole
    
    DEVICE_ID=`xinput -list | grep -i touchpad | grep id= | sed 's/.*id=\([0-9]*\).*/\1/' `
    
    if xinput -list-props $DEVICE_ID | grep "Device Enabled" | grep "1$" > /dev/null
    then
        xinput set-int-prop $DEVICE_ID "Device Enabled" 8 0
    else
        xinput set-int-prop $DEVICE_ID "Device Enabled" 8 1
    fi
    Configure the trackpad for X

    The trackpad is recognized correctly as a synaptics device with Maverick’s (2.6.35) kernel. This has the effect of making the “multitouch” functions stop to work. Add this in /etc/X11/xorg.conf to bring them back:
    Code:
    Section "InputClass"
        Identifier "touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "synaptics"
        Option "VertTwoFingerScroll" "on"
        Option "HorizTwoFingerScroll" "on"
        Option "CircularScrolling" "off"
        Option "CricularTrigger" "0"
        Option "TapButton1" "1"
        Option "TapButton2" "2"
        Option "TapButton3" "3"
    EndSection
    Note: this may not be necessary, my trackpad only stopped to function properly once and I haven't been able to reproduce the issue. You can fix it if it happens to you with this config though.

    Fix suspend

    Suspend doesn’t work out of the box because of a problem with the USB buses, we need to disable them before going to sleep.

    We also need to switch the nvidia card back on before suspending, or it becomes impossible to switch it off with acpi_call after two suspend cycles.

    Create a file named /etc/pm/sleep.d/20_custom-asus-u35jc and paste this script:
    Code:
    #!/bin/sh
    
    BUSES="0000:00:1a.0 0000:00:1d.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 nvidia card on before going to sleep, avoids the "constant on"
            # bug that occurs after 2 suspend/resume cycles (thanks kos888)
            echo '\_SB.PCI0.PEG1.GFX0._ON' > /proc/acpi/call
            ;;
        resume|thaw)
            # Switch USB buses back on and nvidia card off
            for bus in $BUSES; do
                echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind
            done
            echo '\_SB.PCI0.PEG1.GFX0._OFF' > /proc/acpi/call
            ;;
    esac
    Don’t forget to make it executable :
    Code:
    chmod +x /etc/pm/sleep.d/20_custom-asus-u35jc
    Fix flipped webcam under Skype

    The video comes out flipped upside down. Here is a trick to make it behave correctly under Skype. Create a script, e.g. in /usr/bin/skype-webcam-fixed:
    Code:
    #!/bin/sh
    export LIBV4LCONTROL_FLAGS=3 
    LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype
    Or on 64 bits systems:
    Code:
    #!/bin/sh
    export LIBV4LCONTROL_FLAGS=3 
    LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so /usr/bin/skype
    Make it executable :
    Code:
    chmod +x /usr/bin/skype-webcam-fixed
    Now when you want to run skype use this script instead of /usr/bin/skype.

    Things not working
    • Hibernate results in a black screen, though it works in single user mode so it should not be too hard to fix. To reboot use the magic SysRq sequence (hold Alt+Print Scr and type R, E, I, S, U, B)
    • Nvidia card is not working


    This is adapted from my blog post, which itself is a compilation of infos from around the internet and this forum.
    Last edited by Flupke; January 24th, 2011 at 05:14 PM. Reason: Added post kernel install rebuild script

  2. #2
    Join Date
    Feb 2006
    Beans
    18
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Setting up Ubuntu Lucid Lynx (10.04) on the Asus U35JC

    Hibernate works well in single user mode, and at the first login screen. Once logged in it fails, ending with a black screen. Going back to the login screen doesn't help, you have to reboot for it to work again, so it must be some service started after login that makes hibernation fail.

  3. #3
    Join Date
    Dec 2006
    Location
    US
    Beans
    4
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Setting up Ubuntu Lucid Lynx (10.04) on the Asus U35JC

    Just got this laptop yesterday, and was trying to figure out if both graphics cards were running. Thanks for the information on how to disable the nvidia card, pushed my estimated battery life out ~ 2 hours (was using 14000 mW, down to 8500 mW after disabling the second card)! Really only need the 310m for games in 7, so I'm fine with Intel for Ubuntu.

    I'm running the maverick beta (which seems like a bad call now if I'm going to have to make those changes each kernel update...), and after setting the touchpad to be two-finger scroll in the Mouse configuration GUI, it seems to be working fine, I can do the multi-finger taps for different clicks, so I'm happy.

    Haven't tried suspend/hibernate yet.

  4. #4
    Join Date
    Jan 2010
    Beans
    13

    Re: Setting up Ubuntu Lucid Lynx (10.04) on the Asus U35JC

    Im buying a new laptop in less than an hour.

    Either this or the UL30VT.

    I havent heard a lot of linux users with this one yet, how is total battery-time?

  5. #5
    Join Date
    Feb 2006
    Beans
    18
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Setting up Ubuntu Lucid Lynx (10.04) on the Asus U35JC

    Quote Originally Posted by allannk View Post
    Im buying a new laptop in less than an hour.

    Either this or the UL30VT.

    I havent heard a lot of linux users with this one yet, how is total battery-time?
    I get 6-7 hours in continuous usage, I think it's pretty on par with windows.

  6. #6
    Join Date
    Dec 2006
    Location
    US
    Beans
    4
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Setting up Ubuntu Lucid Lynx (10.04) on the Asus U35JC

    It's probably too late now, but my vote would be for the U35JC, I haven't played with a ul30vt, but I've seen the 14 or 15 inch variant at BestBuy, and they have the worst keyboard support I've ever seen. Pressing on any key makes the entire keyboard flex significantly. The 13" might not have that problem due to a smaller chassis and no optical drive, but I'm not sure.

    The U35JC has newer hardware, with a full power i3 CPU and slightly better graphics (310m is pretty much the same thing as the 210m), but you won't get quite the battery life out of it that you would with the slower clocked ul30vt. The build quality on my U35JC is pretty solid, keyboard flexes a little, but other than that it's built well.

    With either one, make sure you disable one of the graphics cards to get optimum battery life.

  7. #7
    Join Date
    Jan 2010
    Beans
    13

    Re: Setting up Ubuntu Lucid Lynx (10.04) on the Asus U35JC

    Hey guys, thanks for the advice.

    I was walking from one to the other several times, but at last I ended up with this - the U35JC. Received it an hour ago, and I can only agree on the build-quality, it seems to be good.

    Thanks for the help

  8. #8
    Join Date
    May 2008
    Beans
    38

    Re: Setting up Ubuntu Lucid Lynx (10.04) on the Asus U35JC

    Hey! Thanks for all the tips! I'm waiting for this laptop to arrive.

    Have any of you heard a high pitched noise while using this laptop with Ubuntu? It seems many people are hearing it (at least in Windows 7) and I am concerned about it.

  9. #9
    Join Date
    May 2008
    Location
    Sweden
    Beans
    2
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Setting up Ubuntu Lucid Lynx (10.04) on the Asus U35JC

    Thanks for the help! Seems that the U35JC is working very well in ubuntu as well! I was wondering; If I disable the graphicscard - would the laptop still be able to render highdef movies without stuttering?

    About the high pitched noise; I heard the noise in Windows 7 but, strangly, I cannot hear it in Ubuntu. Either that, or has my hearing been reduced in the last few days

  10. #10
    Join Date
    Dec 2006
    Location
    US
    Beans
    4
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Setting up Ubuntu Lucid Lynx (10.04) on the Asus U35JC

    I think the whine is from the hard drive, I've heard it once or twice in Windows, but have yet to hear it in Ubuntu.

    I'm not sure about the specifics on Intel's driver for the Corex chips, but even CPU alone you should be fine playing high def videos. I haven't heard much muttering about the intel driver, so my assumption is it includes hardware acceleration. I know Nvidia's VDPAU works fine in linux for accelerating videos.

    Keep in mind, the U35JC has two graphics cards, its a hybrid setup optimized for windows, where it will automatically switch between Intel and Nvidia depending on what you're doing. In Ubuntu, both will be enabled by default, so you'll be using more power than you should be until you disable one or the other.

    Have any of you tried out the web cam in Ubuntu? Mine shows upsidedown when I try to use Cheese. Strangely, there's significant delay in Windows using it, but in Ubuntu it's much faster and actually fairly usable.

Page 1 of 7 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
  •