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

Some pop-ups in GTK4 applications fail to appear with fcitx5 #454

Open
cyber-sushi opened this issue Jun 20, 2024 · 18 comments
Open

Some pop-ups in GTK4 applications fail to appear with fcitx5 #454

cyber-sushi opened this issue Jun 20, 2024 · 18 comments
Labels
bug Something isn't working question Further information is requested

Comments

@cyber-sushi
Copy link

Hello! I've noticed that certain buttons that should spawn a pop-up in GTK applications simply don't do anything. I've noticed two cases of this occurring:

  • The "Open" button in the top left corner of some GTK4 applications like Gnome Text Editor and Apostrophe, which should spawn a pop-up containing a list of the recent documents, doesn't do anything and no pop-up appears
  • The "Rename" button in Nautilus' context menu also doesn't spawn the pop-up to rename stuff, although occasionally it can be briefly seen for one single frame

System Information

  • niri version: niri 0.1.6 (unknown commit)

  • Distro: Arch Linux

  • GPU: AMD Radeon Vega 8

  • CPU: Ryzen 5700U

@cyber-sushi cyber-sushi added the bug Something isn't working label Jun 20, 2024
@YaLTeR
Copy link
Owner

YaLTeR commented Jun 20, 2024

I use plenty of GTK 4 apps and haven't seen this issue yet. So don't know.

@YaLTeR YaLTeR added the question Further information is requested label Jun 20, 2024
@cyber-sushi
Copy link
Author

cyber-sushi commented Jun 21, 2024

And those two specific cases work properly for you? I might try this on another computer to see if it only happens on one device

Edit: checked on my other computer but Niri just shows a black screen there (nvidia_drm.modeset is correctly set to 1) so I can't really confirm

@YaLTeR
Copy link
Owner

YaLTeR commented Jun 21, 2024

Yeah, they work fine.

@rustysec
Copy link
Contributor

confirmed, they work for me as well

@YaLTeR
Copy link
Owner

YaLTeR commented Jul 6, 2024

Closing because I don't think this is a niri issue; feel free to reopen.

@YaLTeR YaLTeR closed this as completed Jul 6, 2024
@cyber-sushi
Copy link
Author

Now that Niri kinda works on Nvidia (1060 with 555 drivers in my case), I tested it on my other computer too and it has the same issue

The issue is not present on Hyprland and Sway

@YaLTeR
Copy link
Owner

YaLTeR commented Aug 5, 2024

Really very strange. Is there anything interesting in the output of either niri (journalctl -eb --user-unit niri) or the program that fails to show the pop-up? Could you try if it reproduces on cosmic-comp?

@cyber-sushi
Copy link
Author

When I get home in a few days I'll test and report back, thank you for the quick response!

@cyber-sushi
Copy link
Author

Update:

There's no output in journalctl -eb --user-unit niri nor from the application (Nautilus, Apostrophe, etc) itself when the pop-up fails to appear (although, as mentioned, sometimes the Rename pop-up can be seen for a split second and then it disappears)

I've also installed cosmic-session and the pop-ups work properly there, both the Rename pop-up in Nautilus and the Open pop-up in Apostrophe

@YaLTeR
Copy link
Owner

YaLTeR commented Aug 8, 2024

Thanks. Very strange

@lambdaclan
Copy link

Hello. I have the exact same issue, so I feel there is a problem somewhere. Other users might also be facing the same issue, and they just have not realized it yet. Now, the good news is that I might have detected the cause. I had to do a lot of tinkering but at least on my machine the cause is fcitx5. It will be interesting to see if @cyber-sushi also uses fcitx5.

After some troubleshooting, I decided to use the default config generated by niri upon launch and surprise, surprise everything was working properly. Then, I reverted to my custom config and started commenting out lines in an attempt to see if something is causing the pop ups to stop appearing. I eventually narrowed it down to the spawn-at-startup section and then further to the fcitx5 command.

I am not sure if this is a problem with fcitx5 or niri but if someone else can verify my findings it might provide some more insight. I would really like to use niri, so I hope there is a workaround or fix.

To reproduce the issue in the simplest manner please do the following:

  1. Install fcitx5 (in my case I installed fcitx5, fcitx5-configtool and fcitx5-gtk)
  2. Launch a niri session with default config
  3. Launch one of the problematic applications (gnome text editor, apostrophe, nautilus etc)
  4. Verify the pop ups work as expected
  5. Start the fcitx5 daemon: fcitx5 --replace or fcitx5 --replace -d
  6. Try to open one of the pop ups

Please note that if you kill fcitx5 (pkill fcitx5) the pop ups will start working again.

I will be happy to provide more information if required or help to further debug the issue so just let me know.

Thank you for your work on this great compositor!

@YaLTeR
Copy link
Owner

YaLTeR commented Aug 26, 2024

Thanks for the investigation, interesting. And on other compositors with fcitx5 the popups work fine? What about cosmic-comp?

@YaLTeR YaLTeR reopened this Aug 26, 2024
@cyber-sushi
Copy link
Author

I can confirm that the issue only appears when fcitx5 is running, if I kill it the pop-ups work as expected.
On Cosmic (and Sway/Hyprland), everything seem to work properly regardless of fcitx5 running or not.

Unrelated to the issue, but I realized that both Niri and Cosmic seem to autostart fcitx5 even though it's not present in spawn-at-startup or XDG_CONFIG_HOME/autostart (Sway and Hyprland don't do this), is that intended?

@YaLTeR YaLTeR changed the title Some pop-ups in GTK4 applications fail to appear Some pop-ups in GTK4 applications fail to appear with fcitx5 Aug 26, 2024
@YaLTeR
Copy link
Owner

YaLTeR commented Aug 26, 2024

I see. I'll have to look into this I guess.

Niri doesn't autostart fcitx5, must be something else causing it to start. Maybe you have it as a systemd service enabled and bound to graphical-session.target?

@cyber-sushi
Copy link
Author

Okay found it, seems like fcitx5 automatically dropped its .desktop file in /etc/xdg/autostart/org.fcitx.Fcitx5.desktop, thanks

@lambdaclan
Copy link

I can confirm that the issue only appears when fcitx5 is running, if I kill it the pop-ups work as expected.

Thank you for chiming in and confirming the issue with fcitx5. I am glad that we have managed to detect the cause of the problem.

And on other compositors with fcitx5 the popups work fine? What about cosmic-comp?

On Cosmic (and Sway/Hyprland), everything seem to work properly regardless of fcitx5 running or not.

I can also confirm that things work as expected both on Cosmic and Gnome Wayland.

I see. I'll have to look into this I guess.

I have a separate installation running the latest niri git via the nightly COPR you have provided in the latest release. If you need me to do any testing at any point feel free to reach out.

Thank you for taking the time to look into this issue.

@lambdaclan
Copy link

Since I setup a Sway VM for #620 here are some screenshots showing the problematic pop-ups working fine under Sway:

Gnome Files (nautilus) rename dialog:

image

Apostrophe recent documents dialog:

image

BoxBuddy container image selector dialog:

image

You can see fcitx5 running on the side as well.

None of these work properly under niri.

@lambdaclan
Copy link

Quick update on this issue. I am not sure if it helps in any way but this problem does not occur on NixOS. I have also tested niri on Fedora and Arch Linux where the issue does persist. I am wondering if it has anything to do with how fcitx is being distributed like build flags, install location etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants