I just got a refurbished S5 and installed the latest Lineage OS (lineage-14.1-20171123-nightly-klte-signed on it. Most of the time everything works normal. Sometimes, however, the graphics gets really weird (see images).
Other family members have the same phone and I also flashed Lineage on them without experiencing these problems. Therefore, it cannot be a general problem. Any ideas about what might be wrong with the phone and how to fix it?
Edit: This problem was also reported here but no solution was documented.