Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

fixing conky/cairo/xlib [SOLVED]

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
ExecutorElassus
Veteran
Veteran
User avatar
Posts: 1525
Joined: Thu Mar 11, 2004 11:12 pm
Location: Berlin, Germany

fixing conky/cairo/xlib [SOLVED]

  • Quote

Post by ExecutorElassus » Thu May 30, 2024 7:18 am

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: Select all

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: Select all

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: Select all

 # 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.
Top
rab0171610
l33t
l33t
Posts: 721
Joined: Sat Dec 24, 2022 1:41 am

  • Quote

Post by rab0171610 » Thu May 30, 2024 9:44 am

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.8) and see if the issue still persists.
Top
ExecutorElassus
Veteran
Veteran
User avatar
Posts: 1525
Joined: Thu Mar 11, 2004 11:12 pm
Location: Berlin, Germany

  • Quote

Post by ExecutorElassus » Thu May 30, 2024 10:47 am

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,
Top
ExecutorElassus
Veteran
Veteran
User avatar
Posts: 1525
Joined: Thu Mar 11, 2004 11:12 pm
Location: Berlin, Germany

  • Quote

Post by ExecutorElassus » Thu May 30, 2024 1:45 pm

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
Top
rab0171610
l33t
l33t
Posts: 721
Joined: Sat Dec 24, 2022 1:41 am

  • Quote

Post by rab0171610 » Thu May 30, 2024 5:20 pm

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.
Top
hedmo
Veteran
Veteran
User avatar
Posts: 1338
Joined: Sat Aug 29, 2009 1:15 pm
Location: sweden

  • Quote

Post by hedmo » Sat Jun 01, 2024 4:19 am

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
Top
ExecutorElassus
Veteran
Veteran
User avatar
Posts: 1525
Joined: Thu Mar 11, 2004 11:12 pm
Location: Berlin, Germany

  • Quote

Post by ExecutorElassus » Sat Jun 01, 2024 5:19 am

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: Select all

--==============================================================================
--                                 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: Select all

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: Select all

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.
Top
ExecutorElassus
Veteran
Veteran
User avatar
Posts: 1525
Joined: Thu Mar 11, 2004 11:12 pm
Location: Berlin, Germany

  • Quote

Post by ExecutorElassus » Fri Nov 29, 2024 6:26 am

Just in case somebody comes across this issue, even though it's unrelated to the actual issue I've detailed here:

Please note that picom recently updated (as of 2024-11-28 ) to picom-12.4 in the tree, which now (?) requires that you explicitly specify the backend. This, in turn, requires that you have a picom.conf file at a location specified in the wiki. You can get a default .conf file from the picom github page, here. I didn't have one, and so picom wouldn't start, leading to conky not having transparent backgrounds.
Top
Post Reply

8 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic