LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices

Reply
 
Search this Thread
Old 12-18-2006, 11:21 AM   #16
Caeda
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Suse 6.0+, Mandrake 5.0-10.0, Redhat 6.0-9.0, Gentoo 1.2+, Gnoppix, Knoppix, Sabayon, Ubuntu 5.04+
Posts: 1,811

Original Poster
Rep: Reputation: 45

For earlier questions. Rotation works fine for me. Both the i810 driver and the fpit driver have the rotation option available, you just set it in your xorg.conf and it works fine. For resolution, i've been using 1280x768 the whole time, only reason I can think that you were stuck lower in fedorah is fedorah doesnt pack any useful utilities with the distro so it probably doesnt have the 915resolution tool. Also, if your not using the i810 driver your probably missing direct rendering and 3d acceleration.
 
Old 12-18-2006, 07:20 PM   #17
kingofearth
LQ Newbie
 
Registered: Dec 2006
Posts: 11

Rep: Reputation: 0
I got my widescreen to work now finally, but I still can't figure out the serial port thing. Is there anyway to figure out what I should configure them to? Kinda like an lspci for serial ports or something. And grepping dmesg for tty gives me
Code:
localhost dev # dmesg | grep tty
ttyS0: LSR safety check engaged!
if that helps figure out the problem. A quick Google search says that that means that I have the address wrong, but I have no way of figuring out what the actual address is.
 
Old 12-18-2006, 07:37 PM   #18
thejonmoore
LQ Newbie
 
Registered: Jul 2005
Location: Kentucky
Distribution: Debain, Slack, Fedora
Posts: 18

Rep: Reputation: 0
Quote:
Originally Posted by Caeda
For earlier questions. Rotation works fine for me. Both the i810 driver and the fpit driver have the rotation option available, you just set it in your xorg.conf and it works fine. For resolution, i've been using 1280x768 the whole time, only reason I can think that you were stuck lower in fedorah is fedorah doesnt pack any useful utilities with the distro so it probably doesnt have the 915resolution tool. Also, if your not using the i810 driver your probably missing direct rendering and 3d acceleration.
would you mind posting your xorg.conf file, or just the parts with rotation. i could not get this working.

thanks.
 
Old 12-19-2006, 02:39 PM   #19
Caeda
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Suse 6.0+, Mandrake 5.0-10.0, Redhat 6.0-9.0, Gentoo 1.2+, Gnoppix, Knoppix, Sabayon, Ubuntu 5.04+
Posts: 1,811

Original Poster
Rep: Reputation: 45
Option "Rotate" "CW" or Option "Rotate" "CCW" works for both the i810 and the fpit section of you xorg.conf
 
Old 01-02-2007, 01:04 AM   #20
gustafson
LQ Newbie
 
Registered: Jan 2007
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by kingofearth
I got my widescreen to work now finally, but I still can't figure out the serial port thing. Is there anyway to figure out what I should configure them to? Kinda like an lspci for serial ports or something. And grepping dmesg for tty gives me
Code:
localhost dev # dmesg | grep tty
ttyS0: LSR safety check engaged!
if that helps figure out the problem. A quick Google search says that that means that I have the address wrong, but I have no way of figuring out what the actual address is.
Any resolution on this serial port issue? I'm having trouble with my CX210S

Also, can someone post the ServerLayout portion of their xorg.conf? Thanks,
 
Old 01-03-2007, 09:54 AM   #21
kingofearth
LQ Newbie
 
Registered: Dec 2006
Posts: 11

Rep: Reputation: 0
I wish. I've haven't seen or been able to think of any solution so far, so I've basically given up on it for now. Although it looks like someone on the Ubuntu forums got it working on the same laptop that I have, so maybe they can help solve our problem.
 
Old 01-06-2007, 12:47 AM   #22
kingofearth
LQ Newbie
 
Registered: Dec 2006
Posts: 11

Rep: Reputation: 0
Setting the serial port to 0x06a8 made it sorta work on my CX210X. It knows when the pen is touching the screen, but the pointer just moves around randomly all over the screen even when holding the pen perfectly still. So if you try that and it happens to work for you please post your xorg.conf
 
Old 01-06-2007, 11:07 AM   #23
gustafson
LQ Newbie
 
Registered: Jan 2007
Posts: 9

Rep: Reputation: 0
Everything works now... except I'd like to know more about how clicking works since I don't have a huge amount of control (there are still spurious clicks every once in a while) and I would like to learn to get the pen button working for a second clicking option, perhaps right click.



-------------------
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Tablet"
InputDevice "Keyboard0" "CoreKeyboard"
Option "blank time" "1"
Option "standby time" "2"
Option "suspend time" "3"
Option "off time" "6"
EndSection

Section "Files"
RgbPath "/usr/share/X11/rgb"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/misc/"
FontPath "/usr/share/fonts/TTF/"
FontPath "/usr/share/fonts/OTF"
FontPath "/usr/share/fonts/Type1/"
FontPath "/usr/share/fonts/CID/"
FontPath "/usr/share/fonts/100dpi/"
FontPath "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
Load "glx"
Load "extmod"
Load "xtrap"
Load "record"
Load "dbe"
Load "dri"
Load "freetype"
Load "type1"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection

Section "InputDevice"
Identifier "Tablet"
Driver "fpit"
Option "Device" "/dev/ttyS0"
Option "AlwaysCore" "on"
Option "InvertY"
Option "MaximumXPosition" "12550"
Option "MaximumYPosition" "7650"
Option "MinimumXPosition" "400"
Option "MinimumYPosition" "400"
Option "SendCoreEvents"
EndSection

Section "Monitor"
#DisplaySize 300 180 # mm
Identifier "Monitor0"
VendorName "SEC"
ModelName "3257"
Option "DPMS" "true"
EndSection

Section "Device"
Identifier "Card0"
Driver "i810"
VendorName "Intel Corporation"
BoardName "Mobile 945GM/GMS/940GML Express Integrated Graphics Controller"
BusID "PCI:0:2:0"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

Last edited by gustafson; 01-08-2007 at 04:02 PM.
 
Old 01-14-2007, 06:20 PM   #24
meekles
LQ Newbie
 
Registered: Jan 2007
Location: Berkeley, CA
Distribution: Gentoo
Posts: 11

Rep: Reputation: 0
I got a new CX2726 after my old laptop died.
Under Gentoo Linux Caeda's suggestions basically worked.

Notes:
1. The /etc/serial.conf line reads:
/dev/ttyS0 port 0x06A8 uart 16954 irq 4 baud_base 38400
(Needed to use 6A8 and add the uart bit. UART was pulled out of thin air; 6A8 can come from /proc/ioports or info reported by PnP.)

2. Rotation
I found it very useful to hack the xf86-input-fpit driver source code so that when the fpitSwapXY flag is true it exchanges the values of screen_width and screen_height.
That way the minX/minY/maxX/maxY values don't need to change for correct pointer tracking, even if you start X with normal orientation and want to use the pen while rotated.

3. Tablet buttons
Windows reports their existence as "Tablet PC Buttons" by "Quanta Computer Inc", with ports 0x0CD0--0x0CD7 and IRQ 11. This doesn't show up in /proc/ioports or /sys/devices/pnp0/*/resources. I can't get them to work. Any suggestions?
 
Old 01-15-2007, 09:39 AM   #25
gustafson
LQ Newbie
 
Registered: Jan 2007
Posts: 9

Rep: Reputation: 0
Hi meekles,

Could you supply a patch to the fpit driver source code? I'd be interested in this rotation feature.

Thanks
 
Old 01-15-2007, 05:42 PM   #26
meekles
LQ Newbie
 
Registered: Jan 2007
Location: Berkeley, CA
Distribution: Gentoo
Posts: 11

Rep: Reputation: 0
Sure. I don't want to send this to the maintainer since it's just a hack... it would be much cooler if the driver could be made RandR aware!
This is just a patch against the source code for version 1.1.0 of the xf86-input-fpit driver.

