Project

General

Profile

Actions

Bug #1519

closed

Keyboard broken in xdm

Added by polachok over 14 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

If you start xdm with xdm_enable=YES in /etc/rc.conf keyboard won't work at all
(can't switch to console or anything). If you start xdm from user, it works.

Here's the relevant part of Xorg.0.log:
() Option "CoreKeyboard"
(
) Keyboard0: always reports core events
() Option "Protocol" "standard"
(
) Keyboard0: Protocol: standard
() Option "AutoRepeat" "500 30"
(
) Option "XkbRules" "xorg"
() Keyboard0: XkbRules: "xorg"
(
) Option "XkbModel" "pc105"
() Keyboard0: XkbModel: "pc105"
(
) Option "XkbLayout" "us,ru(winkeys)"
() Keyboard0: XkbLayout: "us,ru(winkeys)"
(
) Option "XkbOptions" "grp:caps_toggle,grp_led:scroll,compose:lwin"
() Keyboard0: XkbOptions: "grp:caps_toggle,grp_led:scroll,compose:lwin"
(
) Option "CustomKeycodes" "off"
(**) Keyboard0: CustomKeycodes disabled
(II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD)
(EE) KbdOn: tcsetattr: Bad file descriptor

Actions #1

Updated by polachok over 14 years ago

It looks like X tries to use /dev/ttyv1 which is occupied by getty:

1286 638 Xorg CALL open(0x8192903,O_RDWR,<unused>0xbfbffa38)
1287 638 Xorg NAMI "/dev/tty"
1288 638 Xorg RET open -1 errno 6 Device not configured
1289 638 Xorg CALL open(0x81927f0,O_RDWR|O_NONBLOCK,<unused>0)
1290 638 Xorg NAMI "/dev/ttyv0"
1291 638 Xorg RET open 5
1292 638 Xorg CALL ioctl(0x5,0xc0185671 ,0xbfbff9e0)
1293 638 Xorg RET ioctl -1 errno 25 Inappropriate ioctl for device
1294 638 Xorg CALL close(0x5)
1295 638 Xorg RET close 0
1296 638 Xorg CALL open(0x81927f0,O_RDWR|O_NONBLOCK,<unused>0)
1297 638 Xorg NAMI "/dev/ttyv0"
1298 638 Xorg RET open 5
1299 638 Xorg CALL ioctl(0x5,VT_GETMODE,0xbfbffa00)
1300 638 Xorg RET ioctl 0
1301 638 Xorg CALL ioctl(0x5,CONS_GETVERS,0xbfbffa08)
1302 638 Xorg RET ioctl 0
1303 638 Xorg CALL ioctl(0x5,VT_GETACTIVE,0x81b0a44)
1304 638 Xorg RET ioctl 0
1305 638 Xorg CALL ioctl(0x5,VT_OPENQRY,0x81b0d84)
1306 638 Xorg RET ioctl 0
1307 638 Xorg CALL close(0x5)
1308 638 Xorg RET close 0
1309 638 Xorg CALL open(0xbfbff9f4,O_RDWR|O_NONBLOCK,<unused>0)
1310 638 Xorg NAMI "/dev/ttyv1"
1311 638 Xorg RET open 5
1312 638 Xorg CALL ioctl(0x5,VT_GETMODE,0xbfbffa00)
...
12039 638 Xorg CALL ioctl(0x5,KDSETLED,0)
12040 638 Xorg RET ioctl -1 errno 9 Bad file descriptor
12041 638 Xorg CALL clock_gettime(0x4,0xbfbff6c0)
12042 638 Xorg RET clock_gettime 0
12043 638 Xorg CALL ioctl(0x5,KDGETLED,0xbfbff6c0)
12044 638 Xorg RET ioctl -1 errno 9 Bad file descriptor
12045 638 Xorg CALL ioctl(0x5,KDSETLED,0)
12046 638 Xorg RET ioctl -1 errno 9 Bad file descriptor
12047 638 Xorg CALL ioctl(0x5,KDSETRAD,0x20)
12048 638 Xorg RET ioctl -1 errno 9 Bad file descriptor
12049 638 Xorg CALL sigprocmask(SIG_BLOCK,0xbfbff800,0x81b98c0)
12050 638 Xorg RET sigprocmask 0
12051 638 Xorg CALL sigprocmask(SIG_SETMASK,0x81b98c0,0)
12052 638 Xorg RET sigprocmask 0
12053 638 Xorg CALL ioctl(0x5,TIOCSETA,0xbfbff6a0)
12054 638 Xorg RET ioctl -1 errno 9 Bad file descriptor
12055 638 Xorg CALL write(0x2,0x81b9d20,0x2b)
12056 638 Xorg GIO fd 2 wrote 43 bytes
12057 "(EE) KbdOn: tcsetattr: Bad file descriptor
12058 "
12059 638 Xorg RET write 43/0x2b
12060 638 Xorg CALL write(0,0x81b9d20,0x2b)
12061 638 Xorg GIO fd 0 wrote 43 bytes
12062 "(EE) KbdOn: tcsetattr: Bad file descriptor
12063 "
12064 638 Xorg RET write 43/0x2b
12065 638 Xorg CALL ioctl(0x5,KDSKBMODE,0)
12066 638 Xorg RET ioctl -1 errno 9 Bad file descriptor
12067 638 Xorg CALL ioctl(0x5,TIOCFLUSH,0xbfbff610)
12068 638 Xorg RET ioctl -1 errno 9 Bad file descriptor

Actions #2

Updated by phma almost 14 years ago

Same problem with kdm. This happened after leaving the computer up for about
56 days, not doing anything that would obviously mess with kdm or the
keyboard. It was working before.

Actions #3

Updated by polachok almost 14 years ago

phma:
I don't think your problem is related.
Mine was solved by using ttyv8 line in /etc/ttys instead of pkgsrc script, by the way.

Actions #4

Updated by phma almost 14 years ago

I started kdm from /etc/ttys instead of from /etc/rc.conf. That fixed it.
Presumably it's setting the keyboard of its own tty now.

Actions #5

Updated by martin1234 over 5 years ago

  • Description updated (diff)
Actions

Also available in: Atom PDF