Comment 34 for bug 1308105

Revision history for this message
In , Alexander Schmidt (voidcastr) wrote :

Created attachment 5681
HDMI power cycling patch

Created and attached a small patch that fixes the issue for me. It applies to any xfce4-settings version starting from dbd76eb58bd9d7a55de753daa5572ef24867d924 (contained in 4.11.1), up to the current origin/master.

Can anybody confirm this patch fixing the issue while not introducing undesirable side effects?

As I understand, it is indeed a suitable solution (cf. the implementation in 641c6c4d7dda4ac41f811c8c0f9e26738f12a732 which used a corresponding approach) but it might conceal another underlying problem:

g_ptr_array_unref(GPtrArray*) is expected to have the same effect as g_ptr_array_free(GPtrArray*, TRUE) in case there is exactly one reference to the given argument. However, in the case at hand, the effects differ, which leads to the conclusion that there is more that just one reference left to the given argument, prior to calling g_ptr_array_unref. This could indicate some bug/leak -- but as I understand, calling g_ptr_array_free with free_seg=TRUE deals with that (somebody correct me if I'm wrong).