Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken systray in 4.7 #1138

Closed
i3bot opened this issue Dec 23, 2013 · 23 comments
Closed

Broken systray in 4.7 #1138

i3bot opened this issue Dec 23, 2013 · 23 comments
Assignees
Labels

Comments

@i3bot
Copy link

i3bot commented Dec 23, 2013

[Originally reported by carlosjosepita@…]
(After upgrading to 4.7 the systray is completely black, although its size is correct. If I reload i3 with mod+shift+r the black space is replaced by the expected icons.

I tested this with and without status bar and with and without multiple monitors.

@i3bot
Copy link
Author

i3bot commented Dec 23, 2013

[Original comment by Carlos <carlosjosepita@…>]

Also tested with huge fonts because of https://bugzilla.gnome.org/show_bug.cgi?id=673749 but to no avail.

@i3bot
Copy link
Author

i3bot commented Dec 23, 2013

[Original comment by TonyC]

What applications are you having this problem with? Version information would be good to know too. Does it affect all applications (such as qt), or only GTK?

Also if you could please post a debug log for i3bar, that would help to shine some light on the issue. You can get the log by killing the i3bar process and starting a new one from the shell piping the output to a file:

$ pkill i3bar; i3bar --bar_id=0 &> ~/i3bar.log

should work on the default setup.

Also note that multiple bar directives in the config are not supported with tray output.

@i3bot
Copy link
Author

i3bot commented Dec 23, 2013

[Original comment by anonymous]

Applications: newtwork manager, dropbox. Both gtk afaik. They're run from ~/.xinitrc as follows:

  ...
  {
    sleep 2
    udiskie &
    nm-applet &
    dropboxd start &
  } &
  ...
  exec i3

This worked fine in 4.6.

Running (notice that bar id == "bar-0" and not "0" in my default config)

pkill i3bar; i3bar --bar_id=bar-0

once i3 is running correctly shows the tray icons so I don't think the log will be useful for you to debug this. Anyway I'm pasting it below. Also, restarting i3 (mod+shift+r) makes the icons visible as I remarked before. The problem only happens when i3 itself launches i3bar during startup. It's not only that the icons are not visible but there is no reaction to mouse events either.

I don't have multiple bar directives in my config.

I've already seen the problems in two computers, both with up-to-date arch linux and i3 4.7.

i3bar log:


[huilen@…
[libi3] libi3/font.c Using Pango font Sans Mono 9,FontAwesome, size 9
[libi3] libi3/font.c X11 root window dictates 96.252632 DP
[libi3] libi3/font.c X11 root window dictates 96.252632 DP
[libi3] libi3/font.c X11 root window dictates 96.252632 DP
kill: cannot find process "PID"
[libi3] libi3/font.c X11 root window dictates 96.252632 DP
[libi3] libi3/font.c X11 root window dictates 96.252632 DP
[libi3] libi3/font.c X11 root window dictates 96.252632 DP
[libi3] libi3/font.c X11 root window dictates 96.252632 DP
[libi3] libi3/font.c X11 root window dictates 96.252632 DP
[libi3] libi3/font.c X11 root window dictates 96.252632 DP
[libi3] libi3/font.c X11 root window dictates 96.252632 DP
[libi3] libi3/font.c X11 root window dictates 96.252632 DP
...

@i3bot
Copy link
Author

i3bot commented Dec 23, 2013

[Original comment by anonymous]

Another bit of information, hopefully useful: manually running another tray app (as volti, which is gtk also) when the tray is still black (that is, after i3 startup) doesn't make any icon visible but the systray does increase its width in proportion to the size of the new icon. At this point it's completely sure that i3bar is up and running so I don't the problem is due to a timing issue between the tray apps launched from .xinitrc and i3 bar.

@i3bot
Copy link
Author

i3bot commented Dec 24, 2013

[Original comment by ccfan@…]

The problem with me is just GTK apps (dropbox, parcellite), Qt works fine (skype, spotify, vlc).

i3bar.log

[i3bar/src/xcb.c:528] ERROR: Window 01000136 violates the XEMBED protocol, _XEMBED_INFO not set
i3status: trying to auto-detect output_format setting
i3status: auto-detected "i3bar"
[libi3] libi3/font.c Using Pango font Meslo LG S, size 11
[libi3] libi3/font.c X11 root window dictates 86.920152 DPI
[libi3] libi3/font.c X11 root window dictates 86.920152 DPI
[libi3] libi3/font.c X11 root window dictates 86.920152 DPI
[libi3] libi3/font.c X11 root window dictates 86.920152 DPI
[libi3] libi3/font.c X11 root window dictates 86.920152 DPI
[libi3] libi3/font.c X11 root window dictates 86.920152 DPI
[libi3] libi3/font.c X11 root window dictates 86.920152 DPI
[libi3] libi3/font.c X11 root window dictates 86.920152 DPI
[libi3] libi3/font.c X11 root window dictates 86.920152 DPI
[libi3] libi3/font.c X11 root window dictates 86.920152 DPI
...

@i3bot
Copy link
Author

i3bot commented Dec 25, 2013

[Original comment by TonyC]

I can't reproduce any of these issues on Arch with Xorg-server 1.14.5. What distro and xorg-server version are you using?

The above log comes from fireglow in the irc chat on FreeBSD Xorg version 1.12.4.

I think you have to put verbose true in your bar block to get meaningful bar debug output.

@i3bot
Copy link
Author

i3bot commented Dec 25, 2013

[Original comment by anonymous]

I'm attaching the verbose log but, again, the bar shows the systray icons when I manually launch it after i3 startup.

> uname -a

Linux localhost 3.12.5-1-ARCH #1 SMP PREEMPT Thu Dec 12 13:32:40 CET 2013 i686 GNU/Linux
> pacman -Qs xorg | grep '^local'

local/xf86-input-evdev 2.8.2-1 (xorg-drivers xorg)
local/xf86-input-synaptics 1.7.2-1 (xorg-drivers xorg)
local/xf86-video-intel 2.21.15-1 (xorg-drivers xorg)
local/xorg-bdftopcf 1.0.4-1 (xorg xorg-apps)
local/xorg-font-util 1.3.0-1 (xorg-fonts xorg)
local/xorg-font-utils 7.6-3
local/xorg-fonts-alias 1.0.3-1
local/xorg-fonts-encodings 1.0.4-3 (xorg-fonts xorg)
local/xorg-fonts-misc 1.0.1-2
local/xorg-mkfontdir 1.0.7-1 (xorg xorg-apps)
local/xorg-mkfontscale 1.1.1-1 (xorg-apps xorg)
local/xorg-server 1.14.5-1 (xorg)
local/xorg-server-common 1.14.5-1
local/xorg-setxkbmap 1.3.0-1 (xorg-apps xorg)
local/xorg-xauth 1.0.8-1 (xorg-apps xorg)
local/xorg-xbacklight 1.2.0-1 (xorg-apps xorg)
local/xorg-xev 1.2.1-1 (xorg-apps xorg)
local/xorg-xfontsel 1.0.5-1
local/xorg-xinit 1.3.3-3
local/xorg-xkbcomp 1.2.4-1 (xorg-apps xorg)
local/xorg-xmag 1.0.5-1
local/xorg-xprop 1.2.2-1 (xorg-apps xorg)
local/xorg-xpyb-git 20120808-3
local/xorg-xrandr 1.4.1-1 (xorg-apps xorg)
local/xorg-xrdb 1.1.0-1 (xorg-apps xorg)
local/xorg-xset 1.2.3-1 (xorg-apps xorg)
local/xorg-xsetroot 1.1.1-1 (xorg-apps xorg)
local/xorg-xwininfo 1.1.3-1 (xorg-apps xorg)

@i3bot
Copy link
Author

i3bot commented Dec 25, 2013

[Original comment by Anony Mouse]

I can confirm this as well.

It does seem to affect only GTK programs, as I could produce it only with pidgin, clipit and audacious. Meanwhile the tray icon of VLC, which is a QT program, is properly displayed.

I am using Arch Linux with xorg-server 1.14.5

@i3bot
Copy link
Author

i3bot commented Dec 25, 2013

[Original comment by anonymous]

I've launched i3 as follows in my ~/.xinitrc

exec i3 -V >> /tmp/i3log 2>&1

I've also added the directive verbose true in the i3bar configuration block.

I'm attaching the resulting /tmp/i3log but it doesn't look as i3bar has written anything at all to it.

I would need your help to continue debugging this. The problem is that the log of i3bar after i3 has been launched is of no value because the problem doesn't happen anymore at that point. Instead, what I need is to produce a log of the i3bar instance launched by i3 itself as a part of its own startup sequence. And that I don't know how to do.

@i3bot
Copy link
Author

i3bot commented Dec 26, 2013

[Original comment by TonyC]

Replying to comment 6 by TonyC:

From fireglow's log, it seems like when we don't set the mapped flag explicitly when creating the trayclient memory structure (like we were doing before), it may initially end up being set to true. Then when it asks to be mapped later using the xembed protocol, we don't map it because the mapped flag has already been set.

I was under the impression that smalloc would initalize that flag to false, so I didn't think setting it explicitly was necessary, and maybe on some systems it is not.

I hope this patch resolves the issue. I would appreciate if anyone having problems with their tray would test this patch to see if this helps with the issue. If you need any help building i3, find me in the irc chat and I'll do what I can to help you out.

@i3bot
Copy link
Author

i3bot commented Dec 26, 2013

[Original comment by Anony Mouse]

@…

Thanks, I can confirm that the patch works fine, and the tray icon issue seems to be fixed.

But, I still notice lots of messages such as these:

[libi3] libi3/font.c X11 root window dictates 96.252632 DPI

Basically dozens of such messages are being spewed every few seconds.

@i3bot
Copy link
Author

i3bot commented Dec 26, 2013

[Original comment by TonyC]

Replying to comment 11 by Anony Mouse:
Thanks. I think those messages are related to drawing the statusline. That is a separate issue I can look into later.

I think a fix for this is going out in a dot release, so if anyone else can confirm this patch fixes the issue with the tray, it will make my pillow a little softer at night.

@stapelberg
Copy link
Member

TonyC, malloc() (and smalloc) does not guarantee that memory is set to zero. Use calloc (i.e. scalloc in our code base) for that :).

@i3bot
Copy link
Author

i3bot commented Dec 26, 2013

[Original comment by anonymous]

The patch worked for me. I was also experiencing possibly related issues regarding non visible gtk systray icons when switching from single to dual screen, but that will have to wait until tonight at home to be tested. Thank you for your prompt answer.

@i3bot
Copy link
Author

i3bot commented Dec 27, 2013

[Original comment by anonymous]

This annoying bug also hits
Ubuntu 13.10
i3 version 4.7 (2013-12-22, branch "tags/4.7")
deb http://debian.sur5r.net/i3/ saucy universe

Looking forward for a packaged fix. :-)

@i3bot
Copy link
Author

i3bot commented Dec 27, 2013

[Original comment by lkraav <leho@…>]

Replying to comment 11 by Anony Mouse:

Basically dozens of such messages are being spewed every few seconds.

See #1115 for the patch.

@i3bot
Copy link
Author

i3bot commented Dec 28, 2013

[Original comment by Anony Mouse]

Replying to comment 16 by lkraav <leho@…>:

See #1115 for the patch.

Thanks for the heads up. The patch posted by michael fixes the problem.

@i3bot
Copy link
Author

i3bot commented Jan 1, 2014

[Original comment by Tony Crisci]

This ticket was fixed in commit http://c.i3wm.org/23b1da59:

i3bar: Set `mapped` flag on trayclient creation

When a trayclient is first created as a structure in memory, explicitly
set the `mapped` flag to false. Otherwise it may initialize to `true` in
some circumstances without actually being mapped, causing a request to
be mapped from the client to be ignored.

Create the trayclient in memory before handling a request to be mapped
immediately.

fixes #1138

@i3bot
Copy link
Author

i3bot commented Jan 27, 2014

[Original comment by Sascha Weaver <wzyboy@…>]

Hi,

it seems that patch "set mapped flag on trayclient creation" does not fix the bug. My systray works fine at version 4.6, and it does not show up any more after upgrading to 4.7. I tried 4.7.1 and 4.7.2 and it does not show up, also. When downgrading to 4.6, it works again.

