brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.15k stars 614 forks source link

Small Flicker Center Screen When Starting Conky #1182

Open 0pLuS0 opened 2 years ago

0pLuS0 commented 2 years ago

Issue

When I start Conky, I see a small flicker/flash appear in the middle of the screen, as a small white dot, or at least it appears to me as that shape, but it's so small and flickers/flashes by so fast, the shape might not actually be circular, either way, it's something small and white.

Trying to capture this flash/flicker in a screen shot is to difficult and I don't have any video recording apps...

Information

Slackware 15.0 - Openbox 3.6.1, conky-1.12.2, imlib2-1.4.9, lua-5.3.4, acpi-1.7, xorg-server-1.20.14, nvidia gtx 1060 6gb, nvidia-driver-470.63.01, on a 24" 1920x1080.

I use Picom, but I disabled Picom and still notice this issue without it running. The conky config I pasted, is the same one I used in Slackware 14.2 without this issue, so I'm assuming, with the latest version of Slackware and new updates in Linux for the libs, dependencies, Xorg, etc., it is affecting this issue, and I'm assuming Conky either needs an update, or I need to change something different in the config to correct this.

Conky was compiled from source, with these compile options from a slackware build script;

mkdir build cd build cmake .. \ -DCMAKE_INSTALL_PREFIX=/usr \ -DBUILD_CURL=OFF \ -DBUILD_DOCS=ON \ -DBUILD_XDBE=ON \ -DBUILD_IMLIB2=ON \ -DBUILD_RSS=OFF \ -DBUILD_WEATHER_METAR=OFF \ -DBUILD_WLAN=OFF \ -DBUILD_NVIDIA=ON \ -DBUILD_PULSEAUDIO=OFF \ -DMAINTAINER_MODE=ON \ -DCMAKE_BUILD_TYPE=Release \ make make install DESTDIR=$PKG

conky.config = {
override_utf8_locale = false,
background = true,
use_xft = true,
font = 'noto sans:size=10.5',
xftalpha = 0.8,
out_to_console = false,
out_to_stderr = false,
update_interval = 3.0,
total_run_times = 0,
draw_shades = false,

own_window = true,
own_window_class = 'Conky',
own_window_type = 'desktop',
own_window_transparent = true,
own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager,below',

own_window_argb_visual = true,

minimum_width = 1920,
maximum_width = 1920,

double_buffer = true,
default_color = 'cc44ff',
color1 = 'e0cdc3',

alignment = 'top_middle',
gap_y = 5,
no_buffers = true
}

conky.text = [[
${alignc}${color}CPU1: ${color1}${cpu cpu0}%   \
${color}CPU2: ${color1}${cpu cpu1}%   \
${color}CPU3: ${color1}${cpu cpu2}%   \
${color}CPU4: ${color1}${cpu cpu3}% - ${freq}MHz - ${hwmon 0 temp 1} °C   \
${color}GPU: ${color1}${nvidia gpuutil}% - ${nvidia temp} °C   \
${color}RAM: ${color1}${mem} - $memperc%   \
${color}SSD: ${color1}${fs_free /} free   \
${color}LAN: ${color1}${addr eth0} - ${downspeed eth0} down - ${upspeed eth0} up   \
${color}UP: ${color1}$uptime_short \
]];

Here's a screen shot, to show how conky looks at the top of my screen with the above config.

conky

0pLuS0 commented 2 years ago

After just posting this, I found, what appears to be a solution.

I changed own_window_type = 'desktop',

to

own_window_type = 'override',

I always assumed desktop was suppose to be used for Conky, hopefully someone can reply to explain the differences between using desktop and override?

When I used it before on desktop, I will typically see the flash/flicker everytime, or every other time. I have started conky around 12 times in a row with override and never once saw the flash/flicker, so I think it's the fix.

hmm

0pLuS0 commented 2 years ago

Any thoughts on this?

Man says;

 Override windows are not under the control of the window manager.  Hints are ignored. This type of window can
              be useful for certain situations.

I don't understand what it means that windows are not under the control of the window manager, and not sure what hints are ignored either?

I tried normal, but the small flicker still appears.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment, or this issue will be closed in 30 days.

0pLuS0 commented 1 year ago

