Closed rubin55 closed 4 months ago
Oh, that's interesting. Random things to test:
lstopo foo.png
and open that new foo.png. Is it black as well? If yes, that's a Cairo issue. If not, that's a Cairo/X11 only issue.lstopo --palette white
and lstopo --palette grey
in case they work better.lstopo foo.xml
hwloc-annotate foo.xml foo.xml -- root -- info lstopoStyle "Background=#000000;Text=#ffffff"
lstopo -i foo.xml
Thanks for the pointers, here goes:
--palette
options don't change anything, window stays blackFwiw, I tested on three machines (all running the same version and same OS/kernel, two with AMD Radeon cards, one with Intel graphics). The radeons both display fully black screens, the intel displays this:
What cairo version do you have? Do you know if things worked better on these systems in the past?
These systems use cairo 1.18.0 currently. I do know that these systems all had lstopo working normally before.
Thanks, ok I am going to upgrade my cairo on several systems to try to reproduce.
In the meantime, you could try to comment-out this line in the source since it sets the drawing color to black. We're supposed to only draw the border of the box with this color, but maybe we end up filling the box some reason.
--- a/utils/lstopo/lstopo-cairo.c
+++ b/utils/lstopo/lstopo-cairo.c
@@ -73,7 +73,7 @@ topo_cairo_box(struct lstopo_output *loutput, const struct lstopo_color *lcolor,
cairo_fill(c);
cairo_rectangle(c, x, y, width, height);
- cairo_set_source_rgb(c, 0, 0, 0);
+// cairo_set_source_rgb(c, 0, 0, 0);
if (cpukind_style) {
double dash = (double)(1U << cpukind_style);
Boxes won't have border anymore, but hopefully they'll have the expected background.
Another random patch to try is this one in case your compiler decides to cast to float after dividing:
--- a/utils/lstopo/lstopo-cairo.c
+++ b/utils/lstopo/lstopo-cairo.c
@@ -69,7 +69,7 @@ topo_cairo_box(struct lstopo_output *loutput, const struct lstopo_color *lcolor,
int r = lcolor->r, g = lcolor->g, b = lcolor->b;
cairo_rectangle(c, x, y, width, height);
- cairo_set_source_rgb(c, (float)r / 255, (float) g / 255, (float) b / 255);
+ cairo_set_source_rgb(c, ((float)r) / 255, ((float)g) / 255, ((float)b) / 255);
cairo_fill(c);
cairo_rectangle(c, x, y, width, height);
Hello, did you have a chance to test the ideas above?
Hi, I'm sorry, I couldn't reproduce this after a random pacman -Syu
; I didn't run into the issue again :/.
Thank you for replying. I am going to close, and hopefully you won't ever face the issue anymore. Otherwise feel free to reopen.
What version of hwloc are you using?
Which operating system and hardware are you running on?
Details of the problem
Running
lstopo
produces a black window, see screenshot:I simply run
lstopo
from the commandline.It displays a black window instead of the GL-based overview of my system.