exwm icon indicating copy to clipboard operation
exwm copied to clipboard

window running browser not refreshing

Open gyps opened this issue 4 years ago • 14 comments

Dear all,

since a few weeks I have an issue with the window of my browser (i.e. chromium) not refreshing for about 30-60secs from time to time. This happens usually when switching back to the browser window. Then the windows stays blank (white) for nearly a minute. Another program I'm using had the same issue but in this case no refresh at all took place (not even after 1 hour). So the only solution is to kill the program.

Obviously there are a lot of causes that can be the reason for this behavior but I have no clue where to start searching for a reason.

Does anybody observe similar behavior? Or has a hint where to start searching for a cause?

Thanks, Alex

PS: Using webkit alternatives like emacs-webkit or nyxt also showed strange refreshing behavior (don't know if thats related).

gyps avatar Feb 13 '21 17:02 gyps

One more thing. If I switch from another workspace back to the workspace the browserwindow is in the window has focus but the application doesn't. I always have to click into the window to really focus into the program. Also this was not always liks this but changed within the last weeks. I don't know if this is related but it is a strange coincidence at least.

gyps avatar Feb 13 '21 18:02 gyps

I had this exact issue mysteriously start a few months ago, and stop again a few weeks later. I think there's a range of Chromium versions where this happens and eventually it stops. Now on Chrome 88.0 and it's fine.

tazjin avatar Feb 14 '21 10:02 tazjin

Good to know that I'm not the only one having these problems. Unfotunately these problems happen in my case with chromium 88.0.4324.150. As other applications also show strange refreshing behoviour I'm not sure if it's really a chromium issue.

gyps avatar Feb 16 '21 09:02 gyps

I have the same issue with the following applications:

  • Chrome
  • Skype,
  • Teams
  • and most recently Firefox v 78.8.0esr.

I found that I can always. eventually, get the UI to redraw by doing combinations of the following:

  • Split window with C-x 3 and delete other window with C-x 1 a few times
  • call redraw-display

I also found that signing into google accounts in chrome seemed to help.

Observations:

  • emacs v 27.1
  • exwm v 20190224.1152
  • emacs built with GTK+ 3.24.24-r1
  • When running Chrome, Firefox, teams all at the same time, the problem might only impact a subset of these applications
  • The problem use to be worse for chrome and teams, but recent updates has improved the situation. I am now running Chrome Version 89.0.4389.72 (Official Build) (64-bit)
  • Recently, Firefox started showing the same symptoms. It might be due to an update in Firefox, or something else.
  • The problem is not related to memory , CPU or disk I/O (I have seen the issue with low usage of memory, CPU and I/O)
  • The problem happens every day at seemingly random times. but is sometimes much worse than other times.

BloggerBust avatar Mar 07 '21 13:03 BloggerBust

This is probably not an EXWM issue. I have found that whenever chrome UI becomes unresponsive, the following error appears in the google-chrome-stable buffer.

[20914:20914:0312/053322.508703:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.

@gyps Are you seeing the same error when chrome fails to redraw/refresh?

Today I will monitor teams and to see if the same error occurs.

BloggerBust avatar Mar 12 '21 12:03 BloggerBust

Unfortunately the issue persists. Firefox as well as Chromium once in a while (usually after a few minutes) do not refresh any more when they receive focus. Some versions don't have this problem as often as others but currently it is again really annoying.
I started the application from a terminal and when this happens the app is absolutely quite. No terminal output whatsoever. I'm absolutely clueless.

gyps avatar Jun 30 '21 09:06 gyps

@gyps Do you have a custom kernel? If so, can you check if CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y.

grep -i CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE /usr/src/linux/.config

If your kernel is configured to require user space tools to govern CPU frequency scaling by default, but you have not installed or configured any user space tools to do so, then your systems performance will suffer. For some reason, my kernel was configured with CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y, so I changed it to CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y and I have noticed a significant improvement in GUI responsiveness and memory usage.

BloggerBust avatar Jul 11 '21 13:07 BloggerBust

No, I'm not using a custom kernel. My current kernel is current arch-linux kernel 5.12.14-arch1-1 #1 SMP PREEMPT Thu, 01 Jul 2021 07:26:06 +0000 x86_64 GNU/Linux I've no idea what compile flags are set in this arch kernel. On the other hand - when I first encountered this issue I was still using Debian. Therefore I don't expect this to be the cause of the problem.

gyps avatar Jul 12 '21 14:07 gyps

Is there any progress on the issue? I think it might be GPU based. I have integrated graphics. What are you running?

For extra context, I am also using firefox.

parinzee avatar Jul 29 '21 07:07 parinzee

Im also using integrated GPU on a DELL XPS-13 Laptop. Problem persists with firefox and chromium.

gyps avatar Jul 30 '21 08:07 gyps

I think this has a high chance of being a d-bus issue. Firefox seems to crash saying things about "Channel Error". When I searched that up it lead me to this. The person said that the problem was due to a misconfiguration in the gpu config of his coreboot.

So it definitely has something to do with the GPU and the d-bus. This is strange. I haven't seen this before. I'm currently running Arch Linux, I plan to switch to Gentoo. I'll update you whether if the same problem persists in Gentoo.

parinzee avatar Aug 01 '21 01:08 parinzee

Check to see if your graphics card has gone legacy. If it has, then only a fixed range of driver versions may be compatible with your card. If you have an nvidia graphics card, then you can use this form to determine what versions of the driver your card is compatible with. You will then need to follow the instructions for your distributions package manager to mask your graphics card drivers to the latest compatible version. I suspect that at least some of you will find that your graphics card driver has gone legacy and that following these steps will resolve the refresh issue.

Please post back to tell us whether or not this fixes your issue.

-- EDIT -- Sorry @gyps, I realize now that you have an integrated intel graphics card. If anyone reads this and has an nvidia graphics card, then my comments above may apply to you, i.e. there is a good chance you have the wrong version of the driver installed for your card.

@gyps, in your casse you probably have something gpu related that is misconfigured. Have you stepped through the arch-linux intel wiki to double check your configuration? Especially the trouble shooting section..

BloggerBust avatar Aug 31 '21 13:08 BloggerBust

@Gyps, If you are unable to resolve this issue after reviewing the arch-linux intel wiki and trouble shooting section, I recommend asking this question on the arch-linux community forum as I do not believe it is in anyway related to exwm. I have been able to completely resolve the issue on my laptop. The root cause in my case was that my graphics card went legacy and I ended up installing a version of the driver that did not support my graphics card.

BloggerBust avatar Sep 01 '21 10:09 BloggerBust

After I had the same problems with a fresh debian 11 installation on desktop hardware I thought well maybe it is due to my minimalistic installation with just X11 and EXWM. I tried EXWM with gnome-flashback and first it worked fine. Yesterday firefox hangs again. I connected with a debugger to the hanging firefox and first only a few of the 118 (!) threads were waiting for something. After a while most of them were either waiting for a semaphore to become free or hang in a poll or in a recv message. Looks like some deadlock situation firefox got into (same firefox doesn't if run under gnome).

Unfortunately the stacktraces don't help (me) to find a possible cause. Here is the full trace and the filtered (non-waiting) thread-list. Maybe someone of you has an idea how to proceed to get further?

I have to admit: after three years getting used to and be very happy with EXWM I'm currently looking at alternatives like i3wm :-(

gyps avatar Oct 24 '21 07:10 gyps