View previous topic :: View next topic |
Author |
Message |
ExecutorElassus Veteran
Joined: 11 Mar 2004 Posts: 1451 Location: Berlin, Germany
|
Posted: Thu May 30, 2024 7:18 am Post subject: fixing conky/cairo/xlib [SOLVED] |
|
|
So, I have a somewhat old conky config, and I understand there have been some issues updating conky to use cairo/xlib (see here). Now, having updated my conky version to 1.21.1, the radial graphs that I use for the clock and monitors no longer display, and I get a constant scroll in the console of this error:
Code: | conky: llua_do_call: function conky_main execution failed: /home/elassus/.conky/conky_grey.lua:532: attempt to call a nil value (global 'cairo_xlib_surface_create')
|
In the file, that line is part of this set of functions:
Code: | function conky_main()
if conky_window == nil then
return
end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local display = cairo_create(cs)
local updates = conky_parse('${updates}')
update_num = tonumber(updates)
if update_num > 5 then
go_clock_rings(display)
go_gauge_rings(display)
end
cairo_surface_destroy(cs)
cairo_destroy(display)
end
|
Line 532 is the one that starts "local cs = cairo_…"
These are the USE flags for emering conky:
Code: | # emerge -pv conky::gentoo
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 3.23 s (backtrack: 0/20).
[ebuild R ] app-admin/conky-1.21.1::gentoo USE="X bundled-toluapp colour-name-map curl hddtemp iconv imlib lua-cairo lua-cairo-xlib lua-imlib lua-rsvg ncurses portmon rss truetype wayland -apcupsd -cmus -doc -extras -ical -intel-backlight -iostats -irc -math -moc -mpd -mysql -nvidia -pulseaudio -systemd -test -thinkpad -webserver -wifi -xinerama -xmms2" LUA_SINGLE_TARGET="lua5-4" 0 KiB
Total: 1 package (1 reinstall), Size of downloads: 0 KiB
|
Thanks for the help,
EE
Last edited by ExecutorElassus on Thu May 30, 2024 1:45 pm; edited 1 time in total |
|
Back to top |
|
|
rab0171610 Guru
Joined: 24 Dec 2022 Posts: 423
|
Posted: Thu May 30, 2024 9:44 am Post subject: |
|
|
It would be interesting to know if you are having this problem on X or Wayland or both.
Consider filing a bug upstream on Github. If you think it is somehow Gentoo or ebuild specific, then file it with Gentoo.
For elimination purposes, try stable version (1.19. and see if the issue still persists. |
|
Back to top |
|
|
ExecutorElassus Veteran
Joined: 11 Mar 2004 Posts: 1451 Location: Berlin, Germany
|
Posted: Thu May 30, 2024 10:47 am Post subject: |
|
|
Yup, downgrading fixed it. I suspect it has something to do with the cairo/xlib/imlib updates that went into the 1.2* series. I … guess I should file a bug upstream?
Cheers, |
|
Back to top |
|
|
ExecutorElassus Veteran
Joined: 11 Mar 2004 Posts: 1451 Location: Berlin, Germany
|
Posted: Thu May 30, 2024 1:45 pm Post subject: |
|
|
UPDATE: upstream has added some explicit build options for xlib, and you now need to add `require 'cairo_xlib'` to your .lua file to get conky to load the requisite xlib libraries for drawing curved graphs. Problem solved.
Cheers |
|
Back to top |
|
|
rab0171610 Guru
Joined: 24 Dec 2022 Posts: 423
|
Posted: Thu May 30, 2024 5:20 pm Post subject: |
|
|
I was reading all the related history, commits, and code in the auto configure options about cairo, cairo_xlib, and imlibs. There is still some work to be done to fully support Wayland, which appears to be at the core of these issues. Glad you were able to figure it out. |
|
Back to top |
|
|
hedmo Veteran
Joined: 29 Aug 2009 Posts: 1331 Location: sweden
|
Posted: Sat Jun 01, 2024 4:19 am Post subject: |
|
|
ExecutorElassus wrote: | UPDATE: upstream has added some explicit build options for xlib, and you now need to add `require 'cairo_xlib'` to your .lua file to get conky to load the requisite xlib libraries for drawing curved graphs. Problem solved.
Cheers |
ExecutorElassus
i am using lua rings and they are missing on the latest updates. may you show how you added it ( `require 'cairo_xlib'` to your .lua file to get conky to load the requisite xlib libraries for drawing curved graphs.) to XXXX.lua file?
regards hedmo
EDIT: https://github.com/brndnmtthws/conky/issues/1867 |
|
Back to top |
|
|
ExecutorElassus Veteran
Joined: 11 Mar 2004 Posts: 1451 Location: Berlin, Germany
|
Posted: Sat Jun 01, 2024 5:19 am Post subject: |
|
|
Did you check that bug report? My issue was related to this one (at least the initial issue). About mid-way down they resolve that issue (though they get into another one about the mouse).
You should have two files (your config file, and a .lua file). At the top of your .lua file you probably have something like this:
Code: | --==============================================================================
-- conky_grey.lua
--
-- author : SLK
-- version : v2011062101
-- license : Distributed under the terms of GNU GPL version 2 or later
--
--==============================================================================
require 'cairo'
--------------------------------------------------------------------------------
|
What you need to do is modify the last part so it reads:
Code: |
require 'cairo'
require 'cairo_xlib'
|
That will add the xlib support that you need for lua rings to the script. You also need to make sure you're building conky with support for it. This is my emerge:
Code: | emerge -pv conky
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 87.19 s (backtrack: 1/20).
[ebuild R ] app-admin/conky-1.21.1::gentoo USE="X bundled-toluapp colour-name-map curl hddtemp iconv imlib lua-cairo lua-cairo-xlib lua-imlib lua-rsvg ncurses portmon rss truetype wayland -apcupsd -cmus -doc -extras -ical -intel-backlight -iostats -irc -math -moc -mpd -mysql -nvidia -pulseaudio -systemd -test -thinkpad -webserver -wifi -xinerama -xmms2" LUA_SINGLE_TARGET="lua5-4" 0 KiB
Total: 1 package (1 reinstall), Size of downloads: 0 KiB
|
Note in particular imlib, lua-cairo, lua-cairo-xlib, lua-imlib. I suspect you'll want all of them in your USE
Hope that helps. |
|
Back to top |
|
|
|