From: Didier S. <di...@sl...> - 2017-05-25 10:33:23
|
Hi, Le 23/05/2017 à 15:20, Araki Ken a écrit : > From: Didier Spaier <di...@sl...> >> As expected setting KBD_INPUT_NUM a to a non-existent <num> throws an >> error: >> ERROR(No such file or directory): Couldn't open /dev/input/event<num> >> but in many cases doesn't prevent the keyboard to work. I am still >> puzzled. I had a look to uitoolkit/fb/ui_display_linux.c, alas I am not a >> developer and don't understand what I read. >> >> 2) thest after having plugged off, then on the optical mouse and plugged >> in an external USB keyboard. > > mlterm-fb reads stdin instead of /dev/input/event* if opening /dev/input/event* > fails or KBD_INPUT_NUM=-1. > The mode of reading stdin disables mlterm-fb to distinguish modifier keys etc, > so mlterm-fb prefers /dev/input/event* to stdin. > > BTW, I'm sorry but I doesn't hit upon the reason why nothing comes from /dev/input/event0. It seems that I get a permission denied. I ran this with KBD_INPUT_NAME unset: strace -o strace.log mlterm-fb --logseq=true. This time I got the keyboard working! I dn't know if that can give some clue to investigate, but I have the vague idea that using strace prevented mlterm-fb to send "something" to the tty that somehow would "trap" the output. I also saw that if I just type: strace mlterm-fb and then killall either strace or mlterm-fb from another tty, I can't get display of input back (although input works) even after "setterm --reset". Anyway: didier[~/.mlterm]$ cat msg.log May 25 11:39:17[6665] ERROR(Permission denied): Couldn't open /dev/input/event0. May 25 11:39:17[6665] ERROR(Permission denied): Couldn't open /dev/input/event11. May 25 11:39:17[6665] ERROR(Permission denied): Couldn't open /dev/input/mice. May 25 11:39:17[6665] ERROR(Permission denied): Couldn't open /dev/input/mouse0. May 25 12:00:19[7075] ERROR(Permission denied): Couldn't open /dev/input/event0. May 25 12:00:19[7075] ERROR(Permission denied): Couldn't open /dev/input/event11. May 25 12:00:19[7075] ERROR(Permission denied): Couldn't open /dev/input/mice. May 25 12:00:19[7075] ERROR(Permission denied): Couldn't open /dev/input/mouse0. May 25 12:01:40[7137] ERROR(Permission denied): Couldn't open /dev/input/event0. May 25 12:01:40[7137] ERROR(Permission denied): Couldn't open /dev/input/event11. May 25 12:01:40[7137] ERROR(Permission denied): Couldn't open /dev/input/mice. May 25 12:01:40[7137] ERROR(Permission denied): Couldn't open /dev/input/mouse0. didier[~/.mlterm]$ didier[~/.mlterm]$ cat pts_0.log didier[~/.mlterm]$ ls aafont aafont.bak bad challenge color font font-fb font-fb.bak key main msg.log pts_0.log strace.log taafont termcap tfont vaafont vfont xim didier[~/.mlterm]$ exit didier[~/.mlterm]$ (I just typed "ls" while in mlterm-fb so this output was expected) as strace.log is big I uploaded it here: http://slint.fr/testing/mlterm/strace.log Incidentally: didier[~/.mlterm]$ grep ENOENT strace.log access("/etc/suid-debug", F_OK) = -1 ENOENT (No such file or directory) access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/usr/local/lib/tls/x86_64/libmlterm_coreotl.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/local/lib/tls/x86_64", 0x7ffedbd1f130) = -1 ENOENT (No such file or directory) open("/usr/local/lib/tls/libmlterm_coreotl.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/local/lib/tls", 0x7ffedbd1f130) = -1 ENOENT (No such file or directory) open("/usr/local/lib/x86_64/libmlterm_coreotl.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/local/lib/x86_64", 0x7ffedbd1f130) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libmlterm_coreotl.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libpobl.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libmef.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libutempter.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libutil.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libfontconfig.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libharfbuzz.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libglib-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libfreetype.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libbz2.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libpng16.so.16", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libz.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libexpat.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/lib64/locale/locale-archive", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/home/didier/.config/mlterm", 0x7ffedbd1f700) = -1 ENOENT (No such file or directory) stat("/home/didier/.config/mlterm", 0x7ffedbd1f6b0) = -1 ENOENT (No such file or directory) stat("/home/didier/.config/mlterm", 0x7ffedbd1f680) = -1 ENOENT (No such file or directory) stat("/home/didier/.config/mlterm", 0x7ffedbd1f580) = -1 ENOENT (No such file or directory) stat("/home/didier/.config/mlterm", 0x7ffedbd1f660) = -1 ENOENT (No such file or directory) stat("/home/didier/.config/mlterm", 0x7ffedbd1f660) = -1 ENOENT (No such file or directory) open("/sys/class/input/input2/name", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/home/didier/.config/mlterm", 0x7ffedbd1f790) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libfribidi.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) connect(5, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) connect(5, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libnsl.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/home/didier/.config/mlterm", 0x7ffedbd1f6e0) = -1 ENOENT (No such file or directory) didier[~/.mlterm]$ This raise some questions: 1) I built mlterm-fb with this configure option --libdir=/usr/lib64 Would it be possible and advisable to give this information as a run-time option or a parameter to mlterm? I ask because maybe that would avoid some useless calls (even if maybe not that costly). 2) I didn't see mentioned ~/.config/mlterm in the docs, only ~/.mlterm What is that for? Maybe I missed something. >> Issue #2: >> >> If I start mlterm-fb say from /dev/tty2 then switch to an X display with >> Ctrl+Alt+F7, the Xserver having been started on /dev/tty1 for instance, >> this result in mlterm using 100% of one of my 4 CPU cores. >> >> As son as I switch back to /dev/pts/2 (whre mlter-fb is running) this >> percentage decreases to a (expected) very low value as expected. But I >> for instance I switch to /dev/tty3, the CPU% increases again and if >> htop is running in /dev/pts/2 artefacts from the display in /dev/pts/2 >> appear in /dev/tty3. I have no idea why. >> >> Issue #3 >> >> I observed that using the 'dialog' program in mlterm, if used without the >> "--colors=false" options triggers errors shown in the attached file >> debuglog, altough the output seems OK. This occurs under X as well as in >> a framebuffer. >> >> I attach also the displayed dialog (under X) and two output of the ANSI >> sequences displaying it, one in raw and the other in ttyrec formats, both >> in a framebuffer. The displayed dialog is the same under X or in a >> framebuffer. > > Thanks, please test an attached patch (which has been already committed to hg head) > It will fix these problem. Yes it did fix them, thanks! regards, Didier |