diff -rupN old/Makefile.am new/Makefile.am
--- old/Makefile.am	2013-10-29 17:33:22.756000000 +0800
+++ new/Makefile.am	2020-11-09 16:19:26.664048000 +0800
@@ -60,8 +60,7 @@ AM_CFLAGS = \
 	-fno-strict-aliasing \
 	-fvisibility=hidden \
 	-ffunction-sections \
-	-fdata-sections \
-	-fstack-protector
+	-fdata-sections 
 AM_CPPFLAGS = \
 	-DBUILD_MODULE_DIR='"$(moduledir)"' \
 	-include $(top_builddir)/config.h \
diff -rupN old/src/uterm_drm_shared.c new/src/uterm_drm_shared.c
--- old/src/uterm_drm_shared.c	2013-10-23 19:46:07.785000000 +0800
+++ new/src/uterm_drm_shared.c	2020-11-12 22:07:46.407149000 +0800
@@ -340,7 +340,7 @@ int uterm_drm_display_swap(struct uterm_
 	int ret;
 	drmModeModeInfo *mode;
 
-	if (disp->dpms != UTERM_DPMS_ON)
+	if (disp->dpms != UTERM_DPMS_ON && disp->dpms != UTERM_DPMS_UNKNOWN)
 		return -EINVAL;
 
 	if (immediate) {
diff -rupN old/src/uterm_monitor.c new/src/uterm_monitor.c
--- old/src/uterm_monitor.c	2013-05-10 23:16:10.814000000 +0800
+++ new/src/uterm_monitor.c	2020-11-09 16:15:57.935854000 +0800
@@ -34,7 +34,9 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <libudev.h>
+#ifdef BUILD_ENABLE_VIDEO_FBDEV
 #include <linux/fb.h>
+#endif
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
@@ -408,6 +410,7 @@ static int get_fb_id(struct udev_device
 
 static unsigned int get_fbdev_flags(struct uterm_monitor *mon, const char *node)
 {
+#ifdef BUILD_ENABLE_VIDEO_FBDEV
 	int fd, ret, len;
 	struct fb_fix_screeninfo finfo;
 	unsigned int flags = UTERM_MONITOR_DRM_BACKED;
@@ -446,6 +449,9 @@ static unsigned int get_fbdev_flags(stru
 out_close:
 	close(fd);
 	return flags;
+#else
+    return UTERM_MONITOR_DRM_BACKED | UTERM_MONITOR_PRIMARY;
+#endif
 }
 
 static bool is_drm_primary(struct uterm_monitor *mon, struct udev_device *dev,
diff -rupN old/src/uterm_vt.c new/src/uterm_vt.c
--- old/src/uterm_vt.c	2013-10-24 05:15:18.865000000 +0800
+++ new/src/uterm_vt.c	2020-11-09 18:04:23.230148000 +0800
@@ -40,6 +40,7 @@
 #include <sys/ioctl.h>
 #include <sys/signalfd.h>
 #include <sys/stat.h>
+#include <sys/sysmacros.h>
 #include <termios.h>
 #include <time.h>
 #include <unistd.h>
