I bought a display with a i2c touchscreen from Aliexpress and hooked it up to my Raspberry Pi 3b+. The screen part works fine, however, the touchscreen part is flaky. When I just boot the pi, the touchscreen works for a bit, it, however, stops working after a few seconds. But touching the INT pin of the touchscreen makes it work again for a few seconds. What also works is taking a wire and connecting one end to ground and tapping the INT pin for a split second with the other end of the ground wire. This INT pin is the interrupt pin, it is high when nothing is happening but goes low once it's got a new message(e.g. a touch event). I think by tapping the INT pin with a ground wire or touching it I am stimulating a new message causing it to spring back to life until it fails again for some reason.
The INT pin is a direct connection from the touch chip to a raspberry pi gpio. But I have added a 5K resistor to 3V3 because the touch IC datasheet said I should have one between 1K and 10K to VDD. I tried other values of resistors(2K, 6K, 12K) and some work for longer periods of time than other values. But at some point, it always fails.
The reason I don't think the i2c data lines are at fault is because touching those lines once it stops working doesn't really do anything, but touching the INT pin does.
So my question is, why is my INT pin acting so weird? Is it a power supply issue? Is it maybe interference?(From the LCD data wires perhaps) How can I solve it?
Edit: Touch IC is Atmel mXT224. It is hooked up using a custom PCB. Traces are less than 5cm. 2.2K pullups on SDA and SCL. currently 12K pullup on INT. Other than that there is 3v3 and GND. To which I added a 100nF cap and 2x 1uF caps. And the i2c connection is raspberry pi software i2c with 10us delay.(So 10us clock I guess, which would translate to 100khz)