Google Chrome stealing focus / repainting in xmonad

Update: It’s an issue with xmonad and OpenGL, not Chrome specifically. See this thread for more info. It affects things like Steam as well as Chrome

TL;DR; install xcompmgr and run xcompmgr -n & at startup to start a window compositor

Since updating to Ubuntu 14.04 / xmonad 0.11, I’ve had a strange issue where Google Chrome would appear to repaint itself, no matter which workspace I was on. I couldn’t interact with the window, but it would obscure what I was actually trying to work on.

It turns out, it’s a bug in Chrome. To fix it, launch chrome with the --disable-gpu flag. Here’s the relevant line from my config:

, ((mod4Mask .|. shiftMask   , xK_Return)     , spawn "google-chrome --disable-gpu")

Michael is a polyglot software engineer, committed to reducing complexity in systems and making them more predictable. Working with a variety of languages and tools, he shares his technical expertise to audiences all around the world at user groups and conferences. You can follow @mheap on Twitter

Thoughts on this post

Vineet Kumar 2014-06-30

This is a big annoyance for me also, but this “fix” is a pretty heavy hammer. This means disabling the GPU in chrome entirely, so no more WebGL, meaning many new google maps features are disabled.

michael 2014-07-03

It is a heavy fix. I’ve since discovered that it isn’t just Chrome, and have updated the post accordingly

Leave a comment?

Leave a Reply