1) Drop the USB speed to v1.1 speeds (necessary for this touchscreen to work unfortunately, although online people have reported theirs working without this step recently)
sudo nano /boot/cmdline.txt
Modify from:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
To: (changes in bold)
dwc_otg.lpm_enable=0 dwc_otg.speed=1 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
ctrl-x, y, enter to save.
2) Disable the screen saver
sudo nano /etc/lightdm/lightdm.conf
scroll down until you see
[SeatDefaults]
#xserver-command=X
Remove the starting ‘#’ from ‘#xserver-command=X” and add ” -s 0 -dpms” to the end so you have “xserver-command=X -s 0 -dpms” on that line.
ctrl-x, y, enter to save.
3) Create kernel with Displaylink/touchscreen support
Update first:
sudo apt-get update
sudo apt-get upgrade
Install requisites:
sudo apt-get install bc libncurses5-dev
cd ~
mkdir raspbian
cd raspbian
sudo git clone https://github.com/raspberrypi/linux –depth=1
sudo git clone https://github.com/raspberrypi/tools –depth=1
cd linux/
sudo make bcm2709_defcong (bcmrpi_defconfig for rpi v1)
sudo make menuconfig
Navigate to:
Device Drivers>Input Device Support>Touchscreens>USB Touchscreen Driver (hit Y to include. You may need to hit space while on Touchscreens to include the feature and it’s subcomponents – Thanks Richard!)
Hit esc until you’re back at Device Drivers.
Device Drivers>Graphics Support>Frame Buffer Devices>Displaylink USB Framebuffer support (hit Y to include)
Hit esc until prompted to save and select Yes.
Start kernel build:
sudo make -j 6 (takes a looong time)
sudo make -j 6 modules
sudo make modules_install
sudo cp /boot/kernel7.img /boot/kernel7-orig.img
sudo cp arch/arm/boot/Image /boot/kernel7.img
sudo reboot
Now you can run dmesg to make sure the touchscreen shows up properly.
4) Configure X11 to use the new display
sudo nano /etc/X11/xorg.conf
Right click and paste the following in and save:
Section "Device"
Identifier "uga"
driver "fbdev"
Option "fbdev" "/dev/fb1"
Option "ShadowFB" "off"
EndSection
Section “Monitor”
Identifier “monitor”
EndSection
Section “Screen”
Identifier “screen”
Device “uga”
Monitor “monitor”
EndSection
Section “ServerLayout”
Identifier “default”
Screen 0 “screen” 0 0
InputDevice “touchscreen” “CorePointer”
Option “Xinerama” “Off”
EndSection
Section “InputDevice”
Identifier “touchscreen”
Driver “evdev”
Option “Device” “/dev/input/by-id/usb-e2i_Technology__Inc._USB_Touchpanel_L000000000-event-if00”
Option “DeviceName” “touchscreen”
Option “ReportingMode” “Raw”
Option “SendCoreEvents” “On”
Option “Calibrate” “1”
Option “Calibration” “630 32000 1100 31800”
Option “InvertY” “true”
Option “InvertX” “true”
Option “SwapAxes” “false”
EndSection
5) Configure the xorg.conf file with your particular settings
If you’re lucky your display will be named the same as mine and you wont need to make any change. Type:
ls /dev/input/by-id/
and look through the output for the one that is your touchscreen. Now copy that long name and type
sudo nano /etc/X11/xorg.conf
and replace ‘usb-e2i_Technology__Inc._USB_Touchpanel_L000000000-event-if00’ with your display name.
6) Calibrate the screen (if my calibration settings didn’t work for you)
sudo apt-get install evtest
sudo evtest /dev/input/usb-e2i_Technology__Inc._USB_Touchpanel_L000000000-event-if00
again replacing ‘usb-e2i_Technology__Inc._USB_Touchpanel_L000000000-event-if00’ with your display name. Now follow Dane’s post to get the calibration values, and use
sudo nano /etc/X11/xorg.conf
to change the values.
Now if you reboot you should boot up on your mimo display with a working touchscreen!
Enjoy!