LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-25-2008, 08:29 PM   #1
rignes
Member
 
Registered: Mar 2003
Location: USA
Distribution: Slackware-current
Posts: 155

Rep: Reputation: 30
Tablet PC Ambient Light Sensor - Getting it to work?


I have an HP TC4200 Tablet PC that has an ambient light sensor. In Windows XP (but not Vista, go figure) this sensor monitors the current light level and adjusts the LCD brightness accordingly. I would really like to find a way to get this working in Linux. I am running Kubuntu Gutsy.

I've found references to this working under SUSE on other laptops. The problem I'm facing is I don't know any information about this sensor in order to do an intelligent web search to find a solution. Searching for "TC4200 Ambient Light Sensor Linux" and similar phrases hasn't gotten me any decent results.

Does anyone have any suggestions on where to start to unravel this mystery?

Thanks.
 
Old 03-25-2008, 09:02 PM   #2
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
I have a Compaq nc4200 ... it's the same laptop but without the tablet parts.

On mine, the fn+F11 key does turn on/off the sensor.

Question: do your fn+F9 or fn+F10 keys control the brightness correctly in Linux ?
 
Old 03-25-2008, 09:33 PM   #3
rignes
Member
 
Registered: Mar 2003
Location: USA
Distribution: Slackware-current
Posts: 155

Original Poster
Rep: Reputation: 30
Oh man. That is such a simple fix I almost feel stupid.

In Windows XP it required a driver to work, so I assumed that I needed some software bit to get it working under Linux. I guess I was wrong.

Thanks!
 
Old 03-25-2008, 10:20 PM   #4
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
Glad to be of help.

By the way ... I was thinking of getting a tc4200 instead of the nc4200.

How is the tablet on Linux ??
 
Old 03-26-2008, 09:33 AM   #5
rignes
Member
 
Registered: Mar 2003
Location: USA
Distribution: Slackware-current
Posts: 155

Original Poster
Rep: Reputation: 30
The TC4200 works well in Linux. I've only tried it on Kubuntu 7.10 so I can't speak for other distros but most everything worked fine out of the box. Hibernate and Suspend "just worked". To get the pen working I just had to uncomment the wacom related lines in xorg.conf which are marked clearly as to what they are for.

Screen rotation was kind of odd though. KDE's screen rotation worked, but I wanted to be able to press the presentation button and have it rotate into tablet mode. I found and modified a script and this was the result:

Code:
#!/bin/bash
# On the HP, rotation is (normally) CW or NORMAL

x_min=0
x_max=24700
y_min=0
y_max=18520

function ROTATE() {
  curr=$(xrandr | grep LVDS | cut -d " " -f4 | sed -e 's/(//')
  case $curr in
    normal)
      TABLET
      ;;
    *)
      NORMAL
      ;;
  esac
}
      


function PORTRAIT() {
  #xsetwacom set eraser	BottomX	$x_max
  #xsetwacom set eraser	BottomY	$y_max
  echo portrait
}


function LANDSCAPE() {
  #xsetwacom set eraser	BottomX	$y_max
  #xsetwacom set eraser	BottomY	$x_max
  echo landscape
}


function NORMAL() {
  xrandr -o normal
  xsetwacom set stylus  Rotate NONE
  xsetwacom set eraser  Rotate NONE
  PORTRAIT
  #killall xvkbd
}


function CCW() {
  xrandr -o left
  xsetwacom set stylus 	Rotate CCW
  xsetwacom set eraser 	Rotate CCW
  LANDSCAPE
}


function CW() {
  xrandr -o right
  xsetwacom set stylus 	Rotate CW
  xsetwacom set eraser 	Rotate CW
  LANDSCAPE
}

function TABLET() {
  xrandr -o right
  xsetwacom set stylus 	Rotate CW
  xsetwacom set eraser 	Rotate CW
  LANDSCAPE
  #xvkbd -no-jump-pointer
}

function INVERT() {
  xrandr -o inverted
  xsetwacom set stylus 	Rotate half
  xsetwacom set eraser 	Rotate half
  LANDSCAPE
}

case $1 in
  -l)
    CCW
    ;;
  -r)
    CW
    ;;
  -n)
    NORMAL
    ;;
  -i)
    INVERT
    ;;
  -t)
    TABLET
    ;;
  *) 
    ROTATE
    ;;
esac
This script should be reasonably self explanatory. If it isn't let me know and I'll try and explain.

Lastly, the pen has a button to right click with which didn't work right out. I had to add Option "Button2" "3" to the stylus, eraser, and cursor wacom sections in my xorg.conf file.

I still don't have the eraser working, when I turn the pen over it just draws another line same as the tip. However, from what I've been reading it can be done but can act strange when using the erase end in non-pen aware apps.

One last thing, if you want to have good hand writing recognition take a look at Cellwriter. It isn't in the apt repos but their deb package works on Kubuntu just fine and I imagine on Ubuntu too.

All in all it's a good little laptop with Linux. I'm pleased with it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
10.3 and ambient light dimming laptop twb1988 SUSE / openSUSE 2 12-26-2007 07:25 AM
Getting Rotation to work on a tablet? tomva Linux - Laptop and Netbook 1 01-24-2007 02:44 AM
Logitech Mouseman Optical Duel Sensor does not work limdeswein Linux - Hardware 8 02-13-2004 07:42 PM
Trying to get my tablet to work wzzrd Linux - Hardware 2 06-25-2003 04:54 AM
Tablet - How to make it work? Wysiwyg Slackware 3 06-08-2003 10:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 05:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration