LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 01-19-2007, 04:02 PM   #31
zetan
LQ Newbie
 
Registered: Jan 2007
Location: Montréal,Qc.,CANADA
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0
Thumbs up Gateway tablet cx2720 on Gentoo and Ubuntu


Great job folks!!!

Just to share my experience struggling to configure this amazing tablet (for the price).

-It can work perfectly on Ubuntu 6.10. No need to hack the code of the fpit driver, just install the official fpit driver package from Ubuntu and replace your fpit_drv.so file with the one provided on the Ubuntu forum thread:

http://ubuntuforums.org/showthread.php?t=146279 (3rd page)

Also don't forget to make all the other changes mentionned in previous post... install setserial, modify serial.conf and add info about the driver in xorg.conf.

-On Gentoo... I am not running perfectly yet. For short, I am at the same stage as Kingofearth, the pen works, but the cursor jumps all around when I touch the screen. I tried both fpit drivers from Gentoo version 1.0.5 and 1.1.0. I commented out the line: if(!prox) buttons=0 from the source code before compiling and installing. I am pretty sure it enable the right click on the pen, but as expected does not solve the jumpiness of the cursor nor does the above proposed setting for serial.conf did solve the problem. (for me)

But there is hope... MEEKLES!!! I didn't have time yet to try your patch as I wanted to share my thoughts right NOW. It's been two weeks I started to struggle with this topic. I'll give a try right after finishing this post.

Thanks to all of you for your great insights. Once solved for my machine, I'll write an HOWTO on the Gentoo wiki just to make sure newcomers won't have to walk the purgatory as we did. By now, I think I know all the procedures by heart. Thanks to Meekles for his great job and the one to come. Thanks to Caeda for the precious info. Ok, I stop here as it becomes really cheesy...

zetan

p.s: By the way, great info on this thread to modify an ebuild before installing (like modifying source code):

http://forums.gentoo.org/viewtopic.php?t=5378
 
Old 01-19-2007, 05:13 PM   #32
meekles
LQ Newbie
 
Registered: Jan 2007
Location: Berkeley, CA
Distribution: Gentoo
Posts: 11

Rep: Reputation: 0
OK, thanks everyone!
I think I know what caused the xournal misbehavior gustafson experienced and how to fix it. Workaround is to uncheck Options -> Use XInput... never functioned at all for me!
Also happy to tackle other issues, but not in one patch---and I might need help reproducing the problems.

BUT! If the binary driver Mr. one_stinky_bum posted predates and beats my work, no need for me to reinvent it. So now I'll try it (if possible) on my machine and see if I can get any info about the source changes. (Can't find them, and /definitely/ can't find anything related in xorg's gitweb/bugzilla...)

Last comments directed at zetan: if you just want to add a patch to a modular X driver, it's even easier than that! All you need to do to the ebuild is add a line like this:
PATCHES="${FILESDIR}/xf86-input-fpit-1.1.0-RandR.patch"
Then drop the patch in files/, re-digest, and emerge. =)
But yeah, the ebuild cycle has been invaluable while coding / testing.
Also, let me know how the howto's going! Seems worthwhile to compare notes since I was eventually going to do that for my CX2726.
 
Old 01-19-2007, 06:00 PM   #33
zetan
LQ Newbie
 
Registered: Jan 2007
Location: Montréal,Qc.,CANADA
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0
Meekles, thanks for the tip on how to add a patch on a ebuild. I did a twist not orthodoxe... I think. Untar the source in the portage tree, applied the patch, tar the source, digest and emerge.

Still have the jumpy cursor. I am doing something wrong... Will unmerge, apply your patch with real method and remerge. Hope it will work. Leaving to see my girlfriend before she thinks I am dead.

By the way... Once unmerge, the fpit driver, how do I delete all files to start over, I mean emerge and redownload the sources from Gentoo repository?

See around

zetan
 
Old 01-19-2007, 06:19 PM   #34
meekles
LQ Newbie
 
Registered: Jan 2007
Location: Berkeley, CA
Distribution: Gentoo
Posts: 11

