pi-hole / PADD

PADD (formerly Chronometer2) is a more expansive version of the original chronometer.sh that is included with Pi-Hole. PADD provides in-depth information about your Pi-hole.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Centred layot makes screen flicker

FirstGeekDanny opened this issue · comments

First off let me just day, I LOVE the centred layout.

I have the official 7" Pi TFT screen and while the centred layout is gorgrous, the display now flickers... a LOT!

Please, can you try one thing to test?

Try to run PADD, without centering ./padd.sh -xoff 0 -yoff 0 and report. Is the flickering the same or less?

Okay, rebooted the pi with the changed config and it still flickers.

Thanks for the test.

We will try to find out what is causing the flickering.

Please change the following lines locally

PADD/padd.sh

Lines 935 to 936 in 89853fa

console_height=$(stty size | awk '{ print $1 }')
console_width=$(stty size | awk '{ print $2 }')

to

    console_width=$(tput cols)
    console_height=$(tput lines)

and see if this fixes the issue. You can (additionally) try to remove

PADD/padd.sh

Line 934 in 89853fa

sleep 0.1

Hmm, I'm a windows geek, not very good with editing things on linux.

Use the nano editor. Ctrl + o saves the file, Ctrl + x closes the editor.

Flickers a lot less, but still flickering...

Which of the two recommendation did you implement?

Could you make a video/screenrecording of the PADD flickering? So we could see when and how often the flickering is happening.

It's basically flickering once every 5 seconds before the dashboard is updated.

commented

I can confirm, having the same issue. Tried the proposed fix. Flickering improves, but not gone. I can support in testing.

I too am having the issue with a Elecrow 5" screen

@accordxtc Is it this one? If so, I'll try to buy one so we can better try to reproduce the issue ourselves.

@DL6ER I have the Elecrow 5" IPS touch screen model DIS00005R

@accordxtc

Elecrow 5" IPS touch screen model DIS00005R

I ordered one of them and we'll use it to verify our fix works as expected.

@DL6ER Thanks, before 3.9.0 it was working with no flicker

Please try if this special version fixes the issue

https://github.com/pi-hole/PADD/blob/no_flicker/padd.sh

Please, use this link to install the new code:
https://raw.githubusercontent.com/pi-hole/PADD/no_flicker/padd.sh

@yubiuser Nope this wont even launch padd and gives line 0: a syntax error near unexpected token 'newline'

Did you replace the original padd.sh with the new one?

Just to be sure,

The previous link posted above is linking to the gihub page to show the new code, but it's an HTML page, not the real code.

The new code is on this link:
https://raw.githubusercontent.com/pi-hole/PADD/no_flicker/padd.sh

@rdwebdesign Using your link worked. Screen flicker is gone for me

I received the display about half an hour ago. My observations are:

  1. Using a terminal in in the graphical interface: It does not flicker on master regardless of being in a window or being full-screen

signal-2022-12-16-151708

  1. Using the virtual console (Ctrl+Alt+F1): It does flicker on master
  2. Using the virtual console (Ctrl+Alt+F1): It does not flicker on no_flicker
signal-2022-12-16-152123.mp4

@yubiuser I'd be ready for approval when you open a PR.

Yup, it's fixed on my end too... no flickering here anymore.

If you leave it for a little while the layout goes a little crazy... but it still doesn't flicker...
20221216_173707

Thanks for the report. This is a different issue, just revealing itself now as we don't clear the whole screen anymore in the fixing branch.

Mhh.. looks like ps XXX failed. However, we don't use this command. Are you running something else on your Pi?

It's just the pihole with Cloudflared

I was wrong, we use ps

PADD/padd.sh

Lines 416 to 417 in 6676f56

ftl_cpu="$(ps -p "${ftlPID}" -o %cpu | tail -n1 | tr -d '[:space:]')"
ftl_mem_percentage="$(ps -p "${ftlPID}" -o %mem | tail -n1 | tr -d '[:space:]')"

I'm seeing a flicker on mine and the "no_flicker" links are reporting 404 errors when I try to pull the file to test.

no_flicker was deleted after it got merged into development. We'll release a bugfix release soon.