Code:
--- xf86Fpit_orig.c     2006-04-07 10:32:19.000000000 -0700
+++ xf86Fpit.c  2007-01-15 15:22:30.000000000 -0800
@@ -165,8 +165,9 @@
        }
 
        if (priv->fpitSwapXY != 0) {
-               *x = xf86ScaleAxis(v1, 0, priv->screen_width, priv->fpitMinY, priv->fpitMaxY);
-               *y = xf86ScaleAxis(v0, 0, priv->screen_height, priv->fpitMinX, priv->fpitMaxX);
+               /* Also swapping screen w/h: this is a hack. */
+               *x = xf86ScaleAxis(v1, 0, priv->screen_height, priv->fpitMinY, priv->fpitMaxY);
+               *y = xf86ScaleAxis(v0, 0, priv->screen_width, priv->fpitMinX, priv->fpitMaxX);
        } else {
                *x = xf86ScaleAxis(v0, 0, priv->screen_width, priv->fpitMinX, priv->fpitMaxX);
                *y = xf86ScaleAxis(v1, 0, priv->screen_height, priv->fpitMinY, priv->fpitMaxY);
@@ -280,7 +281,6 @@
                        else buttons=0; /* We are in hover mode, so no buttons */
                }
                else { /* the active pen's buttons map directly to the mouse buttons */
-                       if (!prox) buttons=0; /* We are in hover mode, so no buttons */
                }
 
                /* DBG(2, ErrorF("%02d/%02d Prox=%d SW:%x Buttons:%x->%x (%d, %d)\n",
 
Old 01-18-2007, 02:37 AM   #27
meekles
LQ Newbie
 
Registered: Jan 2007
Location: Berkeley, CA
Distribution: Gentoo
Posts: 11

Rep: Reputation: 0
OK, I now have a patch that should make the driver RandR aware. =)
I'm not completely sure the implementation is kosher, but it works great for me.
Intent:
* xorg.conf options have same effect as before patch, if your screen is in normal orientation. (So I'd want InvertY.)
* If you change resolution or rotation, the driver will adjust immediately so that the cursor stays under where the pen is.

I would really appreciate some feedback from a user saying whether the patch usefully improved the driver, and worked as advertised.
If anyone else likes it I'll file a bug and work to get it included in Xorg.
It would be especially cool if somebody could test that it does the right thing with resolution changes and with reflections (xrandr -x, etc.).

The patch is available at http://alumni.imsa.edu/~justinb/xf86....0-RandR.patch.
 
Old 01-19-2007, 03:51 AM   #28
kingofearth
LQ Newbie
 
Registered: Dec 2006
Posts: 11

Rep: Reputation: 0
Ok, I'm not much of a C programmer (yet) but I decided to mess around with the fpit driver code. Basically, it looks like my pointer spasm problem comes from these two lines:

Code:
x = (int) (priv->fpitData[loop + 1] & 0x7f) + ((int) (priv->fpitData[loop + 2] & 0x7f) << 7);
y = (int) (priv->fpitData[loop + 3] & 0x7f) + ((int) (priv->fpitData[loop + 4] & 0x7f) << 7);
The problem is I have no clue what half of that means. I know that the 0x7f has something to do with the bits that tell the drive the location of the pointer, but what exactly does it mean. What does the ampersand in front of it do? and what does the << 7 at the end do? If someone could help me figure out what this code is trying to do exactly, I think I might be able to modify it to solve my problem.

And I know the problem is in the fpit driver and not the serial driver because doing a cat /dev/ttyS0 | hexdump while just resting the pen on the screen shows that the output stays fairly the same and the numbers arn't jumping all over like my pointer does.

Also, what would be the easiest way for me to make this print info to help me debug? Cause printf and cout and everything obviously doesn't work.
 
Old 01-19-2007, 10:09 AM   #29
meekles
LQ Newbie
 
Registered: Jan 2007
Location: Berkeley, CA
Distribution: Gentoo
Posts: 11

Rep: Reputation: 0
These lines correspond to the comments above, which explains what the individual bits in each byte mean.
The binary (2-operand) & operator in C is "bitwise and". (x & y) is the binary (base-2) number with 1-bits in the positions where x and y both have 1-bits, and 0-bits in all other positions. Since 0x7f is the binary number 01111111, a bitwise AND with 0x7f just turns off the highest bit of a byte-sized character.

The array index just goes to the appropriate byte in the stream.

The binary (2-operand) << operator in C is "left shift". It shifts all the bits of a number to the left (meaning it makes them larger in the place-value system---you don't need to know/worry about big-endian vs. little-endian machines), inserting zeros after them. This won't overflow because the byte is type-cast to an int first.

So the overall effect of the first statement is to take bits 0-6 of byte #2 (=first byte + 1), and put bits 0--6 of byte #3 to the left of them, and interpret the result as the number x. Which is what the comment before the statement indicates is The Right Thing to Do.

For debug output, try uncommenting the DBG(2, ErrorF(..... statement.
I'm not sure where that output gets recorded though.

Also keep in mind that, say, the x value should jump by 9 units per pixel. (9 == binary 1001.) So it's OK if these numbers move fast!

Good luck.
 
Old 01-19-2007, 10:29 AM   #30
gustafson
LQ Newbie
 
Registered: Jan 2007
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by meekles
I would really appreciate some feedback from a user saying whether the patch usefully improved the driver, and worked as advertised.
meekles, I installed the patched driver and it seems to work for most things. I have to say that the calibration (positionwise) works even better than in the tablet PC edition of WinXP.

There is still a problem!!! Even though the mouse position tracks correctly, it doesn't write in the correct position in the program xournal. (I'm running with an inverted screen and it writes the mirror image. Actually, it writes the mirror image in normal mode too!).

The only other problem I still see with this driver is the jitteryness of the clicking interface. If I hold the pen tip just off the top of the surface, it will send tens of click events in rapid succession. This is a problem because when I desire to touch the surface with the pen tip, it has to go through this jittery hover position. Or else if I pause in thought while writing, it will send erase events. When trying to use menus, it can have very undesired consequences.

Many thanks for your contribution. Progress!!!

Last edited by gustafson; 01-19-2007 at 10:41 AM.
 
  


Reply

Tags
driver, gateway, gentoo, pc, pen, tablet, ubuntu


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
pen not working on wp5540u tablet? db391 Linux - Hardware 2 12-15-2006 05:50 PM
Finepoint Innovations Pen PC Caeda Linux - Laptop and Netbook 2 07-10-2006 09:27 PM
automatic USB pen drive working fakie_flip Ubuntu 2 09-29-2005 08:29 AM
Usb Flash Pen Not Working wisdom Linux - Hardware 13 01-07-2005 06:47 PM
howto mount usb pen drive? name_in_use450 Linux - Hardware 2 08-24-2004 07:23 AM


All times are GMT -5. The time now is 08:16 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration