Giter Site home page Giter Site logo

Comments (31)

metal450 avatar metal450 commented on June 10, 2024 1

2024-04-23 10 26 43

from conky.

Caellian avatar Caellian commented on June 10, 2024

@metal450 you need to answer a few questions first:

  • what's the output of running conky -v
  • are you running Plasma on Wayland or X11
  • can you start conky normally (without autostart)
    • if not, what's the output of running conky -DD from the console.
  • can you share your conky config file

from conky.

metal450 avatar metal450 commented on June 10, 2024

Thanks for the quick reply.

what's the output of running conky -v

conky 1.12.2 compiled 2022-02-23 for Linux x86_64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky


 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * IRC
  * Curl
  * RSS
  * ICal
  * iconv
  * Weather (METAR)
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * builtin default configuration
  * old configuration syntax
  * Imlib2
  * OSS mixer support
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support
  * PulseAudio

 Lua bindings:
  * Cairo
  * Imlib2
  * RSVG
 X11:
  * Xdamage extension
  * Xinerama extension (virtual display)
  * Xshape extension (click through)
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window
  * HSV Gradient

 Music detection:
  * Audacious
  * CMUS
  * MPD
  * MOC
  * XMMS2

 Default values:
  * Netdevice: eno1
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/share/locale
  * Maximum netdevices: 256
  * Maximum text size: 16384
  * Size text buffer: 256

are you running Plasma on Wayland or X11

X11

can you start conky normally (without autostart)

Yep, manual start works fine (both from terminal and via .desktop file).

As one more piece of info, I found that after adding conky to System Settings->Autostart, I can immediately try launching it there (via the "play" button), even without needing to logout and login - and that also doesn't seem to work (screenshot below). I've tried every combination of commands I've found online from people with autostart issues - i.e. setting the workpath to the folder with conky's config, specifying the config file with -c, including -q or not, including -daemonize or not, including --pause=n with longer times, specifying the full path to /usr/bin/conky, etc. It does show output from conky - but no "conky" task remains running & the conky itself never appears:

2024-04-23 06 48 42

if not, what's the output of running conky -DD from the console.

