Bug 1872261

Summary: System tray icons disappear when reloading i3
Product: [Fedora] Fedora Reporter: Jean Guegant <jguegant>
Component: i3Assignee: Dan Čermák <dan.cermak>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 32CC: amurdaca, dan.cermak, fedora, gchamoul, kupo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: i3-4.18.2-2.fc32 i3-4.18.2-2.fc31 i3-4.18.2-2.fc33 i3-4.19-1.fc33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-27 14:31:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Recording of the issue none

Description Jean Guegant 2020-08-25 10:00:03 UTC
Description of problem:
System tray icons (such as volumeicon, nm-applet, slack, redshift-gtk...) disappear when reloading i3's config or changing monitor settings (by using arandr for instance).

Version-Release number of selected component (if applicable):
i3-4.18.2-1.fc32.x86_64

How reproducible:
Always on some specific applications.

Steps to Reproduce:
1. Start an application with a tray icon (such as volumeicon or redshift-gtk) within an i3 session
2. Reload the i3 config: $mod+Shift+r
3. Observe that the icons disappear

Actual results:
The tray icons disappear.

Expected results:
The tray icons should be kept alive.

Additional info:
It seems that the bug is coming from a wrongly applied patch in i3 upstream 4.18.2: https://github.com/i3/i3/issues/4159

Cherry-picking this specific patch would help on that specific issue: https://github.com/i3/i3/commit/838b600fead202416013db5c1b57f7031f06bed6

i3-4.18-1.fc32.x86_64 does not seem to suffer from that issue.

Comment 1 Dan Čermák 2020-08-26 19:46:03 UTC
I cannot reproduce this bug, do you have a special setup like multiple monitors or a compositor?

Comment 2 Jean Guegant 2020-08-26 20:40:24 UTC
Created attachment 1712737 [details]
Recording of the issue

Here is a video recording of the issue I am facing.
I am basically starting the tray icon app "volumeicon".
After calling "i3-msg restart", the app crashes and the tray icon disappears.
Here is the error message the app yields:


(volumeicon:131539): Gdk-WARNING **: 22:33:52.398: GdkWindow 0x1a00002 unexpectedly destroyed

(volumeicon:131539): Gdk-ERROR **: 22:33:52.418: The program 'volumeicon' received an X Window System error.
This probably reflects a bug in the program.
The error was 'RenderBadPicture (invalid Picture parameter)'.
  (Details: serial 909 error_code 141 request_code 138 (RENDER) minor_code 7)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
[1]    131539 trace trap (core dumped)  volumeicon

Comment 3 Jean Guegant 2020-08-26 20:43:05 UTC
To answer your question concerning monitors and compositors: I can reproduce the issue with a single monitor, and I do not have any compositor.

Thanks a lot for looking into that issue,
Jean

Comment 4 Dan Čermák 2020-08-26 21:03:13 UTC
Could you grab i3 from koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=50209934 and try if that fixes the issue for you?

Comment 5 Dan Čermák 2020-08-26 21:24:07 UTC
(In reply to Jean Guegant from comment #2)
> Created attachment 1712737 [details]
> Recording of the issue
> 
> Here is a video recording of the issue I am facing.
> I am basically starting the tray icon app "volumeicon".
> After calling "i3-msg restart", the app crashes and the tray icon disappears.
> Here is the error message the app yields:
> 
> 
> (volumeicon:131539): Gdk-WARNING **: 22:33:52.398: GdkWindow 0x1a00002
> unexpectedly destroyed
> 
> (volumeicon:131539): Gdk-ERROR **: 22:33:52.418: The program 'volumeicon'
> received an X Window System error.
> This probably reflects a bug in the program.
> The error was 'RenderBadPicture (invalid Picture parameter)'.
>   (Details: serial 909 error_code 141 request_code 138 (RENDER) minor_code 7)
>   (Note to programmers: normally, X errors are reported asynchronously;
>    that is, you will receive the error a while after causing it.
>    To debug your program, run it with the GDK_SYNCHRONIZE environment
>    variable to change this behavior. You can then get a meaningful
>    backtrace from your debugger if you break on the gdk_x_error() function.)
> [1]    131539 trace trap (core dumped)  volumeicon

Interesting, the issue neither appeared with kdeconnect-indicator nor with Telegram, but I can reproduce it with volumeicon. The patch that you linked fixed the issue for me.

I'll submit a fix shortly.

Comment 6 Justin Wheeler 2020-08-26 21:40:12 UTC
I upgraded to i3-4.18.2-2.fc32.x86_64 in the Koji above, but nm-applet and blueman applets still do not appear for me. I am wondering if this is an i3/X11 issue, or if it is a code difference of how these specific applets appear in the system tray.

Does anyone know when the regression was first noticed? I am trying to think which part might have moved to break the tray icons.

Comment 7 Fedora Update System 2020-08-26 21:40:38 UTC
FEDORA-2020-bc566903ff has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-bc566903ff

Comment 8 Dan Čermák 2020-08-26 21:56:00 UTC
(In reply to Justin W. Flory (he/him) from comment #6)
> I upgraded to i3-4.18.2-2.fc32.x86_64 in the Koji above, but nm-applet and
> blueman applets still do not appear for me. I am wondering if this is an
> i3/X11 issue, or if it is a code difference of how these specific applets
> appear in the system tray.
> 
> Does anyone know when the regression was first noticed? I am trying to think
> which part might have moved to break the tray icons.

nm-applet works for me, it just takes a while for it's icon to render for some reason. But once it's there, it survives the reload of i3.

Comment 9 Fedora Update System 2020-08-26 22:00:37 UTC
FEDORA-2020-47ea92ef6b has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-47ea92ef6b

Comment 10 Fedora Update System 2020-08-26 22:17:37 UTC
FEDORA-2020-439e9821cf has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-439e9821cf

Comment 11 Jean Guegant 2020-08-27 08:27:34 UTC
I tested the rpm package from the koji. It works like a charm, even with reloading.

Thanks a lot,
Jean

Comment 12 Dan Čermák 2020-08-27 08:41:01 UTC
Please test the bodhi updates (and give them karma) once they hit testing as well if you can ;-)

Comment 13 Justin Wheeler 2020-08-27 12:09:53 UTC
I left karma on the Bodhi update. I had to do a full reboot to notice the change, but now my systray (and compose key somehow!) are working again. Thanks Dan for getting this fixed up for us in Fedora! \o/

Comment 14 Fedora Update System 2020-08-27 14:31:17 UTC
FEDORA-2020-bc566903ff has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2020-08-27 15:01:11 UTC
FEDORA-2020-439e9821cf has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-439e9821cf`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-439e9821cf

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2020-08-27 19:04:43 UTC
FEDORA-2020-47ea92ef6b has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-47ea92ef6b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-47ea92ef6b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2020-09-03 16:26:34 UTC
FEDORA-2020-439e9821cf has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 18 Fedora Update System 2020-09-25 16:36:16 UTC
FEDORA-2020-47ea92ef6b has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 19 Fedora Update System 2020-12-03 15:12:32 UTC
FEDORA-2020-20f42bd6f3 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-20f42bd6f3

Comment 20 Fedora Update System 2020-12-05 01:58:10 UTC
FEDORA-2020-20f42bd6f3 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-20f42bd6f3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-20f42bd6f3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 21 Fedora Update System 2020-12-06 03:04:57 UTC
FEDORA-2020-20f42bd6f3 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.