@i3bot
Copy link
Author

i3bot commented Jan 27, 2014

[Original comment by TonyC]

There is an unrelated gtk bug that may affect older distros where the icon will not show up if it is less than 30px by 30px. Try increasing your font size and see if that fixes it. Try and test qt tray icons as well if you can.

If that doesn't fix it, the problem may become clear from looking at your i3bar log from 4.7.2.

$ pkill i3bar; i3bar --bar_id=0 &> ~/i3bar.log

@i3bot
Copy link
Author

i3bot commented Jan 27, 2014

[Original comment by Sascha Weaver <wzyboy@…>]

Replying to comment 20 by TonyC:

Thanks. I am using Arch Linux which rolling updates so I think my GTK-related packages are up-to-date.

I run pkill i3bar; i3bar --bar_id=bar-0 &> ~/i3bar.log and start StarDict (a GTK program with a systray icon) and VLC (a Qt program with a systray icon), but I see no icons show up in systray. Here is what I have in ~/i3bar.log:

[libi3] libi3/font.c Using Pango font Profont, size 8
[libi3] libi3/font.c X11 root window dictates 96.094581 DPI

@i3bot
Copy link
Author

i3bot commented Jan 28, 2014

[Original comment by TonyC]

Replying to comment 21 by Sascha Weaver <wzyboy@…>:

I think you are being affected by #1144.

If you have a tray_output directive in your bar block, try removing it.

@i3bot
Copy link
Author

i3bot commented Jan 28, 2014

[Original comment by Sascha Weaver <wzyboy@…>]

Replying to comment 22 by TonyC:

Replying to comment 21 by Sascha Weaver <wzyboy@…>:

I think you are being affected by #1144.

If you have a tray_output directive in your bar block, try removing it.

Wow, it works! It turns out that in 4.7 i3bar shows a tray by default, not needing a "tray_output" directive any more. Thanks!

@i3bot i3bot self-assigned this Jan 28, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants