ch11ng / exwm

Emacs X Window Manager
2.85k stars 134 forks source link

window running browser not refreshing #814

Open gyps opened 3 years ago

gyps commented 3 years ago

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 commented 3 years ago

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.

tazjin commented 3 years ago

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.

gyps commented 3 years ago

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.

BloggerBust commented 3 years ago

I have the same issue with the following applications:

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

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

Observations:

BloggerBust commented 3 years ago

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.

gyps commented 3 years ago

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.

BloggerBust commented 3 years ago

@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.

gyps commented 3 years ago

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.

parinzee commented 3 years ago

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.

gyps commented 3 years ago

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

parinzee commented 3 years ago

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.

BloggerBust commented 3 years ago

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 commented 3 years ago

@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.

gyps commented 2 years ago

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 :-(