Rep: Reputation: 0
Sorry if this is drifting off-topic.
My patch will only help if the cursor moves too fast/slow or sideways to the direction of the pen.
In fact, your non-orthodox method probably worked =) For a better way to maintain non-official ebuilds google "PORTDIR_OVERLAY".
If you kept the modified source tree, ebuild blah.ebuild clean.
If you modified the ebuild in /usr/portage instead of using overlay stuff: emerge --sync.
If you literally re-tarred the package, do this to clean up & avoid a checksum mismatch:
rm /usr/portage/distfiles/xf86-input-fpit-1.1.0.tar.bz2
And, yeah, good call not ignoring your girlfriend in favor of a pen.
 
Old 01-19-2007, 08:03 PM   #35
kingofearth
LQ Newbie
 
Registered: Dec 2006
Posts: 11

Rep: Reputation: 0
I added the following code for debugging output:
Code:
FILE *debug;
                debug = fopen("/var/log/fpit.log", "a");
                fprintf(debug, "loop:%d\n", priv->fpitData[loop]);
                fprintf(debug, "loop + 1:%d\nloop + 2:%d\n", (int) priv->fpitData[loop + 1] & 0x7f, (int) priv->fpitData[loop + 2] & 0x7f);
                fprintf(debug, "loop + 3:%d\nloop + 4:%d\n", (int) priv->fpitData[loop + 3] & 0x7f, (int) priv->fpitData[loop + 4] & 0x7f);
                fprintf(debug, "loop + 2 shifted:%d\n", ((int) (priv->fpitData[loop + 2] & 0x7f) << 7));
                fprintf(debug, "loop + 4 shifted:%d\n", ((int) (priv->fpitData[loop + 4] & 0x7f) << 7));
                fprintf(debug, "X:%d Y:%d\n\n", x, y);
                fclose(debug);
It's kinda ugly, but the important stuff is in what it outputs.

And when resting the pen with the tip on the screen and the base on the keyboard to ensure there is absolutly no movement, I get the following output:

Code:
loop:152
loop + 1:6
loop + 2:102
loop + 3:30
loop + 4:0
loop + 2 shifted:13056
loop + 4 shifted:0
X:13062 Y:30

loop:158
loop + 1:24
loop + 2:6
loop + 3:102
loop + 4:102
loop + 2 shifted:768
loop + 4 shifted:13056
X:792 Y:13158

loop:128
loop + 1:0
loop + 2:96
loop + 3:0
loop + 4:0
loop + 2 shifted:12288
loop + 4 shifted:0
X:12288 Y:0

loop:152
loop + 1:6
loop + 2:102
loop + 3:6
loop + 4:0
loop + 2 shifted:13056
loop + 4 shifted:0
X:13062 Y:6

loop:152
loop + 1:6
loop + 2:102
loop + 3:102
loop + 4:0
loop + 2 shifted:13056
loop + 4 shifted:0
X:13062 Y:102
I then tried moving the pen from the top left to the bottom right on the screen, but I don't see any pattern as the output progresses, it seems like it's just pulling random numbers from somewhere.

And Meekles, thanks for your description on how that code works, now I know whats going on there, but unfortunatly, I guess thats not where the problem lies. The problem is in wherever priv->fpitData[loop] gets its data from. And like I said earlier, catting /dev/ttyS0 shows that it's getting appropriate output. So I'll see if I can mess around with the driver a little more and find out whats going on, but if anyone else could think of a reason as to why it's getting bad data, it would be greatly appreciated.

Edit: After looking through the source code some more, my limited C skills started showing. Maybe I could fix my problem if I new a bit more about XF86 API or something but, I don't really understand how these functions link together and where data is coming from or going to. I might try figuring it out a little later, or if someone could say what the problem could be I could probably try messing with the code to fix it, but otherwise I'll just hope someone who knows what they're doing fixes it soon.

Last edited by kingofearth; 01-20-2007 at 02:20 AM.
 
Old 01-21-2007, 01:58 AM   #36
kingofearth
LQ Newbie
 
Registered: Dec 2006
Posts: 11

Rep: Reputation: 0
Alright, I wanted to say that with Meekles' help via email I found the answer to my problem. Back when I couldn't even get my computer to recognize my pen at all, I was messing around with my serial.conf and I removed the baud_base 38400 part. If you are having the same problem that I was with random cursor movements, check your baud. And thanks again to Meekles for his help.

There are only a couple of smallish problems. First, the smallest problem is that using the tablet seems to take enough processing power to slow down beryl. It's not that big of a deal though. The second problem which matters a bit more, is that although I can get the pointer to go to all of the sides of the screen, I can't get it in the corners, which is where I need to get it in order to change windows. I can work around that a bit, but it would be nice if I could get some feedback on other people's experiences with getting the pointer into a corner and what their X and Y maximums and minimums are in xorg.conf.

Last edited by kingofearth; 01-21-2007 at 03:42 AM.
 
Old 01-22-2007, 09:26 PM   #37
zetan
LQ Newbie
 
Registered: Jan 2007
Location: Montréal,Qc.,CANADA
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0
Talking Gateway 2720 tablet jumpy cursor solved on my Gentoo

Yep, I also solve my freaking jumpy cursor problem too. To those who still suffer the problem, I expose the procedure that worked for my machine. I'm on Gentoo, so it might not apply exactly to your distro. Here it goes:

(As root!)

# dmesg | grep ttyS

This should print the info you should add to your serial.conf file.

For my gateway 2720 tablet, I get the following info from dmesg | grep ttyS:

serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

Therefore, I added this line to my serial.conf:

/dev/ttyS0 uart 16550a port 0x3f8 irq 4 baud_base 34800

You should change the previous to what outputs for YOUR machine and do not forget to add baud_base 34800. If you don't have the serial.conf file on your system, install the package named setserial. Then you can locate and edit it.

To try the new settings:

#/etc/init.d/serial restart

You should get an OK message from the system. Then restart X and it should work. If you want the serial to be configured every time you boot, type the following:

#rc-update add serial default

Hope it helps.

To KingOfEarth:

I don't have any problem to reach the extreme corner of my screen. I patched the fpit-1.1.0 driver from Gentoo with the Meekles work.

QUESTION to Meekles:

I saw in your patch that you changed the if(!prox) buttons=0 thing. But now, which kind of click should I get from the pen? It works, but it looks like a middle click. Not sure because it behaves differently than both my right and left click. What should I change to get a right click? thanks!

zetan
 
Old 01-22-2007, 09:39 PM   #38
zetan
LQ Newbie
 
Registered: Jan 2007
Location: Montréal,Qc.,CANADA
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0
Thumbs up

I forgot...

thanks very much Meekles for the patch and the xrandr aware addition. Just tried it... a charm!
 
Old 01-23-2007, 11:58 AM   #39
meekles
LQ Newbie
 
Registered: Jan 2007
Location: Berkeley, CA
Distribution: Gentoo
Posts: 11

Rep: Reputation: 0
zetan: Try xmodmap -e "pointer = 1 3 2" as mentioned in this thread's first post.
When you said you had things working perfectly in ubuntu, did that mean that rotation Just Worked? Or did it mean that you had multiple InputDevice sections for the tablet and had scripts to run xrandr and xsetpointer?

