Closed hrueger closed 1 year ago
Hi @hrueger, it is the first time that I hear a problem like your one. I think that it may be related to having two touchscreens connected.
I will check the code if I found something strange. In the mean time could you check what happens if only one touchscreen is connected ?
I am sure that you already did, but please could you check if the environment variable DISPLAY is set ?
Hi, I'll check that later today. I rebooted quite often and I'm using SSH, so maybe I forgot to set DISPLAY while testing this lib.
Ok, in the meantime I updated the devel
branch adding a better diagnosis when DISPLAY is not set correctly.
By the way, I had to install libxrandr-dev
, otherwise make
fails:
~/xlibinput_calibrator/src$ make
g++ -MT main.o -MMD -MP -MF .d/main.Td -Wall -pedantic -std=c++17 -DHAVE_X11_XRANDR -c -o main.o main.cc
mv -f .d/main.Td .d/main.d
g++ -MT gui_x11.o -MMD -MP -MF .d/gui_x11.Td -Wall -pedantic -std=c++17 -DHAVE_X11_XRANDR -c -o gui_x11.o gui_x11.cc
gui_x11.cc:31:10: fatal error: X11/extensions/Xrandr.h: No such file or directory
31 | #include <X11/extensions/Xrandr.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:47: gui_x11.o] Error 1
(just because the readme states that xrandr is optional)
OK, it works perfectly now. Seems like I indeed missed to set the DISPLAY
env variable after rebooting. Thanks for your tip ;-)
By the way, I had to install
libxrandr-dev
, otherwisemake
fails:~/xlibinput_calibrator/src$ make g++ -MT main.o -MMD -MP -MF .d/main.Td -Wall -pedantic -std=c++17 -DHAVE_X11_XRANDR -c -o main.o main.cc mv -f .d/main.Td .d/main.d g++ -MT gui_x11.o -MMD -MP -MF .d/gui_x11.Td -Wall -pedantic -std=c++17 -DHAVE_X11_XRANDR -c -o gui_x11.o gui_x11.cc gui_x11.cc:31:10: fatal error: X11/extensions/Xrandr.h: No such file or directory 31 | #include <X11/extensions/Xrandr.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:47: gui_x11.o] Error 1
(just because the readme states that xrandr is optional)
Thank, this is an useful feedback; it is possible to avoid randr commenting the following line in src/Makefile
# uncomment the lines below if you want to use xrandr extension set
CXXFLAGS+= -DHAVE_X11_XRANDR
I have to point out this in the README.
Hi @kreijack, I wanted to try this on a raspberry pi 4 with two touchscreens connected. After installing
git
,libx11-dev
,libxi-dev
andlibxrandr-dev
, it builds fine withmake
. However, when running./xlibinput_calibrator
or./xlibinput_calibrator --list-devices
, it immediately exits withSegmentation fault
. Is that a known issue?I'm using Pi OS 64bit, so arm64.