libGL tries to create /home/user.nv/ directory, after failing to mmap() /tmp/.gl* for execution

Hi,

I’m running Debian Sid on Asus N551JM with Nvidia 384.111 drivers.

While fixing some AppArmor profiles, I’ve noticed that applications using NVIDIA accelerated graphics (in my case, when I run under optirun) produces these DENIED messages in kernel log:

type=AVC msg=audit(1516647002.968:744): apparmor="DENIED"
operation="mkdir" profile="thunderbird" name="/home/vincas.nv/"
pid=23705 comm="thunderbird" requested_mask="c" denied_mask="c"
fsuid=1000 ouid=1000
type=SYSCALL msg=audit(1516647002.968:744): arch=c000003e syscall=83
success=no exit=-13 a0=7f81fc94ac20 a1=1ff a2=1 a3=1 items=0 ppid=23694
pid=23705 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000
egid=1000 sgid=1000 fsgid=1000 tty=pts2 ses=4 comm="thunderbird"
exe="/usr/lib/thunderbird/thunderbird-bin" key=(null)

So, application (in this case thunderbird, but reproduces with glxgears too) tried to create /home/vincas.nv/ directory, that really looks like a path concatenation bug.

Intrestingly, this does not occure if application is run without AppArmor mediation.

After some investigation, it seems that directory is tried to be created after failing to mmap() /tmp/.gl* files (in this yet another case, it’s Wine):

type=AVC msg=audit(1516649586.406:968): apparmor="DENIED" operation="file_mmap" profile="wine-preloader" 
name="/tmp/.glReZDwh" pid=31547 comm="gldriverquery64" requested_mask="m" denied_mask="m" fsuid=1000 ouid=1000

This can bee seen with sysdig too. In this case, mmap()'is was not denied:

146765 19:31:41.363130865 1 glxgears (15280) > fstat fd=14(<f>/tmp/.glEwKU3e)
146781 19:31:41.363143600 1 glxgears (15280) > mmap addr=0 length=8192 prot=5(PROT_READ|PROT_EXEC) 
flags=17(MAP_SHARED|MAP_32BIT) fd=14(<f>/tmp/.glEwKU3e) offset=0
146792 19:31:41.363152648 1 glxgears (15280) > mmap addr=0 length=8192 prot=3(PROT_READ|PROT_WRITE) flags=1(MAP_SHARED) 
fd=14(<f>/tmp/.glEwKU3e) offset=0
146798 19:31:41.363156709 1 glxgears (15280) > close fd=14(<f>/tmp/.glEwKU3e)

Here, prot is set to PROT_READ|PROT_EXEC, which I really hope is a bug too. If application is needed to mmap() some temporary files for execution from world-writable directory, hardening capabilties with AppArmor or other MAC system is reduced.

If I create /home/vincas.nv/ directory with appropriate permissions, I do see that application managed to create some .gl temp files:

$ ls -a /home/vincas.nv/
.  ..  .glEHt9Vu  .glMKQk7L  .glMWvlTf

Application does not create this directory and files if mmap()ing /tmp/.gl* is allowed.

Finally, I’ve did some debugging using gdb, running glxgears on AppArmor profile [0], and managed to breakpoint these mentioned events.

Here’se gdb log for catching mmap for /tmp/.gl* files (with stat output on breakpoint):

(gdb) set pagination off
(gdb) catch syscall mmap
Catchpoint 1 (syscall 'mmap' [9])
(gdb) commands
Type commands for breakpoint(s) 1, one per line.
End with a line saying just "end".
>if $r8 == 14
 >shell stat /proc/$(pgrep glxgeas)/fd/14
 >bt
 >c
 >end
>c
>end
(gdb) r
Starting program: /usr/bin/glxgears 

Catchpoint 1 (call to syscall mmap), 0x00007f5fdc0ea813 in __mmap64 (addr=addr@entry=0x0, len=len@entry=8192, prot=prot@entry=3, flags=flags@entry=34, fd=fd@entry=-1, offset=offset@entry=0) at ../sysdeps/unix/sysv/linux/mmap64.c:52
52	../sysdeps/unix/sysv/linux/mmap64.c: Toks failas ar aplankas neegzistuoja.

Catchpoint 1 (returned from syscall mmap), 0x00007f5fdc0ea813 in __mmap64 (addr=addr@entry=0x0, len=len@entry=8192, prot=prot@entry=3, flags=flags@entry=34, fd=fd@entry=-1, offset=offset@entry=0) at ../sysdeps/unix/sysv/linux/mmap64.c:52
52	in ../sysdeps/unix/sysv/linux/mmap64.c

... skipped ...

Catchpoint 1 (call to syscall mmap), 0x00007f5fdae27033 in __GI___mmap64 (addr=0x0, len=8192, prot=5, flags=65, fd=14, offset=0) at ../sysdeps/unix/sysv/linux/mmap64.c:52
52	in ../sysdeps/unix/sysv/linux/mmap64.c
  File: /proc/10927/fd/14 -> /tmp/.glkNddnb (deleted)
  Size: 64        	Blocks: 0          IO Block: 1024   simbolinė nuoroda
Device: 4h/4d	Inode: 155774      Links: 1
Access: (0700/lrwx------)  Uid: ( 1000/  vincas)   Gid: ( 1000/  vincas)
Access: 2018-01-29 19:26:23.888696615 +0200
Modify: 2018-01-29 19:26:23.868696676 +0200
Change: 2018-01-29 19:26:23.868696676 +0200
 Birth: -
#0  0x00007f5fdae27033 in __GI___mmap64 (addr=0x0, len=8192, prot=5, flags=65, fd=14, offset=0) at ../sysdeps/unix/sysv/linux/mmap64.c:52
#1  0x00007f5fd9473174 in ?? () from /usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1
#2  0x00007f5fd83fe04b in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.384.111
#3  0x00007f5fd8721894 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.384.111
#4  0x00007f5fd872d1d9 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.384.111
#5  0x00007f5fd85c9f72 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.384.111
#6  0x00007f5fd85d51f6 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.384.111
#7  0x00007f5fd83e2be5 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.384.111
#8  0x00007f5fd83bd56c in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.384.111
#9  0x00007f5fd9412f60 in ?? () from /usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1
#10 0x00007f5fd941318d in ?? () from /usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1
#11 0x00007f5fd9446f73 in ?? () from /usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1
#12 0x00005653103b9b06 in ?? ()
#13 0x00007f5fdad57f2a in __libc_start_main (main=0x5653103b9970, argc=1, argv=0x7ffca310b8f8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffca310b8e8) at ../csu/libc-start.c:310
#14 0x00005653103ba46a in ?? ()

Similarly, I’ve catched mkdir syscall and printed it’s argument (through $rdi register):

Catchpoint 2 (call to syscall mkdir), 0x00007f50e2271547 in mkdir () at ../sysdeps/unix/syscall-template.S:84
84	in ../sysdeps/unix/syscall-template.S
$11 = 0x559c11fc3460 "/home/vincas.nv"
#0  0x00007f50e2271547 in mkdir () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f50e08c0394 in ?? () from /usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1
#2  0x00007f50e08c70eb in ?? () from /usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1
#3  0x00007f50df85204b in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.384.111
#4  0x00007f50dfb75894 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.384.111
#5  0x00007f50dfb811d9 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.384.111
#6  0x00007f50dfa1df72 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.384.111
#7  0x00007f50dfa291f6 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.384.111
#8  0x00007f50df836be5 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.384.111
#9  0x00007f50df81156c in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.384.111
#10 0x00007f50e0866f60 in ?? () from /usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1
#11 0x00007f50e086718d in ?? () from /usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1
#12 0x00007f50e089af73 in ?? () from /usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1
#13 0x0000559c11669b06 in ?? ()
#14 0x00007f50e21abf2a in __libc_start_main (main=0x559c11669970, argc=1, argv=0x7ffef7be8e28, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffef7be8e18) at ../csu/libc-start.c:310
#15 0x0000559c1166a46a in ?? ()

In both cases, it’s done in /usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1.

So in retrospect:

  1. libGL tries to mmap() `/tmp/.gl*` with PROT_EXEC flag, which I believe is a bug, also reducing security.
  2. if libGL fails to mmap() `/tmp/.gl*` with PROT_EXEC flag (if denied by AppArmor for example), it tries to create `/home/user.nv/` directory and create temporary files there.

This is also reported in Debian BTS [1].

[0] https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=888028;filename=usr.bin.glxgears;msg=32
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888028

nvidia-bug-report.log:

____________________________________________

Start of NVIDIA bug report log file.  Please include this file, along
with a detailed description of your problem, when reporting a graphics
driver bug via the NVIDIA Linux forum (see devtalk.nvidia.com)
or by sending email to 'linux-bugs@nvidia.com'.

nvidia-bug-report.sh Version: 22924279

Date: Pr Sau 29 19:55:25 EET 2018
uname: Linux vinco 4.14.0-3-amd64 #1 SMP Debian 4.14.13-1 (2018-01-14) x86_64 GNU/Linux
command line flags: 

____________________________________________

*** /etc/issue
*** ls: -rw-r--r-- 1 root root 35 2017-06-26 01:19:42.000000000 +0300 /etc/issue
Debian GNU/Linux buster/sid \n \l

____________________________________________

*** /etc/debian_version
*** ls: -rw-r--r-- 1 root root 11 2017-06-26 01:18:00.000000000 +0300 /etc/debian_version
buster/sid

____________________________________________

*** /var/log/nvidia-installer.log does not exist

____________________________________________

journalctl -b -0 _COMM=Xorg

-- Logs begin at Mon 2018-01-29 18:22:22 EET, end at Mon 2018-01-29 19:55:25 EET. --
-- No entries --

____________________________________________

journalctl -b -1 _COMM=Xorg

____________________________________________

journalctl -b -2 _COMM=Xorg

____________________________________________

journalctl -b -0 _COMM=Xorg.bin

-- Logs begin at Mon 2018-01-29 18:22:22 EET, end at Mon 2018-01-29 19:55:25 EET. --
-- No entries --

____________________________________________

journalctl -b -1 _COMM=Xorg.bin

____________________________________________

journalctl -b -2 _COMM=Xorg.bin

____________________________________________

journalctl -b -0 _COMM=X

-- Logs begin at Mon 2018-01-29 18:22:22 EET, end at Mon 2018-01-29 19:55:25 EET. --
-- No entries --

____________________________________________

journalctl -b -1 _COMM=X

____________________________________________

journalctl -b -2 _COMM=X

____________________________________________

*** /var/log/Xorg.0.log
*** ls: -rw-r--r-- 1 root root 47607 2018-01-29 18:25:33.588956244 +0200 /var/log/Xorg.0.log
[     3.410] (--) Log file renamed from "/var/log/Xorg.pid-1625.log" to "/var/log/Xorg.0.log"
[     3.411] 
X.Org X Server 1.19.6
Release Date: 2017-12-20
[     3.411] X Protocol Version 11, Revision 0
[     3.411] Build Operating System: Linux 4.9.0-5-amd64 x86_64 Debian
[     3.411] Current Operating System: Linux vinco 4.14.0-3-amd64 #1 SMP Debian 4.14.13-1 (2018-01-14) x86_64
[     3.411] Kernel command line: BOOT_IMAGE=/vmlinuz-4.14.0-3-amd64 root=UUID=795ee075-978f-4245-9dad-ecccd37080d8 ro quiet apparmor=1 security=apparmor
[     3.411] Build Date: 26 January 2018  04:30:21PM
[     3.411] xorg-server 2:1.19.6-1 (https://www.debian.org/support) 
[     3.411] Current version of pixman: 0.34.0
[     3.411] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[     3.411] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[     3.411] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Jan 29 18:22:24 2018
[     3.412] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[     3.413] (==) No Layout section.  Using the first Screen section.
[     3.413] (==) No screen section available. Using defaults.
[     3.413] (**) |-->Screen "Default Screen Section" (0)
[     3.413] (**) |   |-->Monitor "<default monitor>"
[     3.414] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[     3.414] (==) Automatically adding devices
[     3.414] (==) Automatically enabling devices
[     3.414] (==) Automatically adding GPU devices
[     3.414] (==) Max clients allowed: 256, resource mask: 0x1fffff
[     3.416] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[     3.416] 	Entry deleted from font path.
[     3.418] (==) FontPath set to:
	/usr/share/fonts/X11/misc,
	/usr/share/fonts/X11/100dpi/:unscaled,
	/usr/share/fonts/X11/75dpi/:unscaled,
	/usr/share/fonts/X11/Type1,
	/usr/share/fonts/X11/100dpi,
	/usr/share/fonts/X11/75dpi,
	built-ins
[     3.418] (==) ModulePath set to "/usr/lib/xorg/modules"
[     3.418] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[     3.418] (II) Loader magic: 0x55badc70fde0
[     3.418] (II) Module ABI versions:
[     3.418] 	X.Org ANSI C Emulation: 0.4
[     3.418] 	X.Org Video Driver: 23.0
[     3.418] 	X.Org XInput driver : 24.1
[     3.418] 	X.Org Server Extension : 10.0
[     3.419] (++) using VT number 7

[     3.419] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[     3.419] (II) xfree86: Adding drm device (/dev/dri/card0)
[     3.433] (--) PCI:*(0:0:2:0) 8086:0416:1043:177d rev 6, Mem @ 0xf7400000/4194304, 0xd0000000/268435456, I/O @ 0x0000f000/64, BIOS @ 0x????????/131072
[     3.433] (II) LoadModule: "glx"
[     3.434] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[     3.440] (II) Module glx: vendor="X.Org Foundation"
[     3.440] 	compiled for 1.19.6, module version = 1.0.0
[     3.440] 	ABI class: X.Org Server Extension, version 10.0
[     3.440] (==) Matched modesetting as autoconfigured driver 0
[     3.440] (==) Matched fbdev as autoconfigured driver 1
[     3.440] (==) Matched vesa as autoconfigured driver 2
[     3.440] (==) Assigned the driver to the xf86ConfigLayout
[     3.440] (II) LoadModule: "modesetting"
[     3.440] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[     3.441] (II) Module modesetting: vendor="X.Org Foundation"
[     3.441] 	compiled for 1.19.6, module version = 1.19.6
[     3.441] 	Module class: X.Org Video Driver
[     3.441] 	ABI class: X.Org Video Driver, version 23.0
[     3.441] (II) LoadModule: "fbdev"
[     3.441] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[     3.441] (II) Module fbdev: vendor="X.Org Foundation"
[     3.441] 	compiled for 1.19.0, module version = 0.4.4
[     3.441] 	Module class: X.Org Video Driver
[     3.441] 	ABI class: X.Org Video Driver, version 23.0
[     3.441] (II) LoadModule: "vesa"
[     3.441] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[     3.442] (II) Module vesa: vendor="X.Org Foundation"
[     3.442] 	compiled for 1.19.0, module version = 2.3.4
[     3.442] 	Module class: X.Org Video Driver
[     3.442] 	ABI class: X.Org Video Driver, version 23.0
[     3.442] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[     3.442] (II) FBDEV: driver for framebuffer: fbdev
[     3.442] (II) VESA: driver for VESA chipsets: vesa
[     3.466] (II) modeset(0): using drv /dev/dri/card0
[     3.466] (WW) Falling back to old probe method for fbdev
[     3.466] (II) Loading sub module "fbdevhw"
[     3.466] (II) LoadModule: "fbdevhw"
[     3.466] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[     3.466] (II) Module fbdevhw: vendor="X.Org Foundation"
[     3.466] 	compiled for 1.19.6, module version = 0.0.2
[     3.466] 	ABI class: X.Org Video Driver, version 23.0
[     3.466] (WW) Falling back to old probe method for vesa
[     3.466] (II) modeset(0): Creating default Display subsection in Screen section
	"Default Screen Section" for depth/fbbpp 24/32
[     3.466] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[     3.466] (==) modeset(0): RGB weight 888
[     3.466] (==) modeset(0): Default visual is TrueColor
[     3.466] (II) Loading sub module "glamoregl"
[     3.466] (II) LoadModule: "glamoregl"
[     3.466] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[     3.473] (II) Module glamoregl: vendor="X.Org Foundation"
[     3.473] 	compiled for 1.19.6, module version = 1.0.0
[     3.473] 	ABI class: X.Org ANSI C Emulation, version 0.4
[     3.473] (II) glamor: OpenGL accelerated X.org driver based.
[     3.505] (II) glamor: EGL version 1.4 (DRI2):
[     3.515] (II) modeset(0): glamor initialized
[     3.516] (II) modeset(0): Output eDP-1 has no monitor section
[     3.516] (II) modeset(0): Output DP-1 has no monitor section
[     3.524] (II) modeset(0): Output HDMI-1 has no monitor section
[     3.532] (II) modeset(0): Output HDMI-2 has no monitor section
[     3.533] (II) modeset(0): EDID for output eDP-1
[     3.533] (II) modeset(0): Manufacturer: LGD  Model: 42c  Serial#: 0
[     3.533] (II) modeset(0): Year: 2013  Week: 0
[     3.533] (II) modeset(0): EDID Version: 1.4
[     3.533] (II) modeset(0): Digital Display Input
[     3.533] (II) modeset(0): 6 bits per channel
[     3.533] (II) modeset(0): Digital interface is DisplayPort
[     3.533] (II) modeset(0): Max Image Size [cm]: horiz.: 35  vert.: 19
[     3.533] (II) modeset(0): Gamma: 2.20
[     3.533] (II) modeset(0): DPMS capabilities: StandBy Suspend Off
[     3.533] (II) modeset(0): Supported color encodings: RGB 4:4:4 YCrCb 4:4:4 
[     3.533] (II) modeset(0): First detailed timing is preferred mode
[     3.533] (II) modeset(0): Preferred mode is native pixel format and refresh rate
[     3.533] (II) modeset(0): redX: 0.625 redY: 0.355   greenX: 0.335 greenY: 0.570
[     3.533] (II) modeset(0): blueX: 0.151 blueY: 0.050   whiteX: 0.313 whiteY: 0.329
[     3.533] (II) modeset(0): Manufacturer's mask: 0
[     3.533] (II) modeset(0): Supported detailed timing:
[     3.533] (II) modeset(0): clock: 138.7 MHz   Image Size:  345 x 194 mm
[     3.533] (II) modeset(0): h_active: 1920  h_sync: 1968  h_sync_end 2000 h_blank_end 2080 h_border: 0
[     3.533] (II) modeset(0): v_active: 1080  v_sync: 1083  v_sync_end 1088 v_blanking: 1111 v_border: 0
[     3.533] (II) modeset(0):  LG Display
[     3.533] (II) modeset(0):  LP156WF4-SPH1
[     3.533] (II) modeset(0): EDID (in hex):
[     3.533] (II) modeset(0): 	00ffffffffffff0030e42c0400000000
[     3.533] (II) modeset(0): 	0017010495231378ea0cf5a05b559226
[     3.533] (II) modeset(0): 	0c505400000001010101010101010101
[     3.533] (II) modeset(0): 	0101010101012e3680a070381f403020
[     3.533] (II) modeset(0): 	350059c2100000190000000000000000
[     3.533] (II) modeset(0): 	00000000000000000000000000fe004c
[     3.533] (II) modeset(0): 	4720446973706c61790a2020000000fe
[     3.533] (II) modeset(0): 	004c503135365746342d53504831003b
[     3.533] (II) modeset(0): Printing probed modes for output eDP-1
[     3.533] (II) modeset(0): Modeline "1920x1080"x60.0  138.70  1920 1968 2000 2080  1080 1083 1088 1111 -hsync -vsync (66.7 kHz eP)
[     3.533] (II) modeset(0): Modeline "1920x1080"x59.9  138.50  1920 1968 2000 2080  1080 1083 1088 1111 +hsync -vsync (66.6 kHz d)
[     3.533] (II) modeset(0): Modeline "1680x1050"x60.0  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync (65.3 kHz d)
[     3.533] (II) modeset(0): Modeline "1680x1050"x59.9  119.00  1680 1728 1760 1840  1050 1053 1059 1080 +hsync -vsync (64.7 kHz d)
[     3.533] (II) modeset(0): Modeline "1600x1024"x60.2  103.12  1600 1600 1656 1664  1024 1024 1029 1030 +hsync +vsync (62.0 kHz d)
[     3.533] (II) modeset(0): Modeline "1400x1050"x60.0  122.00  1400 1488 1640 1880  1050 1052 1064 1082 +hsync +vsync (64.9 kHz d)
[     3.533] (II) modeset(0): Modeline "1280x1024"x60.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz d)
[     3.533] (II) modeset(0): Modeline "1440x900"x59.9  106.50  1440 1520 1672 1904  900 903 909 934 -hsync +vsync (55.9 kHz d)
[     3.533] (II) modeset(0): Modeline "1280x960"x60.0  108.00  1280 1376 1488 1800  960 961 964 1000 +hsync +vsync (60.0 kHz d)
[     3.533] (II) modeset(0): Modeline "1360x768"x59.8   84.75  1360 1432 1568 1776  768 771 781 798 -hsync +vsync (47.7 kHz d)
[     3.533] (II) modeset(0): Modeline "1360x768"x60.0   72.00  1360 1408 1440 1520  768 771 781 790 +hsync -vsync (47.4 kHz d)
[     3.533] (II) modeset(0): Modeline "1152x864"x60.0   81.62  1152 1216 1336 1520  864 865 868 895 -hsync +vsync (53.7 kHz d)
[     3.533] (II) modeset(0): Modeline "1024x768"x120.1  133.47  1024 1100 1212 1400  768 768 770 794 doublescan -hsync +vsync (95.3 kHz d)
[     3.533] (II) modeset(0): Modeline "1024x768"x60.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz d)
[     3.533] (II) modeset(0): Modeline "960x720"x120.0  117.00  960 1024 1128 1300  720 720 722 750 doublescan -hsync +vsync (90.0 kHz d)
[     3.533] (II) modeset(0): Modeline "928x696"x120.1  109.15  928 976 1088 1264  696 696 698 719 doublescan -hsync +vsync (86.4 kHz d)
[     3.533] (II) modeset(0): Modeline "896x672"x120.0  102.40  896 960 1060 1224  672 672 674 697 doublescan -hsync +vsync (83.7 kHz d)
[     3.533] (II) modeset(0): Modeline "960x600"x120.0   77.00  960 984 1000 1040  600 601 604 617 doublescan +hsync -vsync (74.0 kHz d)
[     3.533] (II) modeset(0): Modeline "960x540"x120.0   69.25  960 984 1000 1040  540 541 544 555 doublescan +hsync -vsync (66.6 kHz d)
[     3.533] (II) modeset(0): Modeline "800x600"x120.0   81.00  800 832 928 1080  600 600 602 625 doublescan +hsync +vsync (75.0 kHz d)
[     3.533] (II) modeset(0): Modeline "800x600"x60.3   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz d)
[     3.533] (II) modeset(0): Modeline "800x600"x56.2   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync (35.2 kHz d)
[     3.533] (II) modeset(0): Modeline "840x525"x120.0   73.12  840 892 980 1120  525 526 529 544 doublescan -hsync +vsync (65.3 kHz d)
[     3.533] (II) modeset(0): Modeline "840x525"x119.8   59.50  840 864 880 920  525 526 529 540 doublescan +hsync -vsync (64.7 kHz d)
[     3.533] (II) modeset(0): Modeline "800x512"x120.3   51.56  800 800 828 832  512 512 514 515 doublescan +hsync +vsync (62.0 kHz d)
[     3.533] (II) modeset(0): Modeline "700x525"x120.0   61.00  700 744 820 940  525 526 532 541 doublescan +hsync +vsync (64.9 kHz d)
[     3.533] (II) modeset(0): Modeline "640x512"x120.0   54.00  640 664 720 844  512 512 514 533 doublescan +hsync +vsync (64.0 kHz d)
[     3.533] (II) modeset(0): Modeline "720x450"x119.8   53.25  720 760 836 952  450 451 454 467 doublescan -hsync +vsync (55.9 kHz d)
[     3.533] (II) modeset(0): Modeline "640x480"x120.0   54.00  640 688 744 900  480 480 482 500 doublescan +hsync +vsync (60.0 kHz d)
[     3.533] (II) modeset(0): Modeline "640x480"x59.9   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz d)
[     3.533] (II) modeset(0): Modeline "680x384"x119.6   42.38  680 716 784 888  384 385 390 399 doublescan -hsync +vsync (47.7 kHz d)
[     3.533] (II) modeset(0): Modeline "680x384"x119.9   36.00  680 704 720 760  384 385 390 395 doublescan +hsync -vsync (47.4 kHz d)
[     3.533] (II) modeset(0): Modeline "576x432"x120.1   40.81  576 608 668 760  432 432 434 447 doublescan -hsync +vsync (53.7 kHz d)
[     3.533] (II) modeset(0): Modeline "512x384"x120.0   32.50  512 524 592 672  384 385 388 403 doublescan -hsync -vsync (48.4 kHz d)
[     3.533] (II) modeset(0): Modeline "400x300"x120.6   20.00  400 420 484 528  300 300 302 314 doublescan +hsync +vsync (37.9 kHz d)
[     3.533] (II) modeset(0): Modeline "400x300"x112.7   18.00  400 412 448 512  300 300 301 312 doublescan +hsync +vsync (35.2 kHz d)
[     3.533] (II) modeset(0): Modeline "320x240"x120.1   12.59  320 328 376 400  240 245 246 262 doublescan -hsync -vsync (31.5 kHz d)
[     3.533] (II) modeset(0): EDID for output DP-1
[     3.541] (II) modeset(0): EDID for output HDMI-1
[     3.550] (II) modeset(0): EDID for output HDMI-2
[     3.550] (II) modeset(0): Output eDP-1 connected
[     3.550] (II) modeset(0): Output DP-1 disconnected
[     3.550] (II) modeset(0): Output HDMI-1 disconnected
[     3.550] (II) modeset(0): Output HDMI-2 disconnected
[     3.550] (II) modeset(0): Using exact sizes for initial modes
[     3.550] (II) modeset(0): Output eDP-1 using initial mode 1920x1080 +0+0
[     3.550] (==) modeset(0): Using gamma correction (1.0, 1.0, 1.0)
[     3.550] (==) modeset(0): DPI set to (96, 96)
[     3.550] (II) Loading sub module "fb"
[     3.550] (II) LoadModule: "fb"
[     3.550] (II) Loading /usr/lib/xorg/modules/libfb.so
[     3.551] (II) Module fb: vendor="X.Org Foundation"
[     3.551] 	compiled for 1.19.6, module version = 1.0.0
[     3.551] 	ABI class: X.Org ANSI C Emulation, version 0.4
[     3.551] (II) UnloadModule: "fbdev"
[     3.551] (II) Unloading fbdev
[     3.551] (II) UnloadSubModule: "fbdevhw"
[     3.551] (II) Unloading fbdevhw
[     3.551] (II) UnloadModule: "vesa"
[     3.551] (II) Unloading vesa
[     3.551] (==) Depth 24 pixmap format is 32 bpp
[     3.608] (==) modeset(0): Backing store enabled
[     3.608] (==) modeset(0): Silken mouse enabled
[     3.608] (II) modeset(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[     3.666] (==) modeset(0): DPMS enabled
[     3.666] (II) modeset(0): [DRI2] Setup complete
[     3.666] (II) modeset(0): [DRI2]   DRI driver: i965
[     3.666] (II) modeset(0): [DRI2]   VDPAU driver: i965
[     3.666] (--) RandR disabled
[     3.669] (II) SELinux: Disabled on system
[     3.674] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[     3.674] (II) AIGLX: enabled GLX_ARB_create_context
[     3.674] (II) AIGLX: enabled GLX_ARB_create_context_profile
[     3.674] (II) AIGLX: enabled GLX_EXT_create_context_es{,2}_profile
[     3.674] (II) AIGLX: enabled GLX_INTEL_swap_event
[     3.674] (II) AIGLX: enabled GLX_SGI_swap_control
[     3.674] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB
[     3.674] (II) AIGLX: enabled GLX_ARB_fbconfig_float
[     3.674] (II) AIGLX: enabled GLX_EXT_fbconfig_packed_float
[     3.674] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
[     3.674] (II) AIGLX: enabled GLX_ARB_create_context_robustness
[     3.674] (II) AIGLX: Loaded and initialized i965
[     3.674] (II) GLX: Initialized DRI2 GL provider for screen 0
[     3.677] (II) modeset(0): Damage tracking initialized
[     3.677] (II) modeset(0): Setting screen physical size to 508 x 285
[     3.726] (II) config/udev: Adding input device Power Button (/dev/input/event5)
[     3.726] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[     3.726] (II) LoadModule: "libinput"
[     3.726] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
[     3.730] (II) Module libinput: vendor="X.Org Foundation"
[     3.730] 	compiled for 1.19.3, module version = 0.26.0
[     3.730] 	Module class: X.Org XInput Driver
[     3.730] 	ABI class: X.Org XInput driver, version 24.1
[     3.730] (II) Using input driver 'libinput' for 'Power Button'
[     3.730] (**) Power Button: always reports core events
[     3.730] (**) Option "Device" "/dev/input/event5"
[     3.730] (**) Option "_source" "server/udev"
[     3.731] (II) event5  - (II) Power Button: (II) is tagged by udev as: Keyboard
[     3.731] (II) event5  - (II) Power Button: (II) device is a keyboard
[     3.731] (II) event5  - (II) Power Button: (II) device removed
[     3.764] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input12/event5"
[     3.764] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 6)
[     3.764] (**) Option "xkb_model" "pc105"
[     3.764] (**) Option "xkb_layout" "lt,lt"
[     3.764] (**) Option "xkb_variant" ",us"
[     3.764] (**) Option "xkb_options" "grp:alt_shift_toggle,grp_led:scroll"
[     3.778] (II) event5  - (II) Power Button: (II) is tagged by udev as: Keyboard
[     3.778] (II) event5  - (II) Power Button: (II) device is a keyboard
[     3.779] (II) config/udev: Adding input device Asus Wireless Radio Control (/dev/input/event6)
[     3.779] (**) Asus Wireless Radio Control: Applying InputClass "libinput keyboard catchall"
[     3.779] (II) Using input driver 'libinput' for 'Asus Wireless Radio Control'
[     3.779] (**) Asus Wireless Radio Control: always reports core events
[     3.779] (**) Option "Device" "/dev/input/event6"
[     3.779] (**) Option "_source" "server/udev"
[     3.779] (II) event6  - (II) Asus Wireless Radio Control: (II) is tagged by udev as: Keyboard
[     3.779] (II) event6  - (II) Asus Wireless Radio Control: (II) device is a keyboard
[     3.779] (II) event6  - (II) Asus Wireless Radio Control: (II) device removed
[     3.828] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/ATK4002:00/input/input13/event6"
[     3.828] (II) XINPUT: Adding extended input device "Asus Wireless Radio Control" (type: KEYBOARD, id 7)
[     3.828] (**) Option "xkb_model" "pc105"
[     3.828] (**) Option "xkb_layout" "lt,lt"
[     3.828] (**) Option "xkb_variant" ",us"
[     3.828] (**) Option "xkb_options" "grp:alt_shift_toggle,grp_led:scroll"
[     3.828] (II) event6  - (II) Asus Wireless Radio Control: (II) is tagged by udev as: Keyboard
[     3.828] (II) event6  - (II) Asus Wireless Radio Control: (II) device is a keyboard
[     3.828] (II) config/udev: Adding input device Video Bus (/dev/input/event10)
[     3.828] (**) Video Bus: Applying InputClass "libinput keyboard catchall"
[     3.828] (II) Using input driver 'libinput' for 'Video Bus'
[     3.828] (**) Video Bus: always reports core events
[     3.828] (**) Option "Device" "/dev/input/event10"
[     3.828] (**) Option "_source" "server/udev"
[     3.829] (II) event10 - (II) Video Bus: (II) is tagged by udev as: Keyboard
[     3.829] (II) event10 - (II) Video Bus: (II) device is a keyboard
[     3.829] (II) event10 - (II) Video Bus: (II) device removed
[     3.868] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:01/input/input17/event10"
[     3.868] (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD, id 8)
[     3.868] (**) Option "xkb_model" "pc105"
[     3.868] (**) Option "xkb_layout" "lt,lt"
[     3.868] (**) Option "xkb_variant" ",us"
[     3.868] (**) Option "xkb_options" "grp:alt_shift_toggle,grp_led:scroll"
[     3.868] (II) event10 - (II) Video Bus: (II) is tagged by udev as: Keyboard
[     3.868] (II) event10 - (II) Video Bus: (II) device is a keyboard
[     3.868] (II) config/udev: Adding input device Video Bus (/dev/input/event9)
[     3.868] (**) Video Bus: Applying InputClass "libinput keyboard catchall"
[     3.868] (II) Using input driver 'libinput' for 'Video Bus'
[     3.868] (**) Video Bus: always reports core events
[     3.868] (**) Option "Device" "/dev/input/event9"
[     3.868] (**) Option "_source" "server/udev"
[     3.868] (II) event9  - (II) Video Bus: (II) is tagged by udev as: Keyboard
[     3.868] (II) event9  - (II) Video Bus: (II) device is a keyboard
[     3.868] (II) event9  - (II) Video Bus: (II) device removed
[     3.920] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:4f/LNXVIDEO:00/input/input16/event9"
[     3.920] (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD, id 9)
[     3.920] (**) Option "xkb_model" "pc105"
[     3.920] (**) Option "xkb_layout" "lt,lt"
[     3.920] (**) Option "xkb_variant" ",us"
[     3.920] (**) Option "xkb_options" "grp:alt_shift_toggle,grp_led:scroll"
[     3.920] (II) event9  - (II) Video Bus: (II) is tagged by udev as: Keyboard
[     3.920] (II) event9  - (II) Video Bus: (II) device is a keyboard
[     3.920] (II) config/udev: Adding input device Lid Switch (/dev/input/event3)
[     3.920] (II) No input driver specified, ignoring this device.
[     3.920] (II) This device may have been added with another device file.
[     3.921] (II) config/udev: Adding input device Sleep Button (/dev/input/event4)
[     3.921] (**) Sleep Button: Applying InputClass "libinput keyboard catchall"
[     3.921] (II) Using input driver 'libinput' for 'Sleep Button'
[     3.921] (**) Sleep Button: always reports core events
[     3.921] (**) Option "Device" "/dev/input/event4"
[     3.921] (**) Option "_source" "server/udev"
[     3.921] (II) event4  - (II) Sleep Button: (II) is tagged by udev as: Keyboard
[     3.921] (II) event4  - (II) Sleep Button: (II) device is a keyboard
[     3.921] (II) event4  - (II) Sleep Button: (II) device removed
[     3.940] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input11/event4"
[     3.940] (II) XINPUT: Adding extended input device "Sleep Button" (type: KEYBOARD, id 10)
[     3.940] (**) Option "xkb_model" "pc105"
[     3.940] (**) Option "xkb_layout" "lt,lt"
[     3.940] (**) Option "xkb_variant" ",us"
[     3.940] (**) Option "xkb_options" "grp:alt_shift_toggle,grp_led:scroll"
[     3.940] (II) event4  - (II) Sleep Button: (II) is tagged by udev as: Keyboard
[     3.940] (II) event4  - (II) Sleep Button: (II) device is a keyboard
[     3.941] (II) config/udev: Adding input device HDA Intel HDMI HDMI/DP,pcm=3 (/dev/input/event12)
[     3.941] (II) No input driver specified, ignoring this device.
[     3.941] (II) This device may have been added with another device file.
[     3.941] (II) config/udev: Adding input device HDA Intel HDMI HDMI/DP,pcm=7 (/dev/input/event13)
[     3.941] (II) No input driver specified, ignoring this device.
[     3.941] (II) This device may have been added with another device file.
[     3.942] (II) config/udev: Adding input device HDA Intel HDMI HDMI/DP,pcm=8 (/dev/input/event14)
[     3.942] (II) No input driver specified, ignoring this device.
[     3.942] (II) This device may have been added with another device file.
[     3.942] (II) config/udev: Adding input device HDA Intel HDMI HDMI/DP,pcm=9 (/dev/input/event15)
[     3.942] (II) No input driver specified, ignoring this device.
[     3.942] (II) This device may have been added with another device file.
[     3.943] (II) config/udev: Adding input device Logitech M705 (/dev/input/event1)
[     3.943] (**) Logitech M705: Applying InputClass "libinput pointer catchall"
[     3.943] (II) Using input driver 'libinput' for 'Logitech M705'
[     3.943] (**) Logitech M705: always reports core events
[     3.943] (**) Option "Device" "/dev/input/event1"
[     3.943] (**) Option "_source" "server/udev"
[     3.943] (II) event1  - (II) Logitech M705: (II) is tagged by udev as: Mouse
[     3.943] (II) event1  - (II) Logitech M705: (II) device set to 800 DPI
[     3.943] (II) event1  - (II) Logitech M705: (II) device is a pointer
[     3.943] (II) event1  - (II) Logitech M705: (II) device removed
[     3.996] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.2/0003:046D:C52B.0003/0003:046D:101B.0004/input/input9/event1"
[     3.996] (II) XINPUT: Adding extended input device "Logitech M705" (type: MOUSE, id 11)
[     3.996] (**) Option "AccelerationScheme" "none"
[     3.996] (**) Logitech M705: (accel) selected scheme none/0
[     3.996] (**) Logitech M705: (accel) acceleration factor: 2.000
[     3.996] (**) Logitech M705: (accel) acceleration threshold: 4
[     3.997] (II) event1  - (II) Logitech M705: (II) is tagged by udev as: Mouse
[     3.997] (II) event1  - (II) Logitech M705: (II) device set to 800 DPI
[     3.997] (II) event1  - (II) Logitech M705: (II) device is a pointer
[     3.997] (II) config/udev: Adding input device Logitech M705 (/dev/input/mouse0)
[     3.997] (II) No input driver specified, ignoring this device.
[     3.997] (II) This device may have been added with another device file.
[     3.998] (II) config/udev: Adding input device USB2.0 UVC HD Webcam: USB2.0 UV (/dev/input/event16)
[     3.998] (**) USB2.0 UVC HD Webcam: USB2.0 UV: Applying InputClass "libinput keyboard catchall"
[     3.998] (II) Using input driver 'libinput' for 'USB2.0 UVC HD Webcam: USB2.0 UV'
[     3.998] (**) USB2.0 UVC HD Webcam: USB2.0 UV: always reports core events
[     3.998] (**) Option "Device" "/dev/input/event16"
[     3.998] (**) Option "_source" "server/udev"
[     3.998] (II) event16 - (II) USB2.0 UVC HD Webcam: USB2.0 UV: (II) is tagged by udev as: Keyboard
[     3.998] (II) event16 - (II) USB2.0 UVC HD Webcam: USB2.0 UV: (II) device is a keyboard
[     3.998] (II) event16 - (II) USB2.0 UVC HD Webcam: USB2.0 UV: (II) device removed
[     4.028] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-7/3-7:1.0/input/input23/event16"
[     4.028] (II) XINPUT: Adding extended input device "USB2.0 UVC HD Webcam: USB2.0 UV" (type: KEYBOARD, id 12)
[     4.028] (**) Option "xkb_model" "pc105"
[     4.028] (**) Option "xkb_layout" "lt,lt"
[     4.028] (**) Option "xkb_variant" ",us"
[     4.028] (**) Option "xkb_options" "grp:alt_shift_toggle,grp_led:scroll"
[     4.029] (II) event16 - (II) USB2.0 UVC HD Webcam: USB2.0 UV: (II) is tagged by udev as: Keyboard
[     4.029] (II) event16 - (II) USB2.0 UVC HD Webcam: USB2.0 UV: (II) device is a keyboard
[     4.029] (II) config/udev: Adding input device HDA Intel PCH Headphone Mic (/dev/input/event11)
[     4.029] (II) No input driver specified, ignoring this device.
[     4.029] (II) This device may have been added with another device file.
[     4.029] (II) config/udev: Adding input device Asus WMI hotkeys (/dev/input/event8)
[     4.029] (**) Asus WMI hotkeys: Applying InputClass "libinput keyboard catchall"
[     4.029] (II) Using input driver 'libinput' for 'Asus WMI hotkeys'
[     4.029] (**) Asus WMI hotkeys: always reports core events
[     4.029] (**) Option "Device" "/dev/input/event8"
[     4.029] (**) Option "_source" "server/udev"
[     4.030] (II) event8  - (II) Asus WMI hotkeys: (II) is tagged by udev as: Keyboard
[     4.030] (II) event8  - (II) Asus WMI hotkeys: (II) device is a keyboard
[     4.030] (II) event8  - (II) Asus WMI hotkeys: (II) device removed
[     4.060] (**) Option "config_info" "udev:/sys/devices/platform/asus-nb-wmi/input/input15/event8"
[     4.060] (II) XINPUT: Adding extended input device "Asus WMI hotkeys" (type: KEYBOARD, id 13)
[     4.060] (**) Option "xkb_model" "pc105"
[     4.060] (**) Option "xkb_layout" "lt,lt"
[     4.060] (**) Option "xkb_variant" ",us"
[     4.060] (**) Option "xkb_options" "grp:alt_shift_toggle,grp_led:scroll"
[     4.060] (II) event8  - (II) Asus WMI hotkeys: (II) is tagged by udev as: Keyboard
[     4.061] (II) event8  - (II) Asus WMI hotkeys: (II) device is a keyboard
[     4.061] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event0)
[     4.061] (**) AT Translated Set 2 keyboard: Applying InputClass "libinput keyboard catchall"
[     4.061] (II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'
[     4.061] (**) AT Translated Set 2 keyboard: always reports core events
[     4.061] (**) Option "Device" "/dev/input/event0"
[     4.061] (**) Option "_source" "server/udev"
[     4.061] (II) event0  - (II) AT Translated Set 2 keyboard: (II) is tagged by udev as: Keyboard
[     4.061] (II) event0  - (II) AT Translated Set 2 keyboard: (II) device is a keyboard
[     4.062] (II) event0  - (II) AT Translated Set 2 keyboard: (II) device removed
[     4.076] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio0/input/input0/event0"
[     4.076] (II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD, id 14)
[     4.076] (**) Option "xkb_model" "pc105"
[     4.076] (**) Option "xkb_layout" "lt,lt"
[     4.076] (**) Option "xkb_variant" ",us"
[     4.076] (**) Option "xkb_options" "grp:alt_shift_toggle,grp_led:scroll"
[     4.077] (II) event0  - (II) AT Translated Set 2 keyboard: (II) is tagged by udev as: Keyboard
[     4.077] (II) event0  - (II) AT Translated Set 2 keyboard: (II) device is a keyboard
[     4.077] (II) config/udev: Adding input device ETPS/2 Elantech Touchpad (/dev/input/event2)
[     4.077] (**) ETPS/2 Elantech Touchpad: Applying InputClass "libinput touchpad catchall"
[     4.077] (II) Using input driver 'libinput' for 'ETPS/2 Elantech Touchpad'
[     4.077] (**) ETPS/2 Elantech Touchpad: always reports core events
[     4.077] (**) Option "Device" "/dev/input/event2"
[     4.077] (**) Option "_source" "server/udev"
[     4.078] (II) event2  - (II) ETPS/2 Elantech Touchpad: (II) is tagged by udev as: Touchpad
[     4.078] (II) event2  - (II) ETPS/2 Elantech Touchpad: (II) device is a touchpad
[     4.078] (II) event2  - (II) ETPS/2 Elantech Touchpad: (II) device removed
[     4.108] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio4/input/input8/event2"
[     4.108] (II) XINPUT: Adding extended input device "ETPS/2 Elantech Touchpad" (type: TOUCHPAD, id 15)
[     4.108] (**) Option "AccelerationScheme" "none"
[     4.108] (**) ETPS/2 Elantech Touchpad: (accel) selected scheme none/0
[     4.108] (**) ETPS/2 Elantech Touchpad: (accel) acceleration factor: 2.000
[     4.108] (**) ETPS/2 Elantech Touchpad: (accel) acceleration threshold: 4
[     4.109] (II) event2  - (II) ETPS/2 Elantech Touchpad: (II) is tagged by udev as: Touchpad
[     4.109] (II) event2  - (II) ETPS/2 Elantech Touchpad: (II) device is a touchpad
[     4.109] (II) config/udev: Adding input device ETPS/2 Elantech Touchpad (/dev/input/mouse1)
[     4.109] (II) No input driver specified, ignoring this device.
[     4.109] (II) This device may have been added with another device file.
[     4.110] (II) config/udev: Adding input device PC Speaker (/dev/input/event7)
[     4.110] (II) No input driver specified, ignoring this device.
[     4.110] (II) This device may have been added with another device file.
[     4.110] (II) config/udev: Adding input device (unnamed) (/dev/ttyS0)
[     4.110] (II) No input driver specified, ignoring this device.
[     4.110] (II) This device may have been added with another device file.
[     4.110] (II) config/udev: Adding input device (unnamed) (/dev/ttyS1)
[     4.110] (II) No input driver specified, ignoring this device.
[     4.110] (II) This device may have been added with another device file.
[     4.110] (II) config/udev: Adding input device (unnamed) (/dev/ttyS2)
[     4.110] (II) No input driver specified, ignoring this device.
[     4.110] (II) This device may have been added with another device file.
[     4.110] (II) config/udev: Adding input device (unnamed) (/dev/ttyS3)
[     4.110] (II) No input driver specified, ignoring this device.
[     4.110] (II) This device may have been added with another device file.
[     4.111] (II) config/udev: Adding input device (unnamed) (/dev/input/mice)
[     4.111] (II) No input driver specified, ignoring this device.
[     4.111] (II) This device may have been added with another device file.
[     4.111] (II) config/udev: Adding input device (unnamed) (/dev/console)
[     4.111] (II) No input driver specified, ignoring this device.
[     4.111] (II) This device may have been added with another device file.
[     4.111] (II) config/udev: Adding input device (unnamed) (/dev/ptmx)
[     4.111] (II) No input driver specified, ignoring this device.
[     4.111] (II) This device may have been added with another device file.
[     4.111] (II) config/udev: Adding input device (unnamed) (/dev/tty)
[     4.111] (II) No input driver specified, ignoring this device.
[     4.111] (II) This device may have been added with another device file.
[     4.111] (II) config/udev: Adding input device (unnamed) (/dev/tty0)
[     4.111] (II) No input driver specified, ignoring this device.
[     4.111] (II) This device may have been added with another device file.
[     4.111] (II) config/udev: Adding input device (unnamed) (/dev/tty1)
[     4.111] (II) No input driver specified, ignoring this device.
[     4.111] (II) This device may have been added with another device file.
[     4.111] (II) config/udev: Adding input device (unnamed) (/dev/tty10)
[     4.111] (II) No input driver specified, ignoring this device.
[     4.111] (II) This device may have been added with another device file.
[     4.112] (II) config/udev: Adding input device (unnamed) (/dev/tty11)
[     4.112] (II) No input driver specified, ignoring this device.
[     4.112] (II) This device may have been added with another device file.
[     4.112] (II) config/udev: Adding input device (unnamed) (/dev/tty12)
[     4.112] (II) No input driver specified, ignoring this device.
[     4.112] (II) This device may have been added with another device file.
[     4.112] (II) config/udev: Adding input device (unnamed) (/dev/tty13)
[     4.112] (II) No input driver specified, ignoring this device.
[     4.112] (II) This device may have been added with another device file.
[     4.112] (II) config/udev: Adding input device (unnamed) (/dev/tty14)
[     4.112] (II) No input driver specified, ignoring this device.
[     4.112] (II) This device may have been added with another device file.
[     4.112] (II) config/udev: Adding input device (unnamed) (/dev/tty15)
[     4.112] (II) No input driver specified, ignoring this device.
[     4.112] (II) This device may have been added with another device file.
[     4.112] (II) config/udev: Adding input device (unnamed) (/dev/tty16)
[     4.112] (II) No input driver specified, ignoring this device.
[     4.112] (II) This device may have been added with another device file.
[     4.112] (II) config/udev: Adding input device (unnamed) (/dev/tty17)
[     4.112] (II) No input driver specified, ignoring this device.
[     4.112] (II) This device may have been added with another device file.
[     4.112] (II) config/udev: Adding input device (unnamed) (/dev/tty18)
[     4.113] (II) No input driver specified, ignoring this device.
[     4.113] (II) This device may have been added with another device file.
[     4.113] (II) config/udev: Adding input device (unnamed) (/dev/tty19)
[     4.113] (II) No input driver specified, ignoring this device.
[     4.113] (II) This device may have been added with another device file.
[     4.113] (II) config/udev: Adding input device (unnamed) (/dev/tty2)
[     4.113] (II) No input driver specified, ignoring this device.
[     4.113] (II) This device may have been added with another device file.
[     4.113] (II) config/udev: Adding input device (unnamed) (/dev/tty20)
[     4.113] (II) No input driver specified, ignoring this device.
[     4.113] (II) This device may have been added with another device file.
[     4.113] (II) config/udev: Adding input device (unnamed) (/dev/tty21)
[     4.113] (II) No input driver specified, ignoring this device.
[     4.113] (II) This device may have been added with another device file.
[     4.113] (II) config/udev: Adding input device (unnamed) (/dev/tty22)
[     4.113] (II) No input driver specified, ignoring this device.
[     4.113] (II) This device may have been added with another device file.
[     4.113] (II) config/udev: Adding input device (unnamed) (/dev/tty23)
[     4.113] (II) No input driver specified, ignoring this device.
[     4.113] (II) This device may have been added with another device file.
[     4.113] (II) config/udev: Adding input device (unnamed) (/dev/tty24)
[     4.113] (II) No input driver specified, ignoring this device.
[     4.113] (II) This device may have been added with another device file.
[     4.114] (II) config/udev: Adding input device (unnamed) (/dev/tty25)
[     4.114] (II) No input driver specified, ignoring this device.
[     4.114] (II) This device may have been added with another device file.
[     4.114] (II) config/udev: Adding input device (unnamed) (/dev/tty26)
[     4.114] (II) No input driver specified, ignoring this device.
[     4.114] (II) This device may have been added with another device file.
[     4.114] (II) config/udev: Adding input device (unnamed) (/dev/tty27)
[     4.114] (II) No input driver specified, ignoring this device.
[     4.114] (II) This device may have been added with another device file.
[     4.114] (II) config/udev: Adding input device (unnamed) (/dev/tty28)
[     4.114] (II) No input driver specified, ignoring this device.
[     4.114] (II) This device may have been added with another device file.
[     4.114] (II) config/udev: Adding input device (unnamed) (/dev/tty29)
[     4.114] (II) No input driver specified, ignoring this device.
[     4.114] (II) This device may have been added with another device file.
[     4.114] (II) config/udev: Adding input device (unnamed) (/dev/tty3)
[     4.114] (II) No input driver specified, ignoring this device.
[     4.114] (II) This device may have been added with another device file.
[     4.114] (II) config/udev: Adding input device (unnamed) (/dev/tty30)
[     4.114] (II) No input driver specified, ignoring this device.
[     4.114] (II) This device may have been added with another device file.
[     4.114] (II) config/udev: Adding input device (unnamed) (/dev/tty31)
[     4.114] (II) No input driver specified, ignoring this device.
[     4.114] (II) This device may have been added with another device file.
[     4.115] (II) config/udev: Adding input device (unnamed) (/dev/tty32)
[     4.115] (II) No input driver specified, ignoring this device.
[     4.115] (II) This device may have been added with another device file.
[     4.115] (II) config/udev: Adding input device (unnamed) (/dev/tty33)
[     4.115] (II) No input driver specified, ignoring this device.
[     4.115] (II) This device may have been added with another device file.
[     4.115] (II) config/udev: Adding input device (unnamed) (/dev/tty34)
[     4.115] (II) No input driver specified, ignoring this device.
[     4.115] (II) This device may have been added with another device file.
[     4.115] (II) config/udev: Adding input device (unnamed) (/dev/tty35)
[     4.115] (II) No input driver specified, ignoring this device.
[     4.115] (II) This device may have been added with another device file.
[     4.115] (II) config/udev: Adding input device (unnamed) (/dev/tty36)
[     4.115] (II) No input driver specified, ignoring this device.
[     4.115] (II) This device may have been added with another device file.
[     4.115] (II) config/udev: Adding input device (unnamed) (/dev/tty37)
[     4.115] (II) No input driver specified, ignoring this device.
[     4.115] (II) This device may have been added with another device file.
[     4.115] (II) config/udev: Adding input device (unnamed) (/dev/tty38)
[     4.115] (II) No input driver specified, ignoring this device.
[     4.115] (II) This device may have been added with another device file.
[     4.115] (II) config/udev: Adding input device (unnamed) (/dev/tty39)
[     4.115] (II) No input driver specified, ignoring this device.
[     4.115] (II) This device may have been added with another device file.
[     4.116] (II) config/udev: Adding input device (unnamed) (/dev/tty4)
[     4.116] (II) No input driver specified, ignoring this device.
[     4.116] (II) This device may have been added with another device file.
[     4.116] (II) config/udev: Adding input device (unnamed) (/dev/tty40)
[     4.116] (II) No input driver specified, ignoring this device.
[     4.116] (II) This device may have been added with another device file.
[     4.116] (II) config/udev: Adding input device (unnamed) (/dev/tty41)
[     4.116] (II) No input driver specified, ignoring this device.
[     4.116] (II) This device may have been added with another device file.
[     4.116] (II) config/udev: Adding input device (unnamed) (/dev/tty42)
[     4.116] (II) No input driver specified, ignoring this device.
[     4.116] (II) This device may have been added with another device file.
[     4.116] (II) config/udev: Adding input device (unnamed) (/dev/tty43)
[     4.116] (II) No input driver specified, ignoring this device.
[     4.116] (II) This device may have been added with another device file.
[     4.116] (II) config/udev: Adding input device (unnamed) (/dev/tty44)
[     4.116] (II) No input driver specified, ignoring this device.
[     4.116] (II) This device may have been added with another device file.
[     4.116] (II) config/udev: Adding input device (unnamed) (/dev/tty45)
[     4.116] (II) No input driver specified, ignoring this device.
[     4.116] (II) This device may have been added with another device file.
[     4.117] (II) config/udev: Adding input device (unnamed) (/dev/tty46)
[     4.117] (II) No input driver specified, ignoring this device.
[     4.117] (II) This device may have been added with another device file.
[     4.117] (II) config/udev: Adding input device (unnamed) (/dev/tty47)
[     4.117] (II) No input driver specified, ignoring this device.
[     4.117] (II) This device may have been added with another device file.
[     4.117] (II) config/udev: Adding input device (unnamed) (/dev/tty48)
[     4.117] (II) No input driver specified, ignoring this device.
[     4.117] (II) This device may have been added with another device file.
[     4.117] (II) config/udev: Adding input device (unnamed) (/dev/tty49)
[     4.117] (II) No input driver specified, ignoring this device.
[     4.117] (II) This device may have been added with another device file.
[     4.117] (II) config/udev: Adding input device (unnamed) (/dev/tty5)
[     4.117] (II) No input driver specified, ignoring this device.
[     4.117] (II) This device may have been added with another device file.
[     4.117] (II) config/udev: Adding input device (unnamed) (/dev/tty50)
[     4.117] (II) No input driver specified, ignoring this device.
[     4.117] (II) This device may have been added with another device file.
[     4.117] (II) config/udev: Adding input device (unnamed) (/dev/tty51)
[     4.117] (II) No input driver specified, ignoring this device.
[     4.117] (II) This device may have been added with another device file.
[     4.117] (II) config/udev: Adding input device (unnamed) (/dev/tty52)
[     4.117] (II) No input driver specified, ignoring this device.
[     4.117] (II) This device may have been added with another device file.
[     4.118] (II) config/udev: Adding input device (unnamed) (/dev/tty53)
[     4.118] (II) No input driver specified, ignoring this device.
[     4.118] (II) This device may have been added with another device file.
[     4.118] (II) config/udev: Adding input device (unnamed) (/dev/tty54)
[     4.118] (II) No input driver specified, ignoring this device.
[     4.118] (II) This device may have been added with another device file.
[     4.118] (II) config/udev: Adding input device (unnamed) (/dev/tty55)
[     4.118] (II) No input driver specified, ignoring this device.
[     4.118] (II) This device may have been added with another device file.
[     4.118] (II) config/udev: Adding input device (unnamed) (/dev/tty56)
[     4.118] (II) No input driver specified, ignoring this device.
[     4.118] (II) This device may have been added with another device file.
[     4.118] (II) config/udev: Adding input device (unnamed) (/dev/tty57)
[     4.118] (II) No input driver specified, ignoring this device.
[     4.118] (II) This device may have been added with another device file.
[     4.118] (II) config/udev: Adding input device (unnamed) (/dev/tty58)
[     4.118] (II) No input driver specified, ignoring this device.
[     4.118] (II) This device may have been added with another device file.
[     4.118] (II) config/udev: Adding input device (unnamed) (/dev/tty59)
[     4.118] (II) No input driver specified, ignoring this device.
[     4.118] (II) This device may have been added with another device file.
[     4.118] (II) config/udev: Adding input device (unnamed) (/dev/tty6)
[     4.118] (II) No input driver specified, ignoring this device.
[     4.118] (II) This device may have been added with another device file.
[     4.119] (II) config/udev: Adding input device (unnamed) (/dev/tty60)
[     4.119] (II) No input driver specified, ignoring this device.
[     4.119] (II) This device may have been added with another device file.
[     4.119] (II) config/udev: Adding input device (unnamed) (/dev/tty61)
[     4.119] (II) No input driver specified, ignoring this device.
[     4.119] (II) This device may have been added with another device file.
[     4.119] (II) config/udev: Adding input device (unnamed) (/dev/tty62)
[     4.119] (II) No input driver specified, ignoring this device.
[     4.119] (II) This device may have been added with another device file.
[     4.119] (II) config/udev: Adding input device (unnamed) (/dev/tty63)
[     4.119] (II) No input driver specified, ignoring this device.
[     4.119] (II) This device may have been added with another device file.
[     4.119] (II) config/udev: Adding input device (unnamed) (/dev/tty7)
[     4.119] (II) No input driver specified, ignoring this device.
[     4.119] (II) This device may have been added with another device file.
[     4.119] (II) config/udev: Adding input device (unnamed) (/dev/tty8)
[     4.119] (II) No input driver specified, ignoring this device.
[     4.119] (II) This device may have been added with another device file.
[     4.119] (II) config/udev: Adding input device (unnamed) (/dev/tty9)
[     4.119] (II) No input driver specified, ignoring this device.
[     4.119] (II) This device may have been added with another device file.
[     9.319] (II) modeset(0): EDID vendor "LGD", prod id 1068
[     9.319] (II) modeset(0): Printing DDC gathered Modelines:
[     9.319] (II) modeset(0): Modeline "1920x1080"x0.0  138.70  1920 1968 2000 2080  1080 1083 1088 1111 -hsync -vsync (66.7 kHz eP)
[     9.724] (II) event2  - (II) ETPS/2 Elantech Touchpad: (II) device removed
[     9.955] (II) modeset(0): EDID vendor "LGD", prod id 1068
[     9.955] (II) modeset(0): Printing DDC gathered Modelines:
[     9.955] (II) modeset(0): Modeline "1920x1080"x0.0  138.70  1920 1968 2000 2080  1080 1083 1088 1111 -hsync -vsync (66.7 kHz eP)
[   192.751] (II) event1  - (II) Logitech M705: (II) Enabling spurious button debouncing, see https://wayland.freedesktop.org/libinput/doc/1.9.4/button_debouncing.html for details

____________________________________________

*** /usr/share/X11/xorg.conf.d/10-amdgpu.conf
*** ls: -rw-r--r-- 1 root root 92 2017-09-29 00:17:42.000000000 +0300 /usr/share/X11/xorg.conf.d/10-amdgpu.conf
Section "OutputClass"
	Identifier "AMDgpu"
	MatchDriver "amdgpu"
	Driver "amdgpu"
EndSection
____________________________________________

*** /usr/share/X11/xorg.conf.d/10-quirks.conf
*** ls: -rw-r--r-- 1 root root 1350 2018-01-18 14:11:18.000000000 +0200 /usr/share/X11/xorg.conf.d/10-quirks.conf
# Collection of quirks and blacklist/whitelists for specific devices.

# Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable
# http://bugs.freedesktop.org/show_bug.cgi?id=22442 
Section "InputClass"
        Identifier "ThinkPad HDAPS accelerometer blacklist"
        MatchProduct "ThinkPad HDAPS accelerometer data"
        Option "Ignore" "on"
EndSection

# https://bugzilla.redhat.com/show_bug.cgi?id=523914
# Mouse does not move in PV Xen guest
# Explicitly tell evdev to not ignore the absolute axes.
Section "InputClass"
        Identifier "Xen Virtual Pointer axis blacklist"
        MatchProduct "Xen Virtual Pointer"
        Option "IgnoreAbsoluteAxes" "off"
        Option "IgnoreRelativeAxes" "off"
EndSection

# https://bugs.freedesktop.org/show_bug.cgi?id=55867
# Bug 55867 - Doesn't know how to tag XI_TRACKBALL
Section "InputClass"
        Identifier "Tag trackballs as XI_TRACKBALL"
        MatchProduct "trackball"
        MatchDriver "evdev"
        Option "TypeName" "TRACKBALL"
EndSection

# https://bugs.freedesktop.org/show_bug.cgi?id=62831
# Bug 62831 - Mionix Naos 5000 mouse detected incorrectly
Section "InputClass"
        Identifier "Tag Mionix Naos 5000 mouse XI_MOUSE"
        MatchProduct "La-VIEW Technology Naos 5000 Mouse"
        MatchDriver "evdev"
        Option "TypeName" "MOUSE"
EndSection

____________________________________________

*** /usr/share/X11/xorg.conf.d/10-radeon.conf
*** ls: -rw-r--r-- 1 root root 92 2017-09-21 15:48:45.000000000 +0300 /usr/share/X11/xorg.conf.d/10-radeon.conf
Section "OutputClass"
	Identifier "Radeon"
	MatchDriver "radeon"
	Driver "radeon"
EndSection
____________________________________________

*** /usr/share/X11/xorg.conf.d/40-libinput.conf
*** ls: -rw-r--r-- 1 root root 945 2017-09-23 14:47:01.000000000 +0300 /usr/share/X11/xorg.conf.d/40-libinput.conf
# Match on all types of devices but joysticks
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

____________________________________________

*** /usr/share/X11/xorg.conf.d/70-wacom.conf
*** ls: -rw-r--r-- 1 root root 2747 2017-06-26 10:03:04.000000000 +0300 /usr/share/X11/xorg.conf.d/70-wacom.conf
# Some of the below input classes appear 3x times, once for each of
# "tablet", "touchscreen", and "touchpad" to ensure that the Wacom
# driver is not accidentally bound to other types of hardware that

Mapping these temporary files with PROT_EXEC is intentional. The driver is trying to generate optimized code to speed up applications. It is designed to fall back gracefully to slower code if these mmap calls fail. If you want to avoid generating the AVC denial message when that happens, you can tell the driver to disable these optimizations by setting __GL_WRITE_TEXT_SECTION=0 in the environment. This is documented in the README here:
[url]Chapter 11. Specifying OpenGL Environment Variable Settings

You’re right that “$HOME.nv” is a string concatenation bug. It’s supposed to be “$HOME/.nv”. Normally this isn’t a problem because this code normally uses /tmp, but as you noted, if /tmp doesn’t work, it’ll try to fall back to this incorrectly concatenated path.

I looked through the code and I think I’ve identified the code responsible for this. I filed bug 2053070 to track fixing this.

Thank you for your informative answer!

Is the tracking for this bug available somewhere in public? Or the fact that this bug is fixed will be mentioned in this topic?

Sorry for double-posting, but after the fix, these files are going to be expected to be written into $HOME/.nv/, not in these deeper $HOME/.nv/GLCache/*/ sub-directories, as I see other files already are?

I’m deducing this from the fact that /home/vincas.nv/.gl* files that there created, just wanting to make sure.

Thanks!

The bug tracker is not public, sorry.

I’ll try to make sure there’s an entry in the changelog for this when it’s fixed.

You’re correct that after this change, the files should go into $HOME/.nv/.gl*. The driver will still try to mmap them there, so if that fails it’ll still fall back to the unoptimized code. These files should be deleted as soon as the driver is done with them. Are you seeing them persist after the mmap call is blocked?

I’ll update Debian bug report accordingly then that time comes.

No, it’s fine, I see no leftover files in /tmp/ nor in $HOME.nv directory even after mmap is denied.

I just want to make sure how to prepare AppArmor policy for upcomming NVIDIA driver fix.

Thanks!

I have one other question. Can we control where the temporary files are made because then we can tell McAfee to trust that directory. Trusting /tmp is out of the question.

Are there plans to provide such a capability?l


Regards,
Sandra Carney

We are having similar issues with McAfee Solidifier.

I tried setting __GL_WRITE_TEXT_SECTION to 0 in the environment. The problem still persists. Is there some other environment variable I need to set along with __GL_WRITE_TEXT_SECTION?

BTW, we are using v390.48 of the nvidia drivers on our system.

From a quick skim of the code, it will try $TMPDIR first, then /tmp, then $XDG_CACHE_HOME, then $HOME.

So in addition to setting __GL_WRITE_TEXT_SECTION to 0, should I unset these other variables. How do I stop it from trying to create the optimization files which results in messages such as:

McAfee Solidifier[1472]: McAfee Solidifier prevented unauthorized execution of '/tmp/.glywiV9U' by process ...

I also looked at the readme and it discussed setting the __GL_SELINUX_BOOLEANS which are supposed to be respected by NVidia regardless of whether SELinux is enforcing or permissive. On our system SELinux is disabled. I went ahead and set them to:

__GL_SELINUX_BOOLEANS="allow_execmem=false,deny_execmem=true"

No can do. Nvidia is still creating and trying to run these binary files. Do we have to have SELinux enabled regardless of whether it is permissive or enforcing for this environment variable to count?

I went ahead and enabled SELinux and put it to permissive mode – after turning off solidifier. Then I turned it back on and rebooted. I verified that the__GL_SELINUX_BOOLEANS are in the enviroment. I even cat’ed /proc/<pid_of_offending_program>/environment and verified both __GL_SELINUX_BOOLEANS and __GL_WRITE_TEXT_SECTION is set in its environment.

Still NVidia is trying to write these files. It doesn’t hurt anything. It is just that the messages are flooding our logs and we have to explain why these messages don’t indicate something bad going on.

I would be nicer if it would try that $HOME/.nv/ path first, then $HOME (or these custom TMPDIR/CACHE_HOME/whatever) and only in the worst case scenario - global temp.

It is really not assuring to write AppArmor allow rule to allow it writing into /tmp as it seems it tries there fist… Of course, it could be denied (silenced) but that would not be needed at all if these caches would be attempted to be stored in $HOME/.nv/ directory, where proper MAC system should really allow to write to.

I already discussed allowing ${HOME}/.nv as a trusted directory but our security expert said that leaves you open to an ‘escalation of privilege’ attack. So no trusted directories for us.

Yes, sure, but that’s still better path compared to /tmp that all system users can write to.

So if NVIDIA driver would try /.nv first, it would be a little better… manageable.

True enough.