kingofearth: Try xinput (Gentoo: x11-misc/xinput, source: ftp://ftp.x.org/contrib/utilities/xinput-1.2.tar.gz).
If you run "xinput test TOUCHSCREEN", possibly after using xsetpointer to set the core pointer to something _else_, it should display coordinates whenever it sees a motion event. That might help with calibration. For the driver with my patch, I think the coordinates it displays will be the ones straight from the FPIT. For an unpatched driver, they'll have InvertX and InvertY transforms applied but not SwapXY.


I'm still working on a correct patch for both xinput and cursor events, but I'm also a grad student so I can't do this full-time. =)
I think I understand how touchscreen calibration code is supposed to work in X, so I'll try adding that too.

Last edited by meekles; 01-23-2007 at 12:21 PM.
 
Old 01-23-2007, 09:44 PM   #40
zetan
LQ Newbie
 
Registered: Jan 2007
Location: Montréal,Qc.,CANADA
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0
Talking

meekles: I didn't know xsetserial had to be installed first. Thought it was part of X. Everything is usable now. Rethanks.

When I said everything worked on ubuntu, I meant no jumpy cursor and effective right click for the pen button, but yes I had to write scripts to rotate the screen. So no, what you are doing is not useless. Will post when my version of HOWTO is complete. See you around. zetan
 
Old 01-24-2007, 06:08 PM   #41
meekles
LQ Newbie
 
Registered: Jan 2007
Location: Berkeley, CA
Distribution: Gentoo
Posts: 11

Rep: Reputation: 0
OK, crossing my fingers and releasing.
It's split into three patches (easy with Gentoo and unfortunately a pain for everyone else... to apply the patches manually you may need to enter the xf86-input-fpit-1.1.0 directory and use "patch -p1 ...")

How to use:
After installing the modified driver, add the line 'Option "TrackRandR"' to the InputDevice section.
(By default the driver is compatibly stupid, except for minor bug fixes. This is in case someone poor guy's set up 4 InputDevices and a rotation script.)
If you use Xournal, "Use XInput" should now work. HOWEVER, X won't emit extended events at all if you make your tablet the core pointer.
So don't do that. In particular, if you run 'xsetpointer TOUCHSCREEN' and 'xmodmap -e "pointer = 1 3 2"' in some script, you should append an xsetpointer line that restores the core pointer.
(On a related note, it seems like Xournal will crash if you use xsetpointer while it's running. So don't do that either.)

Where to download:
http://alumni.imsa.edu/~justinb/xf86...-cleanup.patch
http://alumni.imsa.edu/~justinb/xf86...t_button.patch
http://alumni.imsa.edu/~justinb/xf86...rotation.patch

I gave up on a fourth patch for runtime calibration. The XChangeDeviceControl interface is so broken that I'd rather not bother.
That doesn't stop anyone from writing an app to calculate the right settings, however... so X would only have to restart once.
 
Old 01-26-2007, 10:07 PM   #42
z35
LQ Newbie
 
Registered: Sep 2004
Posts: 6

Rep: Reputation: 0
greetings:

My pen is jumpy and randomly has button presses. I am trying to get it to work on a gateway cx2610
xorg.conf
Code:
Section "InputDevice"
    Identifier "touchscreen"
    Driver     "fpit"
    Option     "AlwaysCore"     "on"
    Option     "Device"        "/dev/ttyS0"
    Option     "MinimumXPosition"          "400"
    Option     "MaximumXPosition"          "12550"
    Option     "MinimumYPosition"          "400"
    Option     "MaximumYPosition"          "7650"
    Option     "ReportingMode" "Scaled"
   Option     "ButtonThreshold"       "17"
#    Option     "ButtonNumber"  "1"
 Option     "SendCoreEvents"
#    Option     "BaudRate" "38400"
    Option      "InvertY"
    Option "TrackRandR"
    Option "ZAxisMapping"   "4 5 6 7"
    Option "Emulate3Buttons"
EndSection
serial.conf
Code:
/dev/ttyS0 port 0x03f8 irq 4 baud_base 38400
I applied the three patches, rotation works, I just cannot figure out this spasming.
and I have tried all the uarts in setserial's man page. I have also tried baud_base 9600 19200 57600, but they were chaos...

Last edited by z35; 01-26-2007 at 10:20 PM.
 
Old 01-27-2007, 08:03 PM   #43
zetan
LQ Newbie
 
Registered: Jan 2007
Location: Montréal,Qc.,CANADA
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0
what outputs the following:

# dmesg | grep ttyS

The output should be what you put in your serial.conf
See previous post for the exact method. (post #37)

zetan

Last edited by zetan; 01-27-2007 at 08:05 PM.
 
Old 01-27-2007, 08:20 PM   #44
z35
LQ Newbie
 
Registered: Sep 2004
Posts: 6

Rep: Reputation: 0
it appears that is what is in my serial.conf
Code:
$ dmesg | grep ttyS
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

$ grep -vG "^#" /etc/serial.conf

/dev/ttyS0 port 0x03f8 irq 4 baud_base 38400 uart 16550A
added the uart 16550A, not that it changed anything

Last edited by z35; 01-27-2007 at 08:23 PM.
 
Old 01-27-2007, 09:05 PM   #45
meekles
LQ Newbie
 
Registered: Jan 2007
Location: Berkeley, CA
Distribution: Gentoo
Posts: 11

Rep: Reputation: 0
Correct baud settings should be 38400 in serial.conf and (for some bizarre reason) unset/19200 in xorg.conf. Looks like that's what you have.
A speed mismatch should be pretty easy to tell apart from other problems: symptoms are that nothing happens until you bring your pen close to the screen, and when you do so the cursor jumps and clicks entirely at random. (You don't even have to move the pen.)
If by jumpy you mean it jerks around a bit or only intermittently updates its position (but it basically follows the pen), you have a different problem. The FPIT driver's readme.txt suggested overheating as a cause, but I think that was only common with a certain Fujitsu Stylistic tablet.
 
  


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


All times are GMT -5. The time now is 11:40 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration