[SOLVED] Waveshare v2 rev2.1 + ups-lite = garbled screen

Hi there everyone, I have been trying to get my pwnagotchi to a usable point since the beginning of 2020. Now I have finally had it and wanted to ask the community for help as I am at my wits end.

The setup is pretty standard, an rpi0 with a ups-lite 1.2 and a waveshare e-ink v2 rev2.1 display, also an i2c rtc.

Now I can use the pwnagotchi fine with only the waveshare display attached, but when I also install the ups-lite, the screen does not initialize correctly and shows garbled crap.

I know about this solution right here: Serial (UART) not working on GPIO 14 and GPIO 15 - #6 by dave
(be aware that the post I quoted uses backtics which need to be replaced by single quotes, or the build scripts will throw errors)
which works every time but on the next reboots it’s back to showing garbage.

EDIT: Forgot to actually ask my question… oops. Does anyone actually have a permanent solution for this? Am I missing something when recompiling and installing the display driver with the alternative header, because it does not seem to survive more than one reboot?

UPDATE: Ok I think I must have missed some error or something when I recompiled the first time. I did it again and the screen problem is now fixed for me. So if anyone else is experiencing the same problem, try to rebuild the display driver by running these commands:

cd /usr/local/src/gratis/
sudo make rpi-remove PANEL_VERSION='V231_G2'
sudo make rpi-clean PANEL_VERSION='V231_G2'
sudo make rpi PANEL_VERSION='V231_G2' EPD_IO='epd_io_free_uart.h'
sudo make rpi-install PANEL_VERSION='V231_G2' EPD_IO='epd_io_free_uart.h'

How did you fix the 2.1 v2 display issue?

I don’t understand, the solution is right there in the post. you need to build the driver module with a different headerfile that does not block the gpio pins. just try running each command after the other