Bug#788498: udev: breaks the keyboard configuration

2015-06-29 Thread Vincent Lefevre
On 2015-06-19 21:53:31 +0200, Sven Arvidsson wrote:
 While looking into this I also discovered that there is finally a way
 to get sane settings by setting 
 /sys/module/hid_apple/parameters/iso_layout to 0.

Thanks. I confirm that this is working.

 It's still handy to use udev to assign a dedicated insert key though,

Yes.

 so maybe a note in NEWS so it's picked up by apt-listchanges?

-- 
Vincent Lefèvre vinc...@vinc17.net - Web: https://www.vinc17.net/
100% accessible validated (X)HTML - Blog: https://www.vinc17.net/blog/
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#788498: udev: breaks the keyboard configuration

2015-06-19 Thread Sven Arvidsson
Hi,

I was bitten by the same problem, and I'm using the same keyboard. 

While looking into this I also discovered that there is finally a way
to get sane settings by setting 
/sys/module/hid_apple/parameters/iso_layout to 0.

It's still handy to use udev to assign a dedicated insert key though,
so maybe a note in NEWS so it's picked up by apt-listchanges?

-- 
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 6FAB5CD5




signature.asc
Description: This is a digitally signed message part


Bug#788498: udev: breaks the keyboard configuration

2015-06-12 Thread Martin Pitt
Control: severity -1 normal
Control: tag -1 moreinfo

Hello Vincent,

Vincent Lefevre [2015-06-11 23:51 +0200]:
 Severity: grave
 Justification: renders package unusable

This bug is highly hardware specific and specific to local
configuration, so it does only affect very few people. It also does
not render udev completely useless, it just affects a few keys.

 According to /lib/udev/hwdb.d/60-keyboard.hwdb, it seems that the
 format has changed (though nothing has been announced!).

Right, keyboard: got changed to evdev: in 
https://github.com/systemd/systemd/commit/51c0c2869

 As I saw lines starting with evdev:input:b0003 in this file for
 USB devices, I tried:
 
 evdev:input:b0003v05ACp0221*
  KEYBOARD_KEY_70035=102nd   # Left to z: backslash bar
  KEYBOARD_KEY_70064=grave   # Left to 1: grave notsign
  KEYBOARD_KEY_70068=insert  # F13: Insert

Matching on the hardcoded bus ID 0003 seems unnecessary and it might
even be wrong. Please check lsusb/lspci if that keyboard is really on
the bus 3; But as this doesn't seem important, just try

   evdev:input:b*v05ACp0221*

instead? If that still does not work, can you please check cat
/sys/class/input/event1/device/modalias for the actual modalias of
that device? (Replace event1 with the actual keyboard) That's the one
that the rule above needs to match.

Thanks,

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#788498: udev: breaks the keyboard configuration

2015-06-12 Thread Vincent Lefevre
On 2015-06-12 13:11:45 +0200, Martin Pitt wrote:
 Vincent Lefevre [2015-06-11 23:51 +0200]:
  Severity: grave
  Justification: renders package unusable
 
 This bug is highly hardware specific and specific to local
 configuration, so it does only affect very few people. It also does
 not render udev completely useless, it just affects a few keys.

However, it might prevent the user from logging in if his password
has characters that are affected, and since what is typed is not
visible, this may be very confusing. I agree that this affects few
people, but this can have very bad consequences. Something should
be done to make sure that the user is aware of this change, early
enough if possible.

  evdev:input:b0003v05ACp0221*
   KEYBOARD_KEY_70035=102nd   # Left to z: backslash bar
   KEYBOARD_KEY_70064=grave   # Left to 1: grave notsign
   KEYBOARD_KEY_70068=insert  # F13: Insert
 
 Matching on the hardcoded bus ID 0003 seems unnecessary and it might
 even be wrong. Please check lsusb/lspci if that keyboard is really on
 the bus 3;

If it is not on bus ID 0003, this seems to be a documentation bug,
because /lib/udev/hwdb.d/60-keyboard.hwdb says:

#This matches on the kernel modalias of the input-device, mainly:
# is the bus-id (see /usr/include/linux/input.h BUS_*), ,  and
 

and /usr/include/linux/input.h contains:

#define BUS_PCI 0x01
#define BUS_ISAPNP  0x02
#define BUS_USB 0x03
#define BUS_HIL 0x04
#define BUS_BLUETOOTH   0x05
#define BUS_VIRTUAL 0x06

