Updates from September, 2010 Toggle Comment Threads | Keyboard Shortcuts

  • levin 3:18 am on September 15, 2010 Permalink | Reply
    Tags: hp 2540p, intel gma hd, ,   

    Ubuntu 10.10 Maverick with HP Elitebook 2540p – Updated 

    Background

    After thousand time try and errors with linux distribution, opensuse, fedora, ubtuntu… etc, finally get it work perfectly on ubtuntu 10.10 Alpha 2 installation.

    There is some changes since 10.04, /etc/X11/xorg.conf is no more present after installation, Xorg now communicate with dbus to get best configure for your hardware.

    You may experience blank screen, screen flicking, screen can’t turn on after system suspend, Xorg hang for few mins randomly. So here is the workaround for me to install ubuntu on this laptop.

    Installation

    1. Grab the Maverick CD image, ( Alpha 2 for my case)
    2. During CD boot, hit any button to interrupt autoboot
    3. Press [F6] to append boot parameters
    (More …)

     
    • levin 6:29 pm on September 15, 2010 Permalink | Reply

      Please note that, VirtualBox 3.2.8 is incompatible on 2.6.36-rc4-maverick kernel

    • Travis 7:28 am on September 18, 2010 Permalink | Reply

      I’m having some issues with flickering on my laptop monitor ( elitebook 2540p ) but not on external monitor. Have you seen / resolved this?

      • levin 12:41 am on September 19, 2010 Permalink | Reply

        Hi Travis, you need to update a beta kernel to fix the screen flickering problem, here to download the upstream kernel packages. http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.36-rc4-maverick/

        • levin 12:42 am on September 19, 2010 Permalink | Reply

          also update xorg-intel driver from “Synaptic Package” as well.

          • Travis 3:23 am on September 23, 2010 Permalink | Reply

            My Kernel: 2.6.36-020636rc5-generic #201009211328 SMP Tue Sep 21 13:31:25 UTC 2010 x86_64 GNU/Linux

            I updated the intel driver as well. Seems to be better than initial install, but still seeing the flicker at times.

            It’s odd, with Fedora 13 I get no flicker, but can’t dock it with external monitor, but with Ubuntu I can dock etc.. but get the flicker. Frustrating.

            Thanks
            -Travis

            • levin 5:51 pm on September 23, 2010 Permalink

              That’s odd, but I’m not sure rc5 is good version or not, since i believe 36.rc4 already fixed the flicker issue.

              I just tested with internal display only. So maybe not apply for your case, I’ll try that with a external monitor as I can.

              Can you produce the following result, see if it is consistently flickering

              For No Docking
              1. Boot up with internal display
              2. Boot up with external display
              3. Bootup with internal display and switch over to external display when reached X login and switch it back to internal display

              Repeat 2,3 with docking attached.

              Thanks

              lets compare with my working version.

              libdrm-intel1 2.4.21-1ubuntu2
              xorg 1:7.5+6ubuntu2
              xserver-xorg-video-intel 2:2.12.0-1ubuntu4
              linux-generic 2.6.36-020636rc4.201009130905
              linux-headers-2.6.36-020636rc4.201009130905
              linux-headers-2.6.36-020636rc4.201009130905-generic 2.6.36-020636rc4.201009130905
              linux-image 2.6.36-020636rc4.201009130905
              linux-image-2.6.36-020636rc4.201009130905-generic 2.6.36-020636rc4.201009130905

            • foo 5:46 am on October 29, 2010 Permalink

              tried rc4 and rc7 with the same results as Travis. Switching from 60 to 40Hz update freq finally solved the flickering problem.

    • Travis 7:34 am on September 18, 2010 Permalink | Reply

      Great info by the way.. Thanks

    • Ares 10:46 am on October 4, 2010 Permalink | Reply

      You are the man! Honestly I’ve had been trying to make it work for my girlfriends laptop for a while now, and nothing had worked. Thanks!

    • Justin 12:45 am on October 21, 2010 Permalink | Reply

      I tried the rc4 kernel and the rc7 kernel (both i386) but my video is still flashing every few seconds. Do you know if there is a patch to apply or a way to track down why this is happening? I checked the package manager but it appears I already have intel-xorg-video-intel package installed.
      Also, the multitouch works great for the track pad but how can I set those settings to automatically apply when the computer turns on? A startup script just seems like the wrong way to do it.
      Thanks

      • levin 12:24 pm on October 30, 2010 Permalink | Reply

        put these line in /etc/X11/xorg.conf for auto-enable multitouch

        Section “InputDevice”
        Identifier “Synaptics Touchpad”
        Driver “synaptics”
        Option “SendCoreEvents” “true”
        Option “Device” “/dev/psaux”
        Option “Protocol” “auto-dev”
        Option “SHMConfig” “on”
        Option “VertTwoFingerScroll” “1″
        Option “HorizTwoFingerScroll” “1″
        Option “EmulateTwoFingerMinW” “5″
        Option “EmulateTwoFingerMinZ” “50″
        EndSection

    • Haggan 10:05 pm on October 29, 2010 Permalink | Reply

      Iam testing 40Hz now seams to be flicker free with rc8 of the 36 kernel. What about the smart card reader?
      Any one know how to get it working? Also has any one working N speed with the wifi?

    • Travis 6:19 am on November 19, 2010 Permalink | Reply

      Latest Kernel seems to kill the display on the HP 2540. Docked, or not. The external display when docked works fine. Happened on both of the 2.6.37 releases. Anyone else?

    • Fredrik 3:29 pm on November 19, 2010 Permalink | Reply

      Travis, the same thing happens to me: I get a black (internal) screen with the 2.6.37rc’s.

    • Haggan 7:36 pm on December 3, 2010 Permalink | Reply

      40Hz dont work for me with 2.6.36 rc8 or the 2.6.35-23 kernel. I have tried 2.6.37 I also got blanck screen.
      About the smart card HP suggest the following. I cant get it workin I guess it because I am running x86_64

      Note: HP does not take any responsibility in doing the same. This would be at the customers own risk.

      Step 1:
      Run the command – lspcmci -v and get:
      Product Name:
      Identification: manf_id:

      Check for: prod_id(1):

      Step 2:
      Goto – http://www.scmmicro.com/support/pc-security-support/downloads.html
      Download the driver – SCR241 – Linux 32-bit (2.4.x) Driver
      Extract the files, and find the file scr241_main.c
      Search for the lines containing
      PCMCIA_DEVICE_PROD_ID1(“SCR243 PCMCIA”,0x2054e8de),
      PCMCIA_DEVICE_PROD_ID1(“SCR24x PCMCIA”,0x54a33665),
      and add the line:

      PCMCIA_DEVICE_PROD_ID1(“HP”, 0x53cb94f9),

      Note: “HP”, 0x53cb94f9 is the prod_id(1) what I have got in my unit – so this has to be changed with what the customer gets on his unit when he runs the lspcmci -v command

    • Joao 8:08 pm on December 28, 2010 Permalink | Reply

      I tried everything. I updated the kernel, verified that I have the newest driver, changed the frequency to 40Hz, updated the bios, disabled the light sensor in the bios.
      Nothing helped. Why can I not get rid of the problem?

    • Fredrik 5:57 pm on January 19, 2011 Permalink | Reply

      The flickering seems to be solved by the latest daily kernel:
      http://kernel.ubuntu.com/~kernel-ppa/mainline/daily/2011-01-18-natty/

      However I still have some troubles with plugging/unplugging external displays.

      • levin 6:16 pm on January 19, 2011 Permalink | Reply

        actually, the external display problem seems never been fixed… btw thanks for your update! cheers

    • ediulia 8:19 pm on January 19, 2011 Permalink | Reply

      i understand that there is no option at this time to install ubuntu 10.10 or 10.04 on 2540p without to spend at list a week for fix problems after installation. i will wait for 11.04. may be next version will solve screen problems without create new bugs…

    • david 11:05 pm on February 4, 2011 Permalink | Reply

      This kinda works for me, The flickering disappeared..

      I installed the kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/daily/current/
      But now the openafs kernel module wont compile..

    • levin 7:42 pm on April 29, 2011 Permalink | Reply

      Just a quick update, 11.04 work flawlessly with HP 2540p. Everything work as expected!

  • levin 3:39 am on July 3, 2010 Permalink | Reply
    Tags:   

    Pacemaker non-clones resource restart when clones stop/start on other nodes 

    Scenario

    Node alpha holds resource groups rg_vg01.

    Node beta holds the corresponding resources as same as alpha

    Both nodes hold instances of the CLVM DLM clone.

    As beta is switched into standby mode, the clone
    instance on beta correctly transition to the Stopped state.
    However, the rg_vg01 resource groups are
    restarted in-place on alpha needlessly.

    Solution

    It was caused by resource-stickness score INFINITY order was defined between clone and standalone resource.
    eg:

    order order-clvm-vg inf: clvm-dlm-clone rg_vg01

    To solve that, you should change the score to 0 between standalone and clones.
    like:

    order order-clvm-vg 0: clvm-dlm-clone rg_vg01

    A related bug fix.
    http://hg.clusterlabs.org/pacemaker/stable-1.0/rev/f17e29306fa1

     
  • levin 2:48 am on June 12, 2010 Permalink | Reply
    Tags:   

    Connect with local sysdba failed when database start up by CRS 

    What happen?

    A database started up by CRS successfully, but you can’t connect it by local sysdba “sqlplus / as sysdba”, however tnsping or connect with connection string “sqlplus system@prddb” works fine.
    Later, you tried to start the database alone manually, it works fine with both connection method.

    You inspected every crs log and alertlog but it look seems fine.

    Oops, why it inconsistent?

    When clusterware trying to startup your oracle, it’ll use $ORACLE_HOME/bin/racgwrap , so make sure your system environment setting is same as the ORACLE_HOME setting in racgwrap script.

     
  • levin 1:31 am on June 7, 2010 Permalink | Reply
    Tags: ,   

    WordPress post navigation with customized post loop using meta_key 

    What’s that?

    I wrote this stupid navigation workout because I can’t found any of good practice on writing customized content unless I go for WordPress 3.0. When I create several content handling in a themes, such as photo post or video post, I was relied on the meta_key value to determine which style to be used.

    For each single post or post loop, it’s no problem at all, however when i tried to do navigation on the single.php. I noticed that there is no way to treat them as typical blog post.

    <?php
            $category = get_the_category();
            $catID = $category[0]->cat_ID;
    ?>
    
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php the_content();?>
            <?php endwhile; else: ?>
    <p>Sorry, no posts matched your criteria.</p>
            <?php endif; ?>
    
    <!-- Start navigation here -->
    <?php
    global $post;
    $mypostlist = array();
    $currentPID = $post->ID;
    $myNav[] += $currentPID;  //insert the current post into first array position
    $myposts = get_posts('exclude='.$post->ID.'&orderby=date&order=desc&numberposts=-1&meta_key=my_post_type&meta_value=1&offset=1&category='. $catID .'');
    setup_postdata($post); // exclude current post from the loop
    foreach ($myposts as $post) {
           $myNav[] += $post->ID; // insert the result into the loop
    }
    $current = array_search($post->ID, $myNav);
    $prevID = $myNav[$current-1];
    $nextID = $myNav[$current++];
    ?>
    
    <div class="navigation">
    <?php if (!empty($prevID)) { ?>
    <div class="alignleft"><a href="<?php echo get_permalink($prevID); ?>"
      title="<?php echo get_the_title($prevID); ?>">Previous</a>
    </div>
    <?php }
    if (!empty($nextID)) { ?>
    <div class="alignright"><a href="<?php echo get_permalink($nextID); ?>"
     title="<?php echo get_the_title($nextID); ?>">Next</a></div>
    <?php } ?>
    </div><!-- .navigation -->
    
    </div>
    
     
  • levin 2:21 am on May 28, 2010 Permalink | Reply
    Tags: drbd,   

    howto create GFS on DRBD network disk mirroring 

    Introduction

    This howto will cover how to create a DRBD disk set with GFS concurrent disk access setup.

    Why DRBD?

    DRBD disk mirroring benefit as a shared SAN disk to archive higher service resilience with low cost hardware component. Alternately, it may be configured for backup purpose with it’s flexibility.

    Prerequisite

    1. RedHat Cluster Suit and GFS packages

    cman-2.0.115-1.el5
    gfs2-utils-0.1.62-1.el5
    gfs-utils-0.1.20-1.el5
    kmod-gfs-0.1.34-2.el5
    

    2. drbd83 package

    yum install drbd83
    

    3. Create a partition on both node with using same size, we use [sda5] for this show case.
    (More …)

     
    • awinas 3:57 am on January 13, 2011 Permalink | Reply

      Uncomment in /etc/drbd.conf

      1 allow-two-primaries;

      or become-primary-on both?

      • levin 4:21 am on January 16, 2011 Permalink | Reply

        allow-two-primaries is global parameter for nodes,
        become-primary-on both, disk resource specific.

  • levin 1:31 am on May 28, 2010 Permalink | Reply
    Tags:   

    PHP sample: howto distinct the subarray value 

    The Code

    <?php
    $myvars = array(
    "myvar1" => array("stock" => "C", "mykey" => "1", "name" => "apple"),
    "myvar2" => array("stock" => "D", "mykey" => "1", "name" => "apple"),
    "myvar3" => array("stock" => "E", "mykey" => "1", "name" => "apple"),
    "myvar4" => array("stock" => "F", "mykey" => "1", "name" => "apple"),
    "myvar5" => array("stock" => "G", "mykey" => "2", "name" => "orange"),
    "myvar6" => array("stock" => "H", "mykey" => "2", "name" => "orange"),
    "myvar7" => array("stock" => "I", "mykey" => "2", "name" => "orange"),
    "myvar8" => array("stock" => "J", "mykey" => "2", "name" => "orange"),
    );
    
    $_myvars = array();
    foreach($myvars as $myvar)
    {
    if ( !in_array($myvar['mykey'], $_myvars) )
    {
    echo $myvar['mykey'] . "\n" . $myvar['name'] . "\n";
    $_myvars[] = $myvar['mykey'];
    }
    }
    ?>
    

    The Result

    1 apple 2 orange
    
     
  • levin 1:41 pm on May 26, 2010 Permalink | Reply
    Tags: ldap,   

    Openldap recovery howto 

    If you are experiencing LDAP errors or startup without error but no ldap port (389|636) is listening for service and you have tried restarting the LDAP server by running /etc/init.d/ldap restart, then you should try running the following recovery procedure:

    Typical corruption

    1. Stop the LDAP server:

    /etc/init.d/ldap stop
    

    2. Run the daemon manually with debug flag

    /usr/sbin/slapd -u ldap -h ldap://127.0.0.1:389/ -d 256
    

    If the database is corrupted, it may stop at database initiation.
    (More …)

     
  • levin 5:04 pm on May 24, 2010 Permalink | Reply
    Tags:   

    Apache Web Load Balancing howto 

    Setup Overview

    A apache load balancer http://www.mydomain.com setup for redirect incoming request to two underlying web server www1.mydomain.com, www2.mydomain.com.

    Hosts

    Host#1 www1.mydomain.com: 192.168.1.1
    Host#2 www2.mydomain.com: 192.168.1.2
    The apache load balancer instance http://www.mydomain.com running on RedHat Cluster floating IP 192.168.1.3 or you can activate it on either one server using IP alias without using Cluster Suit.

    Load balancer setup http://www.mydomain.com

    Parameters Value Description
    ProxyPass balancer://<NAME>/ Define your cluster name
    stickysession BALANCEID | PHPSESSIONID | JSESSIONID Define your preferred session sticky method,
    BALANCEID likely by source IP

    PHP|JSESSIONID require to add extra session header on the node member web server

    nofailover On | Off If your web servers do not support session replication, turn this flag on in order to NOT failovering the current session to other member while the node is failed.
    route node name
    lbmethod byrequests | bytraffic | bybusyness
    ProxyPreserveHost On | Off While application using mod_rewrite for friendly URL and it rely on the REQUEST_URI , set this On to preserve the URL request header to http://www.mydomain.com

    (More …)

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel