diff -Naur xf86-video-nouveau-1.0.11/src/drmmode_display.c xf86-video-nouveau-1.0.11mod/src/drmmode_display.c --- xf86-video-nouveau-1.0.11/src/drmmode_display.c 2014-09-03 21:29:04.000000000 +0200 +++ xf86-video-nouveau-1.0.11mod/src/drmmode_display.c 2015-05-16 16:42:41.752746007 +0200 @@ -1591,6 +1591,22 @@ #endif } +static void +drmmode_wakeup_handler2(pointer data, int err, pointer p) +{ +#ifdef HAVE_LIBUDEV + ScrnInfoPtr scrn = data; + drmmode_ptr drmmode = drmmode_from_scrn(scrn); + fd_set *read_mask = p; + + if (scrn == NULL || err < 0) + return; + + if (FD_ISSET(udev_monitor_get_fd(drmmode->uevent_monitor), read_mask)) + drmmode_handle_uevents(scrn); +#endif +} + void drmmode_screen_init(ScreenPtr pScreen) { @@ -1614,7 +1630,11 @@ pNVEnt->fd_wakeup_ref = 1; } else + { + RegisterBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA, + drmmode_wakeup_handler2, scrn); pNVEnt->fd_wakeup_ref++; + } } void @@ -1633,6 +1653,11 @@ drmmode_wakeup_handler, scrn); RemoveGeneralSocket(drmmode->fd); } + else + { + RemoveBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA, + drmmode_wakeup_handler2, scrn); + } /* Tear down udev event handler */ drmmode_uevent_fini(scrn);