#define BUS_ISA 0x10
#define BUS_I8042   0x11
#define BUS_XTKBD   0x12
#define BUS_RS232   0x13
#define BUS_GAMEPORT0x14
#define BUS_PARPORT 0x15
#define BUS_AMIGA   0x16
#define BUS_ADB 0x17
#define BUS_I2C 0x18
#define BUS_HOST0x19
#define BUS_GSC 0x1A
#define BUS_ATARI   0x1B
#define BUS_SPI 0x1C

BTW, what about all the b0003 in /lib/udev/hwdb.d/60-keyboard.hwdb?

[The tests below are done with udev 215-18, as I had to revert.]

lsusb gives for the keyboard:

Bus 008 Device 003: ID 05ac:0221 Apple, Inc. Aluminum Keyboard (ISO)

Does this mean that it is on bus ID 0008? But see below.

 But as this doesn't seem important, just try
 
evdev:input:b*v05ACp0221*
 
 instead?

I am not in front of the machine, but I'll try tonight.

If this works, using a wildcard for b should be suggested by the
documentation.

 If that still does not work, can you please check cat
 /sys/class/input/event1/device/modalias for the actual modalias of
 that device? (Replace event1 with the actual keyboard) That's the one
 that the rule above needs to match.

xvii:~ cat /sys/class/input/event1/device/name
Apple, Inc Apple Keyboard
xvii:~ cat /sys/class/input/event1/device/modalias
input:b0003v05ACp0221e0111-e0,1,4,11,14,k71,72,73,74,75,77,78,79,7A,7B,7C,7D,7E,7F,80,81,82,83,84,85,86,87,88,89,8A,8C,8E,96,98,9E,9F,A1,A3,A4,A5,A6,AD,B0,B1,B2,B3,B4,B8,B9,BA,BB,BC,BD,BE,BF,C0,C1,C2,CC,E0,E1,E3,E4,E5,E6,F0,1D0,ram4,l0,1,2,3,4,sfw

So, it seems to be on bus ID 0003.

-- 
Vincent Lefèvre vinc...@vinc17.net - Web: https://www.vinc17.net/
100% accessible validated (X)HTML - Blog: https://www.vinc17.net/blog/
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#788498: udev: breaks the keyboard configuration

2015-06-12 Thread Martin Pitt
Hey Vincent,

Vincent Lefevre [2015-06-12 14:14 +0200]:
 BTW, what about all the b0003 in /lib/udev/hwdb.d/60-keyboard.hwdb?

These were confirmed to be USB devices. Anyway, you confirmed that
too, so the b0003 seems correct. It's just not always the case that
keyboards are wired through USB, so I wanted to check that.

 If this works, using a wildcard for b should be suggested by the
 documentation.

Unlikely then.

 xvii:~ cat /sys/class/input/event1/device/name
 Apple, Inc Apple Keyboard
 xvii:~ cat /sys/class/input/event1/device/modalias
 input:b0003v05ACp0221e0111-e0,1,4,11,14,k71,72,73,74,75,77,78,79,7A,7B,7C,7D,7E,7F,80,81,82,83,84,85,86,87,88,89,8A,8C,8E,96,98,9E,9F,A1,A3,A4,A5,A6,AD,B0,B1,B2,B3,B4,B8,B9,BA,BB,BC,BD,BE,BF,C0,C1,C2,CC,E0,E1,E3,E4,E5,E6,F0,1D0,ram4,l0,1,2,3,4,sfw

Hm, so this seems to match
  evdev:input:b0003v05ACp0221*

perfectly well. So, let's assume that the evdev: is correct, and check
the others:

Where did you put your own config? You already ran udevadm hwdb
--update, so that's not it.

If you run

   udevadm hwdb -t evdev:input:b0003v05ACp0221e0111-e0,1,4

do you get your KEYBOARD_KEY_* entries?

- If not: Something is wrong with your .hwdb file location or the --update

- If so: Please check udevadm info /dev/input/eventX
   and check if this has the KEYBOARD_KEY* properties.

Thanks,

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#788498: udev: breaks the keyboard configuration

2015-06-12 Thread Vincent Lefevre
Control: tags -1 - moreinfo
Control: clone -1 -2
Control: retitle -1 udev: the change of keyboard configuration system should be 
announced
Control: retitle -2 udev: udevadm trigger /dev/input/event* doesn't work

Hi Martin,

I've found the problem: the command

  udevadm trigger /dev/input/event*

