Calibrating touch screen in Linux (Ubuntu)

The other day i found a very special computer, that is built into a touch screen monitor (resistive i believe, comes with a stylus), in the trash. Its body is extremely rugged made of cast aluminium and with fat rubber protectors on the sides. Looking at it’s specs i found out it is equipped with an i7 processor, 2x11,1V batteries, SIM card reader, WiFi, SD card reader, 3xUSB. I’m pretty shure this thing was quite expensive when new and it can’t be that old either. There is no branding on it or anything, so i can’t look it up on google, but i’m starting to think i just found gold here. :stuck_out_tongue:

However i tried to fire it up, but the hard drive seems broken, so i made a bootable linux USB stick and it seems to work like a charm except for the drive.

The touch screen is completely uncalibrated though, so i was hoping to find a way to calibrate it.

I did find a site that might have the solution, but the thing is i’m totally green when it comes to Linux, so i was hoping someone here might give me a push?

Here is the site:https://wiki.ubuntu.com/Touchscreen

If i understand correctly i have to install a driver:

If your device is built into a laptop, you’ll have the best luck with the mtouch, touchright, touchwin, or touchit213 drivers. Likewise, non-Elo external touchscreens will most likely use touchit213. If your device is a tablet with stylus-only input, fujitsu is a popular maker of embedded tablet devices.

Not shure how to though…

To me this is black art:

Calibration

Thanks to the wonderful work of the freedesktop.org developers, calibration is no longer a black art in Linux. The calibration utility is included in Ubuntu 12.04 and later:

sudo apt-get install xinput-calibrator

And for 10.04, there’s a ppa available:

sudo add-apt-repository ppa:tias/xinput-calibrator-ppa
sudo apt-get update && sudo apt-get install xinput-calibrator

Packages and source files are available for other distroshere.

The use is pretty straight forward. I had issues getting it to work properly with HAL, however this will work regardless:

xinput_calibrator --output-type xinput

Follow the instructions pressing each target, and the calibration output will be printed to the terminal. The calibration will be set immediately, but will not survive reboots. If you’re using GDM, you can put the calibration command in your /etc/gdm/Init/Default. I placed calibration values for my XR-1 in both GDM and as a gnome startup script, since it uses automatic login:

/usr/bin/xinput set-prop “Sahara Touch-iT213 Serial TouchScreen” “Evdev Axis Inversion” 0 1
/usr/bin/xinput set-int-prop “Sahara Touch-iT213 Serial TouchScreen” “Evdev Axis Calibration” 32 27 2027 39 1977

Should i write these commands in the ‘terminal’?

Do i have to replace the hard drive and install a full installation of Ubuntu on it to get the drivers i need?

Is there a distro with all i need and ready to go once i install it?

$ sudo apt-get install xinput-calibrator

$ xinput_calibrator --output-type xinput

I’m a touch curious (sorry, no pun intended :slight_smile: ) Did you manage to write these commands in a terminal TheBellows and see if anything happens?

I did try a few commands, but i wonder if i might have removed (blacklisted?) the driver because now i can’t get any response from the touch screen at all.

I do find it in the list of USB devices though (using the command lsusb)

Is there a way to reverse it/remove it from the blacklist?

I think this was the command i shouldn’t have executed:

echo "blacklist usbtouchscreen" | sudo tee -a /etc/modprobe.d/blacklist.conf

Can i open the blacklist.conf file and remove it from there? Or is there another way to go about?

Can’t remember if i tried the specific commands you mentioned, though i tried a few that didn’t seem to work, but i’m notwhat they’re supposed to do so it’s hard to say if it works or not.

I’m not at my computer atm, so i can’t test it right now, but i’ll do it later.

Is there a way to reverse it/remove it from the blacklist?

I think this was the command i shouldn’t have executed:

echo "blacklist usbtouchscreen" | sudo tee -a /etc/modprobe.d/blacklist.conf

Can i open the blacklist.conf file and remove it from there? Or is there another way to go about?

Ah, yes you probably have blacklisted the driver with that command. Of course you can edit the file and remove the line, just keep in mind you’ll have to be root to edit the file. If you have a little text editor like gedit* you could probably execute:

sudo gedit /etc/modprobe.d/blacklist.conf

And take out the ‘blacklist usbtouchscreen’ line :slight_smile:

*Btw, if you haven’t gedit installed you could probably execute:

sudo apt-get install gedit

Looking at it’s specs i found out it is equipped with an i7 processor, 2x11,1V batteries, SIM card reader, WiFi, SD card reader, 3xUSB. I’m pretty shure this thing was quite expensive when new and it can’t be that old either. There is no branding on it or anything, so i can’t look it up on google, but i’m starting to think i just found gold here.

That’s pretty crazy. So, just an inoperative HDD and then it gets thrown into the trash? Wow.

Or perhaps it was some secret government spy who shredded the harddrive before dumping it. Or the next Edward Snowden :smiley:

Ah, yes you probably have blacklisted the driver with that command. Of course you can edit the file and remove the line, just keep in mind you’ll have to be root to edit the file. If you have a little text editor like gedit* you could probably execute:

sudo gedit /etc/modprobe.d/blacklist.conf

And take out the ‘blacklist usbtouchscreen’ line :slight_smile:

*Btw, if you haven’t gedit installed you could probably execute:

sudo apt-get install gedit

Hmmm, it doesn’t seem to be a line called so, but now the touch screen seems to respond again. I wonder, as i’m currently only running from a 8GB USB stick and the stick is too small for a full install (does this make sense?), does it record all the changes (for later bootups) i do to the blacklist file in the boot disk version?

Because i ran the command and it stopped responding, but now it’s suddenly back again…

I tried running the lines you mentioned

sudo apt-get install xinput-calibrator

and it told me this

Reading package lists... Done
Building dependency tree       
Reading state information... Done
gedit is already the newest version (3.18.3-0ubuntu4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

What is this ‘universe’ thingy?

ubuntu@ubuntu:~$ xinput_calibrator --output-type xinput

The program 'xinput_calibrator' is currently not installed. You can install it by typing:
sudo apt install xinput-calibrator
You will have to enable the component called 'universe'

That’s pretty crazy. So, just an inoperative HDD and then it gets thrown into the trash? Wow.

Or perhaps it was some secret government spy who shredded the harddrive before dumping it. Or the next Edward Snowden :smiley:

This is how Norwegian businesses operates , if it stops working, trash it and buy a new one. It’s a bad thing for the planet, but a good thing for me. :smiley:

It’s not the first time i’ve found fully functional or easily fixable stuff in the trash, there’s a reason i have my nose in it in the first place. :stuck_out_tongue:

First time i found a tablet with an i7 processor though, if you can classify it as a tablet that is. An iPad on steroids!

I tried running the lines you mentioned

sudo apt-get install xinput-calibrator

Okay, firstly, you’ve got an 8GB USB stick with Ubuntu live on it. Chance are, any changes you make will not be persistent across reboots. But wait, let me explain what I’d probably (the reason I say probably in bold is because I haven’t actually got the machine in front of me so…take this with a pinch of salt TheBellows! :slight_smile: ) do in your situation.

I would’ve thought that you won’t want to boot Ubuntu (or whatever distro you choose) off a USB stick anyhow. So is it not worth getting a cheap HD from somewhere first to replace the broken one? Pop that in. Then install Ubuntu proper from your USB stick onto your HD? From what I can gather you seem to have verified that Ubuntu boots and (by the looks of it) Linux is having a good go at driving the touch screen anyways (it probably only needs calibrating with the ‘xinput_calibrate’ program.) Ultimately your not going to want to boot off slower USB with <8GB of storage in the long run, so you’ve got to weigh up if you want to spend anything on it (unless you can dig up a HD from somewhere, shame that magic bin doesn’t deliver again TheBellows! :slight_smile: )

But getting back to your 8GB USB stick…

The ‘universe’ business is a repository thing TheBellows. You probably can enable it by typing something like:

sudo add-apt-repository universe

then (to update the package list):

sudo apt-get update

at the terminal. Then hopefully that might add the ‘universe’ repo. Then it might find the xinput_calibrate program to download after typing (once again):

sudo apt-get install xinput-calibrator

Then (if) that installs you can then try running xinput-calibrate :slight_smile:

But keep in mind that the chances are all these changes are not persistent across reboots :slight_smile:

Thank you 4Tey!

I will buy an SSD drive when i get the money for it, but for the meantime i’m stuck with the stick. I think i might have a 16GB micro SD card somewhere, but i must have hidden it in a clever spot.

This computer is probably a lot better than my mistreated i5 laptop anyway, so i think it’s well worth the investment of an SSD. Only thing it doesn’t have a keyboard, but if i can get the touch screen calibrated it might not be a problem.

The above seems to work well, though the calibration app seems to not reading my stylus properly. It seems like the calibration is upside down and mirrored, maybe it gets confused? It shows one crosshair in the upper left corner, i click it, another one shows up in the upper right corner, i click it, but nothing happens. I wonder if that because it’s upside down and mirrored, the calibration waits for a click to the left of the first crosshair perhaps?

ubuntu@ubuntu:~$ xinput_calibrator --output-type xinput
Warning: multiple calibratable devices found, calibrating last one (eGalax Inc. USB TouchController)
 use --device to select another one.
Calibrating EVDEV driver for "eGalax Inc. USB TouchController" id=15
 current calibration values (from XInput): min_x=42, max_x=1981 and min_y=42, max_y=1981

Hmm, I’m afraid you may have to do a bit of research on xinput_calibrate. Doesn’t that page you linked to in your first post -> https://wiki.ubuntu.com/Touchscreen mention about inverted axis? Alas, I’m not as lucky as you with finding a core i7 computer in the trash though, so unfortunately I know nothing about setting up a touch screen device TheBellows :unsure:

Personally I’d get a cheap USB keyboard and HD/SSD to start off, install, learn a bit of Unix etc (work on the touch screen aspect later…) My tip: Looking at Linux from outside the ‘little Linux audio sphere’, it is a very good operating system. If you are interested in computers in general then I recommend to look at the basics of the ‘terminal/command line’, file organisation etc… :slight_smile:

I wasn’t planning on digging too deep into Linux apart from getting everything on this up and running, to use it for visual and audio work and the usual browsing and stuff. If i can make it so that i can draw directly on the screen that would be great bonus.

I’m digging into it a bit more and i found some drivers that hopefully works for my touch screen, which i have identified as:

Bus 002 Device 009: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen

So i assume the drivers i need should be located at http://www.eeti.com.tw/drivers_Linux.html

and i also assume i need the latest 64 bit x86 drivers, now i just have to read up on how to install it…

which seems like an extremely complicated procedure, kernel HIDCORE patch, scripts and what not. Definately not the usual task for an average windows user.

TheBellows can I just ask: What is the full output if you just execute:

xinput_calibrator

(without adding --output-type xinput) at a terminal?

TheBellows can I just ask: What is the full output if you just execute:

xinput_calibrator

(without adding --output-type xinput) at a terminal?

Wow dude, that seemed to do the trick, it started the calibrator app and the calibrator now reacted as i was expecting it to and the touch screen now seems to work properly. You’re a genious 4Tey, thanks a bunch!

I also got some unexpected cash enough to buy a cheap Kingston ssd 240GB, so i’ll be installing a full distro on it. I think i’ll read a bit about the distros before choosing, though i think Ubuntu seems quite nice.

Okay TheBellows, seems you are on your Linux way. Good luck with your SSD :slight_smile:

Genius? Unfortunatly not me. However this is a spot of arpeggiation/scale work genius (listen carefully at 7:00 (brilliant chord change) and the superb poignant cadence at 9:01-9:02) Mr Bachs ‘analog synth’ can go very loud :wink: