Page 81 of 112 FirstFirst ... 3171798081828391 ... LastLast
Results 801 to 810 of 1117

Thread: Ubuntu on Eee PC T101MT

  1. #801
    Join Date
    Aug 2009
    Beans
    34

    Re: Ubuntu on Eee PC T101MT

    Not exactly it seems but you made an interesting observation. What I get is:
    hotkey ATKD 0000007b 00000xxx when the rotate button is pressed
    hotkey ATKD 0000007c 00000xxx when the rotate button is held
    hotkey ATKD 0000007d 00000xxx when the rotate button is released
    Oops, you are right. As for everyone else's comments, I do appreciate the thought that's going into this, although I don't personally find holding the button necessary.

    I'm no bash expert, but I don't think any wait statement would work, but rather would need X instances of 0000007c before executing the rest of the script. I'm pretty sure bash can do that.

    However, I would have to google for at least an hour or more before finding a similar script somewhere and stealing some of its code, whereas I know there are some good coders here in this thread who know how to do it off the top of their head.

    I believe the timeout switch "-t 3" is useless for this purpose, as I observed that it just stopped listening for acpi stuff after 3 seconds. I don't think that's the function you had in mind, is it?

    I do believe that waiting for a certain number of instances of 0000007c is what we need, since it just repeats itself while the button is held down. Anyone else agree with that?

  2. #802
    Join Date
    Feb 2008
    Location
    I'm lost ... HELP!
    Beans
    1,014
    Distro
    Xubuntu

    Re: Ubuntu on Eee PC T101MT

    Quote Originally Posted by coffen View Post
    The red part makes the script run like a deamon. Without it the script would only run once and exit.
    The blue part could be altered to your suggestion. Both ways work about the same.
    Quote Originally Posted by Slartius View Post
    Well not quite. If you look at the miegiel's post above you can see, that the output of the acpi_listen is:
    hotkey ATKD 0000007b 0000003a,
    where the fourth column is the number of events of this type. Althoug it might seem quite farfetched that some event could happen at least 7b-times it is still possible. So if we just grep'ed for that string we could actually trigger that script for any of the acpi events, which occurred enough times. So I would say that the correct way is to actually look only for the events itself and not the whole output.
    Thanks, both of you! I get it now.

    I opted for awk '{ print $3 }' so that it would only grab the 3rd column. I also added quotes for $press and $hold, so that if wouldn't get confused if $press and $hold are empty.

    Maybe someone can improve on this, but it rotates the screen if you hold the button for more than 2 seconds.

    Code:
    #!/bin/bash
    #
    while true
    do
        press=$(acpi_listen -c 1 | grep 0000007b | awk '{ print $3 }')
        hold=$(acpi_listen -t 2 | grep 0000007d | awk '{ print $3 }')
    
        if [ "$press" == "0000007b" ]
            then
                if [ "$hold" != "0000007d" ]
                    then
                        touchrotate toright
                fi
        fi
    done
    Hey messinwu how does this forum compare to the fedora forums now?

  3. #803
    Join Date
    Aug 2009
    Beans
    34

    Re: Ubuntu on Eee PC T101MT

    Hey miegiel - cool way to do it!

    The Ubuntu community seems to be on-par with the Fedora community in terms of professionalism, knowledge of most users, etc. I think I'll keep Ubuntu on my T101MT.

    I still disagree with calling the touchrotate script. For one reason, it's because it won't work with the 2nd Gen devices, you'd have to call 'touchrotate LVDS1 10' (that 10 number would have to be $devID. Maybe I'm wrong, but isn't the way I originally posted, including the X and Y values, a way of making sure the screen is calibrated at the same time?

    Anyway, I made a comment a couple days ago that it was better because it didn't require the touchrotate script and would be distribution independent. Then I was reminded that this is an Ubuntu forum afterall.

    However, I still think we should stay away from what I like to call the 'Internet Explorer Mentality'. Yes, you can make it work for Ubuntu only with touchrotate, but why not make it work for all linux distributions when we have the code right there? Webmasters sometime code their pages to work only with IE, meaning they don't look right at all when viewed with a real browser, like Chrome or Firefox. That's just bad coding, in my opinion.

    At the moment, I've compiled the Florence virtual keyboard. I seem to like it better than Onboard or the others. I'm trying to create a '.com' key like my smartphone has. It's proving to be quite a challenge.

    Wish me luck!

  4. #804
    Join Date
    Oct 2009
    Beans
    38

    Re: Ubuntu on Eee PC T101MT

    Quote Originally Posted by miegiel View Post
    Thanks, both of you! I get it now.

    I opted for awk '{ print $3 }' so that it would only grab the 3rd column. I also added quotes for $press and $hold, so that if wouldn't get confused if $press and $hold are empty.

    Maybe someone can improve on this, but it rotates the screen if you hold the button for more than 2 seconds.

    Code:
    #!/bin/bash
    #
    while true
    do
        press=$(acpi_listen -c 1 | grep 0000007b | awk '{ print $3 }')
        hold=$(acpi_listen -t 2 | grep 0000007d | awk '{ print $3 }')
    
        if [ "$press" == "0000007b" ]
            then
                if [ "$hold" != "0000007d" ]
                    then
                        touchrotate toright
                fi
        fi
    done
    Hey messinwu how does this forum compare to the fedora forums now?
    Nice code. I would never have thought of that (I hope this is at least a bit grammatically correct). I actually implemented similar solution but with counting the hold events, not waiting for several seconds. And I think, that your code looks a loot simpler.
    One improvement might be to add a command line parameter, which would be used as a -t parameter which would allow for custom delay.

  5. #805
    Join Date
    Oct 2009
    Beans
    38

    Re: Ubuntu on Eee PC T101MT

    Quote Originally Posted by Slartius View Post
    Nice code. I would never have thought of that (I hope this is at least a bit grammatically correct). I actually implemented similar solution but with counting the hold events, not waiting for several seconds. And I think, that your code looks a loot simpler.
    One improvement might be to add a command line parameter, which would be used as a -t parameter which would allow for custom delay.
    I did some testing of the code previously posted but I am afraid it is not working quite the way I hoped. I believe the problem is the
    Code:
    hold=$(acpi_listen -t 2 | grep 0000007d | awk '{ print $3 }')
    statement. What happens here is the acpi_listen listens for n (in this case 2) seconds for all events,
    which are then grep'ed. And if in those 2 seconds 0 or at least two 0000007d events appear, the hold contains aither empty string or several 0000007d values (more than one). In second "if" then this differs from 0000007d ("" or "0000007d 0000007d etc" differs from "0000007d") so in case, where you quickly press the button two times, the screen still rotates. This is for most users quite acceptable. Anyhow here is my solution, which takes multiple button presses into account (at least I think so)

    Code:
    #!/bin/bash
    num=0
    if [ $# -eq 1 ]
    then
        num=$1
        if [ ! `echo "$num" | grep -E "^[0-9]+$"` ]
        then
        num=0
        fi
    fi
    
    devId=`xinput list | grep "eGalax\|AsusTek" | sed -e 's/.*id=//' -e 's/[\t ].*//g'`
    rangex=`xinput --list $devId | sed  -e '/Label: Abs [XY]/{N;s/\n//;}' | grep "Label:[ +]Abs[ +]X" | sed -e 's/.*Range:[ +]//g' -e 's/[ +]-[ +]/ /g'`
    rangey=`xinput --list $devId | sed  -e '/Label: Abs [XY]/{N;s/\n//;}' | grep "Label:[ +]Abs[ +]Y" | sed -e 's/.*Range:[ +]//g' -e 's/[ +]-[ +]/ /g'`
    while true
    do
        acpi=$(acpi_listen -c 1 |sed -e 's/ +/ /g'|cut -d' ' -f 3)
        cnt=0
        if [ $acpi == "0000007b" ] 
        then
        while [ $cnt -lt $num ]
        do
            acpi1=$(acpi_listen -c 1 |sed -e 's/ +/ /g'|cut -d' ' -f 3)
            if [ $acpi1 == "0000007c" ]
            then
            let cnt=cnt+1
            else 
            cnt=-1
            break
            fi
        done
        if [ $cnt -ge 0 ]
        then
            torotate=( $devId ) 
            xrandrout=$(xrandr | head -n 1 | sed -e 's/.*current//' -e 's/maximum.*//' -e 's/[ +,+]//g')
        
            case $xrandrout in
            600x1024 ) cal=( ${rangex[@]} ${rangey[@]} ); rotate=0;;
            1024x600 ) cal=( ${rangey[@]} ${rangex[@]} ); rotate=1;;
            esac
    
            xrandr -o $(( rotate * 3 ))
            for input in ${torotate[@]}
            do
            xinput set-prop $input "Evdev Axes Swap" $rotate
            xinput set-prop $input "Evdev Axis Inversion" 0, $rotate
            xinput set-prop $input "Evdev Axis Calibration" ${cal[@]}
            done
        fi
        fi
    done
    If you want you can still replace most of the script with a touchrotate script (I just posted whole code since I just copied my code). This script is much like miegiels with a difference that if you press the button several times this won't trigger the rotate screen. And it also implements a desired number of hold events (one event is approximately one second or a little bit more).

  6. #806
    Join Date
    Aug 2009
    Beans
    34

    Re: Ubuntu on Eee PC T101MT

    If anyone with the "2nd Gen" T101MT is wanting to make the webcam right-side-up, you've probably noticed the existing fix does not work. It's because we have a different webcam installed than the "1st Gen" version of the T101MT does.

    I've attached a revised version of the v4l-utils package you need to compile. I just added the following lines to /lib/libv4lconvert/control/libv4lcontrol.c once the package is extracted into its own directory:

    Code:
    	{ 0x13d3, 0x5126, 0, "ASUSTeK Computer INC.", "T101MT",
    		V4LCONTROL_HFLIPPED | V4LCONTROL_VFLIPPED },
    Then, in order to run an application using the webcam, you have to include the following before the app name: export LIBV4LCONTROL_FLAGS=3 && LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so, like this:

    Code:
    export LIBV4LCONTROL_FLAGS=3 && LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so cheese
    I made a script to execute this command and changed the menu item in gnome to call the script, instead of cheese directly. I've attached the cheese.sh script as well as the revised v4l-utils package.

    I hope this helps someone.
    Attached Files Attached Files

  7. #807
    Join Date
    Aug 2009
    Beans
    34

    Re: Ubuntu on Eee PC T101MT

    In Windows, there is a function activated by pressing Fn-Space, it's the Super Hybrid Engine. On some eeepc's, it actually allows for on-the-fly overclocking, and also supports power saving mode.

    You may have noticed that when you switch to battery power, the CPU powers down to 1GHz. If you install something called Jupiter, you can have control of the CPU speed by toggling through the power modes using the Fn-Space keys just like you can in Windows.

    Follow these instructions:

    Code:
    sudo add-apt-repository ppa:webupd8team/jupiter
    sudo apt-get update
    sudo apt-get install jupiter
    sudo apt-get install jupiter-support-eee
    Then, just add "/usr/bin/mono /usr/bin/jupiter.exe" to start at boot-up time.

  8. #808
    Join Date
    Oct 2009
    Beans
    38

    Re: Ubuntu on Eee PC T101MT

    I was just wondering if anyone has an issue with the hibernate option. Using 10.10 edition of netbuntu, whenever computer wakes from hibernate only right quarter of screen is visible, the rest is completely black. That would have to do something with graphic drivers I guess. Any suggestions?

  9. #809
    Join Date
    Apr 2006
    Beans
    39
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Ubuntu on Eee PC T101MT

    Quote Originally Posted by Slartius View Post
    I was just wondering if anyone has an issue with the hibernate option. Using 10.10 edition of netbuntu, whenever computer wakes from hibernate only right quarter of screen is visible, the rest is completely black. That would have to do something with graphic drivers I guess. Any suggestions?
    Sorry, no suggestions. But I have no issues at all with hibernate. My touch screen is the first version. If you have the same version then there must be something wrong with your current installation.

  10. #810
    Join Date
    Jul 2007
    Location
    Alsip, IL
    Beans
    2,027
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Ubuntu on Eee PC T101MT

    In the never ending search of a touch friendly browser for my x86 tablet computer, the power of FOSS triumphs again. Firefox Mobile running under Bodhi -



    My search may finally end... Anyone else tried this?

    ~Jeff

Page 81 of 112 FirstFirst ... 3171798081828391 ... 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
  •