mentioned in /lib/udev/hwdb.d/60-keyboard.hwdb, which is what I had
used, has no effect (it doesn't even output an error message).

So, as a summary, there are two issues:

1. The fact that the udev keyboard configuration system has changed
but nothing is announced. And if possible, a user who has changed a
keyboard configuration for an old udev (e.g. if there's a line starting
with keyboard: in some file of /etc/udev/hwdb.d) should be warned
before the upgrade takes place.

2. The udevadm trigger /dev/input/event* problem.

-- 
Vincent Lefèvre vinc...@vinc17.net - Web: https://www.vinc17.net/
100% accessible validated (X)HTML - Blog: https://www.vinc17.net/blog/
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#788498: udev: breaks the keyboard configuration

2015-06-11 Thread Vincent Lefevre
Package: udev
Version: 220-6
Severity: grave
Justification: renders package unusable

The udev upgrade from 215-18 to 220-6 breaks the keyboard configuration.
In my case, I have:

keyboard:usb:v05ACp0221*
 KEYBOARD_KEY_70035=102nd   # Left to z: backslash bar
 KEYBOARD_KEY_70064=grave   # Left to 1: grave notsign
 KEYBOARD_KEY_70068=insert  # F13: Insert

According to /lib/udev/hwdb.d/60-keyboard.hwdb, it seems that the
format has changed (though nothing has been announced!).

As I saw lines starting with evdev:input:b0003 in this file for
USB devices, I tried:

evdev:input:b0003v05ACp0221*
 KEYBOARD_KEY_70035=102nd   # Left to z: backslash bar
 KEYBOARD_KEY_70064=grave   # Left to 1: grave notsign
 KEYBOARD_KEY_70068=insert  # F13: Insert

and rebooted, but this configuration is still ignored.

FYI:

# udevadm info /dev/input/event1
P: 
/devices/pci:00/:00:1d.7/usb8/8-3/8-3.2/8-3.2:1.0/0003:05AC:0221.0003/input/input4/event1
N: input/event1
S: input/by-id/usb-Apple__Inc_Apple_Keyboard-event-kbd
S: input/by-path/pci-:00:1d.7-usb-0:3.2:1.0-event-kbd
E: BACKSPACE=guess
E: DEVLINKS=/dev/input/by-path/pci-:00:1d.7-usb-0:3.2:1.0-event-kbd 
/dev/input/by-id/usb-Apple__Inc_Apple_Keyboard-event-kbd
E: DEVNAME=/dev/input/event1
E: 
DEVPATH=/devices/pci:00/:00:1d.7/usb8/8-3/8-3.2/8-3.2:1.0/0003:05AC:0221.0003/input/input4/event1
E: ID_BUS=usb
E: ID_INPUT=1
E: ID_INPUT_KEY=1
E: ID_INPUT_KEYBOARD=1
E: ID_MODEL=Apple_Keyboard
E: ID_MODEL_ENC=Apple\x20Keyboard
E: ID_MODEL_ID=0221
E: ID_PATH=pci-:00:1d.7-usb-0:3.2:1.0
E: ID_PATH_TAG=pci-_00_1d_7-usb-0_3_2_1_0
E: ID_REVISION=0069
E: ID_SERIAL=Apple__Inc_Apple_Keyboard
E: ID_TYPE=hid
E: ID_USB_DRIVER=usbhid
E: ID_USB_INTERFACES=:030101:03:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=Apple__Inc
E: ID_VENDOR_ENC=Apple\x2c\x20Inc
E: ID_VENDOR_ID=05ac
E: MAJOR=13
E: MINOR=65
E: SUBSYSTEM=input
E: USEC_INITIALIZED=38973313
E: XKBLAYOUT=gb
E: XKBMODEL=pc105
E: XKBOPTIONS=lv3:ralt_switch

-- Package-specific info:

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages udev depends on:
ii  adduser3.113+nmu3
ii  debconf [debconf-2.0]  1.5.56
ii  libacl12.2.52-2
ii  libblkid1  2.26.2-6
ii  libc6  2.19-18
ii  libkmod2   20-1
ii  libselinux12.3-2
ii  libudev1   220-6
ii  lsb-base   4.1+Debian13+nmu1
ii  procps 2:3.3.9-9
ii  util-linux 2.26.2-6

udev recommends no packages.

udev suggests no packages.

-- debconf information:
  udev/reboot_needed:
  udev/sysfs_deprecated_incompatibility:
  udev/title/upgrade:
  udev/new_kernel_needed: false


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#788498: udev: breaks the keyboard configuration

2015-06-11 Thread Vincent Lefevre
On 2015-06-11 23:51:40 +0200, Vincent Lefevre wrote:
[...]
 and rebooted, but this configuration is still ignored.

After some thoughts, I may have forgotten to update the database
before rebooting, but after the reboot I did:

  udevadm hwdb --update
  udevadm trigger /dev/input/event*

as documented, and this didn't solve the problem.

-- 
Vincent Lefèvre vinc...@vinc17.net - Web: https://www.vinc17.net/
100% accessible validated (X)HTML - Blog: https://www.vinc17.net/blog/
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org