(It does work from terminal, but here's the output anyway):

$ conky -DD
DEBUG(0) [./src/conky.cc:2603]: reading contents from config file '/home/xxx/.config/conky/conky.conf'
DEBUG(0) [./src/x11.cc:400]: enter init_X11()
DEBUG(0) [./src/x11.cc:481]: Fixed xinerama area to: 0 0 1920 1080
DEBUG(0) [./src/x11.cc:432]: leave init_X11()
DEBUG(0) [./src/x11.cc:641]: enter init_window()
DEBUG(0) [./src/x11.cc:481]: Fixed xinerama area to: 0 0 1920 1080
conky: desktop window (e00028) is subwindow of root window (76e)
DEBUG(0) [./src/x11.cc:620]: Found ARGB Visual
conky: window type - normal
conky: drawing to created window (0x6200002)
DEBUG(0) [./src/x11.cc:994]: leave init_window()
conky: drawing to double buffer
DEBUG(1) [./src/core.cc:2059]: no templates to replace
DEBUG(1) [./src/core.cc:689]: Adding $cpu for CPU 0
DEBUG(1) [./src/core.cc:703]: Adding $cpubar for CPU 0
conky: forked to background, pid is 17619
$ 
DEBUG(1) [./src/fonts.cc:93]: setting up fonts
DEBUG(1) [./src/fonts.cc:148]: loading fonts
DEBUG(1) [./src/fonts.cc:93]: setting up fonts
DEBUG(1) [./src/fonts.cc:93]: setting up fonts
DEBUG(0) [./src/specials.cc:560]: reallocing graph from 0 to 85
DEBUG(0) [./src/specials.cc:560]: reallocing graph from 0 to 85
DEBUG(1) [./src/fonts.cc:148]: loading fonts
DEBUG(1) [./src/fonts.cc:93]: setting up fonts
DEBUG(1) [./src/fonts.cc:93]: setting up fonts
DEBUG(1) [./src/fonts.cc:93]: setting up fonts
DEBUG(1) [./src/fonts.cc:148]: loading fonts
DEBUG(1) [./src/fonts.cc:93]: setting up fonts
DEBUG(1) [./src/fonts.cc:148]: loading fonts
DEBUG(1) [./src/fonts.cc:93]: setting up fonts

...loading fonts & setting up fonts continues repeating

Thanks again!

from conky.

Caellian avatar Caellian commented on June 10, 2024

Interesting, what happens when you run conky from autostart options with conky -DD. I'm hoping it produces some X11 error or warning somewhere in the log below the "Start" button that way.

The "setting up fonts" thing is not the issue. Your config is also fine, the window type should be "normal" for Plasma.

from conky.

Caellian avatar Caellian commented on June 10, 2024

Can you check whether the error still happens with the latest conky (you're running quite an old version) or it starts normally?

Also, what's the output if you autostart with echo y | gdb -ex=r --args conky -DD (requires gdb installed), I suspect conky might be crashing somewhere in init_x11 function.

from conky.

metal450 avatar metal450 commented on June 10, 2024

Can you check whether the error still happens with the latest conky (you're running quite an old version) or it starts normally?

Same issue. Here's the log if I change AutoStart to run the latest AppImage:

Uploading 2024-04-23 11.06.52.png…

what's the output if you autostart with echo y | gdb -ex=r --args conky -DD

Can't seem to get it to take the "y". I tried it both as an application (by running it with command=bash, arguments="echo y | gdb -ex=r --args conky -DD --pause=5 -c /home/metal450/.config/conky/conky.conf"), and by making a separate script & running it as a logon script. I get (gdb) Undefined command: "y". I see you're trying to get it to answer the debuginfod question, so I also tried set debuginfod enabled on in the script before calling gdb, but it still asks. So...can't get that to run.

from conky.

Caellian avatar Caellian commented on June 10, 2024

Okay, I'll install plasma sometime this week and let you know.

You can try starting from .xinitrc with delay, or using systemd unit files.

I think this might be happening because Plasma doesn't pass necessary X11 environment variables for to conky (e.g. same happens when running with doas). But that's just a guess. In any case, I feel it should definitely be reporting what went wrong in the console.

from conky.

metal450 avatar metal450 commented on June 10, 2024

Okay, I'll install plasma sometime this week and let you know.

Thanks, that'd be great

You can try starting from .xinitrc with delay, or using systemd unit files

Hmm, not super experienced with either but couldn't get them working unortunately. For systemd, after a quick Google the first thread I found recommends against using it for Conky: https://bbs.archlinux.org/viewtopic.php?id=181611 . For .xinitrc, Plasma didn't seem to run it at all.

In any event, if you're going to be looking into it, I'll just hang tight and keep launching it manually for now. I can't even tell you how many hours I've already spent grappling with this (or how many threads I've read that just concluded with "I gave up, it won't autoboot. I just run it manually after every reboot.") 😢

In any case, I feel it should definitely be reporting what went wrong in the console.

Yeah, definitely could use some reporting on why it fails.

from conky.

lineage-of-roots avatar lineage-of-roots commented on June 10, 2024

@metal450

Here's how I do it on KDE Plasma, it works fine.

Create a conky.desktop file in ~/.config/autostart

It should look something like this

[Desktop Entry]
Type=Application
Exec=sh "/home/some_where_the_startup_script_is_located/conky-startup.sh"
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=Conky
OnlyShowIn=KDE;
Comment=

The above mentioned conky-startup.sh file should look something like this

#!/bin/sh
sleep 6s
killall conky
cd "/home/somewhere_to_conky_rc_files_folder"
conky -c "your-conkyrc-file" &
sleep 1
conky -c "your-other-conkyrc-file" &
sleep 1
cd "/home/somewhere_other_conkyrc_files_may_be_stored"
conky -c "your-conkyrc-file-over-here" &

For good measure, can you please share your conkyrc config file. There might be something wrong in it.
And don't forget to do a chmod +x on the conky-startup.sh file

from conky.

metal450 avatar metal450 commented on June 10, 2024

Hi, Thanks for the idea. Tried exactly that. Unfortunately the result is identical.

Here's the config file. I'm sure it's not done an ideal way, but it has worked on Plasma 5 for years:

conky.config = {
    alignment="top_middle",
    draw_borders=false,
    minimum_height=5,
    minimum_width=1150,

    background=true,
    update_interval=1,
    double_buffer=true,
    no_buffers=true,
    imlib_cache_size=10,
    draw_shades=false,
    draw_outline=false,
    draw_graph_borders=true,
    show_graph_scale=false,

    gap_x=0,
    gap_y=0,

    own_window=true,
    own_window_transparent=true,
    own_window_type="normal",
    own_window_hints="undecorated,below,skip_taskbar,skip_pager",

    own_window_argb_visual=true,
    own_window_argb_value=0,

    use_xft=true,
    xftalpha=1,
    font="Droid Sans:size=10",
    text_buffer_size=256,
    override_utf8_locale=true,
    default_color='FFFFFF',
    color0='FFFFFF',
    color1='FFFFFF',
}

conky.text = [[
${goto 0}${offset 15}${font Arial:size=10}${time %a %b %d}${voffset -5}
${goto 0}${font Arial:size=30}${time %H:%M}${font Arial:size=10}
${goto 0}${offset 35}Local

${voffset -83}\
${goto 120}${offset 15}${font Arial:size=10}${tztime UTC %a %b %d}${voffset -5}
${goto 120}${font Arial:size=30}${tztime UTC %H:%M}${font Arial:size=10}
${goto 120}${offset 34}UTC

${voffset -83}\
${goto 240}${offset 15}${font Arial:size=10}${tztime America/Los_Angeles %a %b %d}${voffset -5}
${goto 240}${font Arial:size=30}${tztime America/Los_Angeles %H:%M}${font Arial:size=10}
${goto 240}${offset 14}Los Angeles

${voffset -83}\
${goto 370}${offset 15}${font Arial:size=10}${tztime Asia/Tokyo %a %b %d}${voffset -5}
${goto 370}${font Arial:size=30}${tztime Asia/Tokyo %H:%M}${font Arial:size=10}
${goto 370}${offset 34}Tokyo
#
# System stats (cpu/storage)

${voffset -83}\
${goto 500}CPU Usage: $color $cpu%
${goto 500}${voffset -5}${cpubar 3,170}
${goto 500}$color${fs_used /} used ${fs_free /} free
${goto 500}${voffset -5}${fs_bar 3,170 /}
${goto 500}$color${fs_used /media} used ${fs_free /media} free
${goto 500}${voffset -5}${fs_bar 3,170 /media}\

# Network. Find adaptor name with "nmcli dev status".
#
${goto 500}${color 666666}${upspeedgraph wlo1 25,85 666666 666666 -t}\
${color 666666}${downspeedgraph wlo1 25,85 666666 666666 -t}\
# Network speed text
${goto 500}${voffset 10}${color 770000}${font Arial:size=11:style=Bold}↑${upspeed wlo1}\
${goto 585}${voffset -25}${color 007700}↓${downspeed wlo1}
${voffset 48}
#
# Right side clocks

${voffset -194}$color\
${goto 680}${offset 15}${font Arial:size=10}${tztime Asia/Bangkok %a %b %d}${voffset -5}
${goto 680}${font Arial:size=30}${tztime Asia/Bangkok %H:%M}${font Arial:size=10}
${goto 680}${offset 28}Bangkok

${voffset -83}\
${goto 800}${offset 15}${font Arial:size=10}${tztime Europe/Berlin %a %b %d}${voffset -5}
${goto 800}${font Arial:size=30}${tztime Europe/Berlin %H:%M}${font Arial:size=10}
${goto 800}${offset 30}Munich

${voffset -83}\
${goto 920}${offset 15}${font Arial:size=10}${tztime Asia/Kolkata %a %b %d}${voffset -5}
${goto 920}${font Arial:size=30}${tztime Asia/Kolkata %H:%M}${font Arial:size=10}
${goto 920}${offset 30}Kolkata

${voffset -83}\
${goto 1040}${offset 15}${font Arial:size=10}${tztime America/Bogota %a %b %d}${voffset -5}
${goto 1040}${font Arial:size=30}${tztime America/Bogota %H:%M}${font Arial:size=10}
${goto 1040}${offset 25}Medellin
${voffset -710}]]

from conky.

lineage-of-roots avatar lineage-of-roots commented on June 10, 2024

@metal450

I suspect that conky is starting just fine. With my method or your earlier tries.
Search for it in the task manager/process viewer to confirm.

What I am seeing from your config is that it's getting drawn as a thin 5 pixel wide sliver.
You might not have seen it, or its hiding under your taskbar.

Now, this could be because we are on different conky versions.

Or this could be what's happening on your system as well.

from conky.

metal450 avatar metal450 commented on June 10, 2024

Search for it in the task manager/process viewer to confirm.

Did previously - that's what I meant by "but no "conky" task remains running " here.

it's getting drawn as a thin 5 pixel wide sliver.

That's not the case - per the same post above, it works fine if launched manually:

2024-04-24_07 41 59

Only when run via autolaunch does it not appear (no conky task is running in the task manager).

from conky.

lineage-of-roots avatar lineage-of-roots commented on June 10, 2024

Think_sliver

That's what it looks like when I run your exact conkyrc

from conky.

metal450 avatar metal450 commented on June 10, 2024

Interesting. Maybe down to screen resolution / scaling / etc. In any event, there's no task in the taskmanager so it's definitely not running on my end (if started via autostart)

from conky.

lineage-of-roots avatar lineage-of-roots commented on June 10, 2024

@metal450

I just tried your config with my method of KDE Plasma autostart alongside my usual one.

Mine starts fine.
Your config causes conky to crash and core dump.
I don't know what to make of that yet.

There's something about your config file that's making conky crash...in some situations, but not others.

If this also has something to do with something in KDE plasma...That might be way too much to uncover.

from conky.

lineage-of-roots avatar lineage-of-roots commented on June 10, 2024

Scrap the core dump. I mistakenly looked at an older one from a different experiment I was doing with conky.

I still have no idea what is happening with this config though. Or what's different about it.
This one just won't start with autostart.

from conky.

lineage-of-roots avatar lineage-of-roots commented on June 10, 2024

@metal450

Success! I got it to work with autostart by increasing the sleep duration in the script

Right now I had it sleep for 26 seconds before starting conky. (Previously It was 6 seconds)
Could be lower duration, but it's a success for now.

Hypothesis: Something in plasma hasn't started/loaded yet when conky tries to start.
If I were to bet, it probably has something to with the several tztime/s in your config.

The thin sliver was probably because I was trying it on Fluxbox.

It's interesting that it gets rendered differently on Plasma.

from conky.

metal450 avatar metal450 commented on June 10, 2024

Not for me. If I autostart it as a script that uses sleep 26s & then runs conky, I can see the script process in the system monitor during the wait period, then after 26s later, it exits, but no conky.

Interestingly, if I similarly do the autostart as conky --daemonize --pause=26 -c /home/xx/.config/conky/conky.conf, then I can see the actual process in the system monitor after the PC boots. 26 sec later, it disappears (apparently crashes).

from conky.

metal450 avatar metal450 commented on June 10, 2024

...and Plasma is definitely started by then - I can manually start it much sooner than that, and it works. Only doesn't work when autostarted.

If my start script is like

#!/bin/sh
sleep 26s
killall conky
cd "/home/xx/.config/conky/"
conky -c "conky.conf" &

Then I can manually start it, and it works (I'll have my manually started conky process, and the script waiting process). Then the script kills my conky process, but doesn't start its own.

No matter what, it works when I manually start it but not when it autoruns.

from conky.

lineage-of-roots avatar lineage-of-roots commented on June 10, 2024

@metal450

I don't think it's crashing. I didn't see any core dumps in the logs. (I could have missed it though)

I think it's just exiting.

...and Plasma is definitely started by then...

Some component might not be loaded in yet.

Perhaps try 36 seconds? It definitely starts for me at 26 seconds sleep.

And just to confirm...In KDE the autostart has to point to the .desktop file which then executes the script. (That's how it works for me)

On second thought.....Try both. Try adding the script directly to autostart as well. Just increase the sleep time to 36 seconds.
One of them might work.

Please also also make sure nothing else remaining(From previous attempts) is issuing a "killall conky" command.

I also recommend installing gnome-logs (simple way of going through the logs)
Tell us if you see anything interesting in there.

from conky.

Caellian avatar Caellian commented on June 10, 2024

@metal450 Do you mind compiling and running debug/plasma6-exit-in-x11-init branch? I added a bunch of debug statements and it will give us more info where autostart is failing.

from conky.

metal450 avatar metal450 commented on June 10, 2024

@lineage-of-roots

Some component might not be loaded in yet. [...] Perhaps try 36 seconds?

Again, I can start it manually much sooner than that. So: 1) system boots & starts the 26sec timer; 2) I manually launch conky & it works just fine (so everything it needs to run has clearly already been loaded); 3) 26sec elapses and the script continues, killing the conky I started manually via killall and then trying to launch conky itself, which never appears. If it were just a matter of the system not being loaded yet...then it wouldn't work when I start it manually, which I do long before the timer elapses & it tries to autostart it.

Try both.

U mean both adding it as an application and as a script? If so, have tried both (mentioned above)

Please also also make sure nothing else remaining(From previous attempts) is issuing a "killall conky" command.

I've tried script with and without killall. And when launching as application directly, there would be no killall.

@Caellian

Sure, here it is:

2024-04-25_18 52 43

from conky.

Caellian avatar Caellian commented on June 10, 2024

Just to check, what happens if you use above window hint instead of below, and also while you're at it, disable background setting so conky doesn't fork:

background=false,
own_window_hints="undecorated,above,skip_taskbar,skip_pager",

I was reading the log backwards (bc it's in reverse)... Anyway, log seems to stop after forking, which would prevent it from containing any crash details in the first place. Might be just that below places it below Plasma's background window and it looks like it's not running because the process was forked, maybe it crashes but we can't tell because forking stops log from showing up in Autostart options panel.

from conky.

metal450 avatar metal450 commented on June 10, 2024

Hmm...weird, I changed both those in my config but I'm still seeing it fork. Here, I set a long delay so I could actually show everything as it occurs. I started capturing after logging in but within the 30second "pause" - you can see conky in the task monitor, then the log shows it forking, then it disappears from the task monitor.

Peek 2024-04-25 19-29

As far as it being behind Plasma but actually running...I don't think so, because there's no instance of "conky" left in the task monitor...

from conky.

Caellian avatar Caellian commented on June 10, 2024

@metal450 Your conky arguments contain --daemonize. Remove it from both conky.desktop arguments and the config file.

I don't think startup delay will do much, it's only useful if conky is started before WM which shouldn't be the case with Plasma autorun as it launches apps after that.

from conky.

metal450 avatar metal450 commented on June 10, 2024

It worked - that made it actually autostart. (of course now it's on top of other apps)

from conky.

Caellian avatar Caellian commented on June 10, 2024

Right, replace "above" with "below" in window hints and that should be it.

Not sure why plasma kills conky, it might just be "cleaning up" or something, but it makes sense for it to expect processes to "keep running". This is not something we can address on our side, nor do I think KDE devs should on theirs - run conky as a single process in that usecase.

If you want, you can create a copy .desktop file for running conky with autostart.

from conky.

lineage-of-roots avatar lineage-of-roots commented on June 10, 2024

@metal450

It turns out the sleep wasn't required at all. I had forgotten about my own conky doing a killall on your config that I was testing. I had randomly increased the sleep time to 26.

For me, I can now autostart your config(Without any changes), without the sleep now.

This probably means there's something different about your Plasma install or your Distro.

from conky.

metal450 avatar metal450 commented on June 10, 2024

@Caellian

This is not something we can address on our side, nor do I think KDE devs should on theirs - run conky as a single process in that usecase.

Fair enough. However, it's pretty unintuitive to debug & I can't imagine how anyone experiencing this issue would have any idea what's going on (I've seen so many threads with people trying to figure out why it fails to autorun). I'd suggest at least supplementing the log - i.e. all it needs is something as simple/clear as forked to background, pid is n. Note: logs will end here, set background=true & run without --daemonize for continued logging in case of run failures

Thanks for the help!

from conky.

Caellian avatar Caellian commented on June 10, 2024

Ideally I'd like to switch conky to spdlog which will allow us to store logs in a file. This would both address your concern and also some other cases where log output can't be reasonably accessed (e.g. crash from xinit during startup).

The issue with that is that there's ~450 log statements all over the code so it'd greatly disrupt everyone who's working on it not to mention that the format string is completely different so they'd have trouble migrating their changes as well.

from conky.

metal450 avatar metal450 commented on June 10, 2024

Yeah, better long term solution for sure - but as you say a much heavier lift. So in the interim, adding some simple extra verbiage when it forks would be an immediate help if/until the logging is completely migrated over ;)

from conky.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.