I did comment before on the on Mar 24, 2022 reply.

It's stale, because no one replied to me.

So as I asked before;

I always assumed desktop was suppose to be used for Conky, hopefully someone can reply to explain the differences between using desktop and override?

Anyone?

THANKS

0pLuS0 commented 1 year ago

Hi @brndnmtthws

I just installed 1.19.4 and I still see this small ficker appear in the middle of the screen using own_window_type = 'desktop'.

I'm still trying to figure out if desktop is suppose to be the correct option to use?

I read that normal is the default, I tried it, but the same issue with the small flicker appearing.

This is my latest config file.

conky.config = {
override_utf8_locale = false,
background = true,
use_xft = true,
font = 'noto sans:size=10.5',
xftalpha = 0.8,
out_to_console = false,
out_to_stderr = false,
update_interval = 3.0,
total_run_times = 0,
draw_shades = false,

own_window = true,
own_window_class = 'Conky',
own_window_type = 'desktop',
own_window_transparent = true,
own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager,below',

own_window_argb_visual = true,

minimum_width = 2560,
maximum_width = 2560,

double_buffer = true,
default_color = 'cc44ff',
color1 = 'e0cdc3',

alignment = 'top_middle',
gap_y = 5,
no_buffers = true
}

conky.text = [[
${alignc}${color}CPU1: ${color1}${cpu cpu0}%   \
${color}CPU2: ${color1}${cpu cpu1}%   \
${color}CPU3: ${color1}${cpu cpu2}%   \
${color}CPU4: ${color1}${cpu cpu3}%   \
${color}CPU5: ${color1}${cpu cpu4}%   \
${color}CPU6: ${color1}${cpu cpu5}% - ${freq cpu0}MHz - ${hwmon 0 temp 1} °C   \
${color}GPU: ${color1}${nvidia gpuutil}% - ${nvidia temp} °C   \
${color}RAM: ${color1}${mem} - $memperc%   \
${color}SSD: ${color1}${fs_free /} free   \
${color}LAN: ${color1}${addr eth0} - ${downspeed eth0} down - ${upspeed eth0} up   \
${color}UP: ${color1}$uptime_short \
]]
0pLuS0 commented 11 months ago

@brndnmtthws

You around?

Been messing with this over a year, could really use some help please?

THANKS

Caellian commented 5 months ago

Sorry for waiting, there's a lot of issues and it's very time consuming to go through all of them. I've spent 8h this morning just closing several old ones which aren't bugs.

I always assumed desktop was suppose to be used for Conky, hopefully someone can reply to explain the differences between using desktop and override?

I don't understand what it means that windows are not under the control of the window manager, and not sure what hints are ignored either.

The hints in question are own_window_hints, see wm-spec for details.

I'm still trying to figure out if desktop is suppose to be the correct option to use?

Yes. The flicker likely occurs before conky manages to draw anything and that's normal - we can't make it start up faster without removing functionality.

This flicker happens only when you first start conky or every update? If it's every redraw, then it's a bug.

0pLuS0 commented 4 months ago

Hi @Caellian I certainly understand things can take time.

Well, all I know is, the previous versions never did this. I've never had conky have any flickers/flashes ever on my desktop and I've been using Conky since the project started.

This happens everytime I start Conky it does this, it's a small white flicker about the size of this letter ----> o It appears in the center of my screen.

Most config I have always seen use either normal or desktop, and they are what I used in the past too, but now override is the only option that makes the flicker go away. hmm

This truly doesn't seem right, this seems to be a bug now.

THANKS

Caellian commented 4 months ago

Right, by "every update" I meant to say "every time contents of the window change".

I added a low priority to your issue because I can't reproduce it with Openbox so it's likely an issue unique to your system.

I don't see anything from Slackware update announcement that would indicate why this issue occurs, if anything they improved XDG support and use a newer version of XFCE.

0pLuS0 commented 4 months ago

AHHHHH all this time, I finally stopped to consider the method in how I am starting Conky as the cluprit!

In the Openbox menu.xml file for the Openbox Menu I have this line for Conky;

~/.conky/conky_start.sh

This then goes to the /path; /home/foo/.conky with these contents; conky_start.sh horizontal.purple

The Openbox menu.xml runs the command to the conky script I made conky_start.sh with these cmds in it;

!/bin/sh

cd /home/foo/.conky conky -c horizontal.purple &

I went to the directory /home/foo/.conky and ran from the terminal ./conky_start.sh and this works.

I am really sorry for this issue report, as it just seems this method of how I start conky is the issue.

I just assumed this is an easy/simple way to start Conky from a script?

I also changed the contents of the bash script conky_start.sh to this instead and it still shows the flicker on the screen;

conky -c /home/foo/.conky/horizontal.purple &

I also changed the Openbox menu.xml command to just run conky directly to the conky script and I still get the flash;

conky -c ~/.conky/horizontal.purple &

How can I use a script to start Conky and get rid of this flash?

SORRY I didn't figure this out soonner! 😮‍💨

Here's a screen shot of the Openbox menu with the Conky entry I am trying to add in the menu.xml as I've just mentioned, so I can start Conky.

THANKS

Conky

Caellian commented 4 months ago

You can also just run conky from autostart file and menu directly, no need for a start script. I think the script is only useful if you want to do something (like collect some data) before conky starts.

I am really sorry for this issue report, as it just seems this method of how I start conky is the issue.

I also changed the contents of the bash script conky_start.sh to this instead and it still shows the flicker on the screen;

Not sure if you fixed the issue or not.

I'd try running conky with conky -d -c /home/foo/.conky/horizontal.purple and without & at the end as well. I don't think forking is necessary from the shell. Although, not sure if that will help.

I'm not sure why the issue occurs tbh, it would be helpful if you installed some screen recorder and shared a short clip of the problem (or just the frame with the flicker).

0pLuS0 commented 4 months ago

Hello @Caellian

I don't want to autostart Conky, I am trying to start Conky from the Openbox menu.

conky -d -c /home/foo/.conky/horizontal.purple doesn't work.

I don't have anything for screen recording or making a short clip.

It's just a small white dot, 1/4 the size of a rice grain, flashing for 1 second in the middle of the screen when starting conky.

I can run the cmd from a terminal and it's ok, or I can run the bash script from the directory and it's ok.

Openbox uses XML and I wonder if that's the problem... hmm

Here's a screen shot of how the command looks like in the Openbox menu.xml file.

menu xml

Here's how the command originally looked in the Openbox menu.xml.

orig menu xml

Then I placed the cmd conky -d -c /home/foo/.conky/horizontal.purple inside the conky_start.sh bash script to also try and start it, but the same issue with the flashing white dot appearing in the middle of the screen starting conky.

THANKS

0pLuS0 commented 4 months ago

I somewhat understand the description you gave for what desktop is, and I would say Openbox isn't like Gnome or KDE, it's certainly not a Desktop, but a Window Manager that can act alone as a DE.

I just know in the past I use to always use normal or desktop, but to be honest, I never really read about them, to understand what they actually mean.

So maybe for a Window Manager like Openbox that can be a standalone DE too, override is just fine?

In the Arch Linux Wiki for conky; https://wiki.archlinux.org/title/conky

It says; For the other Desktop environments/WM: Try editing conky.conf and adding/changing the following line:

own_window_type = 'override',

or

own_window_type = 'desktop',

hmm

THANKS

Caellian commented 2 months ago

I added brief descriptions of each to documentation: https://conky.cc/config_settings#own_window_type

On openbox override should be fine. It's doesn't work the best with mouse events I think but if you're not using those you can use it.

Usually "normal" is ideal if you have some sort of background (feh, DE icons, ...) because "desktop" will place conky in the same layer as (usually below) those and it won't be visible. But the reason the option is there because wildly different options work for different WM/DEs.

Does the flicker still occur with "override"?

0pLuS0 commented 2 months ago

@Caellian override is what I used to correct this, I mentioned that before...

I thought I mentioned that this actually appears to be a shell script issue, or maybe not, because I mentioned if I run conky from the terminal, or go to the directory where my conky script is at and run the script from there, this doesn't happen.

This only happens trying to run Conky from the Openbox menu.... THIS is the PROBLEM... :)

What I need to try and figure out, if anyone might know a better way to run it from the Openbox menu, with different commands in the script?

!/bin/sh

cd /home/foo/.conky conky -c horizontal.purple &

THANKS