, Johann Schmitz

After the last update from QT from 4.8.5 to 4.8.6 i had some serious trouble with a wide range of applications: Some applications (like Clementine) made the desktop unresponsive, other just drew an empty window or had really large fonts applied.

A common error message was

QNativeImage: Unable to attach to shared memory segment.

often together with

X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  62 (X_CopyArea)
  Resource id in failed request:  0x0
  Serial number of failed request:  598
  Current serial number in output stream:  748

which made me look at the kernel's shmem values:

$ sysctl -A|grep -P "shm(all|max)"
kernel.shmall = 18446744073692774399
kernel.shmmax = 18446744073692774399

with a PAGE_SIZE of 4096. I'm pretty sure that i cannot afford to buy that mass of RAM.

I reduced both values to roughly half of size of my memory, but no effect.

After some hours of upgrading, downgrading, googling I came across the environment variable QT_X11_NO_MITSHM=1 which instantly solved my problem. This variables disables the use of the MIT-SHM extension X11.

I haven't looked further to why this would by a problem, though.