Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Mar 2017 08:21:32 +0100
From:      =?UTF-8?Q?Jan_Kokem=c3=bcller?= <jan.kokemueller@gmail.com>
To:        freebsd-x11@freebsd.org
Subject:   Re: CFT: update Xorg to 1.19.3
Message-ID:  <0d34061f-a941-6bce-1a14-2221561271b5@gmail.com>
In-Reply-To: <1774569.2utjLAkrOb@workstation.reztek>
References:  <1774569.2utjLAkrOb@workstation.reztek>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks, Xorg 1.19.3 from your patch works great for me. I've had trouble 
applying the patch, though. There were conflicts in the devd backend. I 
used "patch < Xorg_1_19_3.patch" to apply the patch. I've been running 
the libdevd-udev backend for now.

I'm running the 'modesetting' video driver on Intel Sandybridge graphics 
and it works without tearing when using compton. It seems a good 
alternative to the xf86-video-intel driver.

Evdev devices are picked up correctly by the libdevd-udev backend. But 
there is a small bug uncovered by using evdev devices exclusively: 
Without evdev, xf86-input-keyboard is used for keyboard input. This 
driver was responsible for setting the console to raw mode with 
"ioctl(fd, KDSKBMODE, K_RAW);". One easy way to check if raw mode is 
enabled is trying to press Alt+F1 to switch to another TTY. This should 
not work in raw mode (Strg+Alt+F1 is needed).

Setting the mode to K_RAW in the Server as done on Linux seems more 
correct. I don't fully understand this ioctl yet, though. There is some 
discussion here: 
http://unix.stackexchange.com/questions/173712/best-practice-for-hiding-virtual-console-while-rendering-video-to-framebuffer/178807#178807

I'm using this quickly thrown together patch to set the terminal to 
K_RAW mode:

diff -ru work/xorg-server-1.19.3/hw/xfree86/os-support/bsd/bsd_init.c 
work2/xorg-server-1.19.3/hw/xfree86/os-support/bsd/bsd_init.c
--- work/xorg-server-1.19.3/hw/xfree86/os-support/bsd/bsd_init.c 
2017-03-23 08:05:01.085410000 +0100
+++ work2/xorg-server-1.19.3/hw/xfree86/os-support/bsd/bsd_init.c 
2017-03-18 13:51:35.411504000 +0100
@@ -443,6 +443,11 @@
              fd = -1;
          }
      }
+
+    if (fd >= 0) {
+      ioctl(fd, KDSKBMODE, K_RAW);
+    }
+
      return fd;
  }

@@ -596,6 +601,7 @@
  #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
      case SYSCONS:
      case PCVT:
+        ioctl(xf86Info.consoleFd, KDSKBMODE, K_XLATE);
          ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT);  /* Back to 
text mode */
          if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1) {
              VT.mode = VT_AUTO;




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0d34061f-a941-6bce-1a14-2221561271b5>