LINUX.ORG.RU

USB->PS/2 и смена раскладки

 , ,


0

1

Прикупил сабж (планирую апгрейд железа, на новом - только юсб порты, клавиатуру ради этого менять смысла не вижу). Обнаружил, что отсохло переключение раскладок (индикация - жива), в конфиге и логах все кучеряво:

# setxkbmap -print -verbose 10
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     us,ru,ua
variant:    ,winkeys,winkeys
options:    grp:shifts_loggle,grp_led:scroll
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete+ledscroll(group_lock)
symbols:    pc+us+ru(winkeys):2+ua(winkeys):3+inet(evdev)
geometry:   pc(pc105)
xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete+ledscroll(group_lock)"	};
	xkb_symbols   { include "pc+us+ru(winkeys):2+ua(winkeys):3+inet(evdev)"	};
	xkb_geometry  { include "pc(pc105)"	};
};
[    72.032] (II) config/udev: Adding input device Barcode Reader  (/dev/input/event3)
[    72.032] (**) Barcode Reader : Applying InputClass "evdev keyboard catchall"
[    72.032] (**) Barcode Reader : Applying InputClass "system-keyboard"
[    72.032] (II) Using input driver 'evdev' for 'Barcode Reader '
[    72.032] (**) Barcode Reader : always reports core events
[    72.032] (**) evdev: Barcode Reader : Device: "/dev/input/event3"
[    72.032] (--) evdev: Barcode Reader : Vendor 0x13ba Product 0x18
[    72.032] (--) evdev: Barcode Reader : Found keys
[    72.032] (II) evdev: Barcode Reader : Configuring as keyboard
[    72.033] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:02.0/usb2/2-3/2-3:1.0/0003:13BA:0018.0001/input/input5/event3"
[    72.033] (II) XINPUT: Adding extended input device "Barcode Reader " (type: KEYBOARD, id 8)
[    72.033] (**) Option "xkb_rules" "evdev"
[    72.033] (**) Option "xkb_model" "pc105"
[    72.033] (**) Option "xkb_layout" "us,ru,ua"
[    72.033] (**) Option "xkb_variant" ",winkeys,winkeys"
[    72.033] (**) Option "xkb_options" "grp:shifts_loggle,grp_led:scroll"

Делаю

# setxkbmap -option "grp:shifts_toggle"
и все начинает работать.

# setxkbmap -print -verbose 10
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     us,ru,ua
variant:    ,winkeys,winkeys
options:    grp:shifts_toggle,grp:shifts_loggle,grp_led:scroll
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete+ledscroll(group_lock)
symbols:    pc+us+ru(winkeys):2+ua(winkeys):3+inet(evdev)+group(shifts_toggle)
geometry:   pc(pc105)
xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete+ledscroll(group_lock)"	};
	xkb_symbols   { include "pc+us+ru(winkeys):2+ua(winkeys):3+inet(evdev)+group(shifts_toggle)"	};
	xkb_geometry  { include "pc(pc105)"	};
};

Список девайсов:

⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
	Reporting 7 classes:
		Class originated from: 10. Type: XIButtonClass
		Buttons supported: 13
		Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" "Button Side" "Button Extra" "Button Unknown" "Button Unknown" "Button Unknown" "Button Unknown"
		Button state:
		Class originated from: 10. Type: XIValuatorClass
		Detail for Valuator 0:
		  Label: Rel X
		  Range: -1.000000 - -1.000000
		  Resolution: 1 units/m
		  Mode: relative
		Class originated from: 10. Type: XIValuatorClass
		Detail for Valuator 1:
		  Label: Rel Y
		  Range: -1.000000 - -1.000000
		  Resolution: 1 units/m
		  Mode: relative
		Class originated from: 10. Type: XIValuatorClass
		Detail for Valuator 2:
		  Label: Rel Horiz Wheel
		  Range: -1.000000 - -1.000000
		  Resolution: 1 units/m
		  Mode: relative
		Class originated from: 10. Type: XIValuatorClass
		Detail for Valuator 3:
		  Label: Rel Vert Wheel
		  Range: -1.000000 - -1.000000
		  Resolution: 1 units/m
		  Mode: relative
		Class originated from: 10. Type: XIScrollClass
		Scroll info for Valuator 2
		  type: 2 (horizontal)
		  increment: 1.000000
		  flags: 0x0
		Class originated from: 10. Type: XIScrollClass
		Scroll info for Valuator 3
		  type: 1 (vertical)
		  increment: -1.000000
		  flags: 0x2 ( preferred )

⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
	Reporting 3 classes:
		Class originated from: 4. Type: XIButtonClass
		Buttons supported: 10
		Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" None None None
		Button state:
		Class originated from: 4. Type: XIValuatorClass
		Detail for Valuator 0:
		  Label: Rel X
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative
		Class originated from: 4. Type: XIValuatorClass
		Detail for Valuator 1:
		  Label: Rel Y
		  Range: -1.000000 - -1.000000
		  Resolution: 0 units/m
		  Mode: relative

⎜   ↳ Barcode Reader                          	id=9	[slave  pointer  (2)]
	Reporting 8 classes:
		Class originated from: 9. Type: XIButtonClass
		Buttons supported: 13
		Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" "Button Side" "Button Extra" "Button Unknown" "Button Unknown" "Button Unknown" "Button Unknown"
		Button state:
		Class originated from: 9. Type: XIKeyClass
		Keycodes supported: 248
		Class originated from: 9. Type: XIValuatorClass
		Detail for Valuator 0:
		  Label: Rel X
		  Range: -1.000000 - -1.000000
		  Resolution: 1 units/m
		  Mode: relative
		Class originated from: 9. Type: XIValuatorClass
		Detail for Valuator 1:
		  Label: Rel Y
		  Range: -1.000000 - -1.000000
		  Resolution: 1 units/m
		  Mode: relative
		Class originated from: 9. Type: XIValuatorClass
		Detail for Valuator 2:
		  Label: Rel Horiz Wheel
		  Range: -1.000000 - -1.000000
		  Resolution: 1 units/m
		  Mode: relative
		Class originated from: 9. Type: XIValuatorClass
		Detail for Valuator 3:
		  Label: Rel Vert Wheel
		  Range: -1.000000 - -1.000000
		  Resolution: 1 units/m
		  Mode: relative
		Class originated from: 9. Type: XIScrollClass
		Scroll info for Valuator 2
		  type: 2 (horizontal)
		  increment: 1.000000
		  flags: 0x0
		Class originated from: 9. Type: XIScrollClass
		Scroll info for Valuator 3
		  type: 1 (vertical)
		  increment: -1.000000
		  flags: 0x2 ( preferred )

⎜   ↳ ImExPS/2 Generic Explorer Mouse         	id=10	[slave  pointer  (2)]
	Reporting 7 classes:
		Class originated from: 10. Type: XIButtonClass
		Buttons supported: 13
		Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" "Button Side" "Button Extra" "Button Unknown" "Button Unknown" "Button Unknown" "Button Unknown"
		Button state:
		Class originated from: 10. Type: XIValuatorClass
		Detail for Valuator 0:
		  Label: Rel X
		  Range: -1.000000 - -1.000000
		  Resolution: 1 units/m
		  Mode: relative
		Class originated from: 10. Type: XIValuatorClass
		Detail for Valuator 1:
		  Label: Rel Y
		  Range: -1.000000 - -1.000000
		  Resolution: 1 units/m
		  Mode: relative
		Class originated from: 10. Type: XIValuatorClass
		Detail for Valuator 2:
		  Label: Rel Horiz Wheel
		  Range: -1.000000 - -1.000000
		  Resolution: 1 units/m
		  Mode: relative
		Class originated from: 10. Type: XIValuatorClass
		Detail for Valuator 3:
		  Label: Rel Vert Wheel
		  Range: -1.000000 - -1.000000
		  Resolution: 1 units/m
		  Mode: relative
		Class originated from: 10. Type: XIScrollClass
		Scroll info for Valuator 2
		  type: 2 (horizontal)
		  increment: 1.000000
		  flags: 0x0
		Class originated from: 10. Type: XIScrollClass
		Scroll info for Valuator 3
		  type: 1 (vertical)
		  increment: -1.000000
		  flags: 0x2 ( preferred )

⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
	Reporting 1 classes:
		Class originated from: 8. Type: XIKeyClass
		Keycodes supported: 248

    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
	Reporting 1 classes:
		Class originated from: 5. Type: XIKeyClass
		Keycodes supported: 248

    ↳ Power Button                            	id=6	[slave  keyboard (3)]
	Reporting 1 classes:
		Class originated from: 6. Type: XIKeyClass
		Keycodes supported: 248

    ↳ Power Button                            	id=7	[slave  keyboard (3)]
	Reporting 1 classes:
		Class originated from: 7. Type: XIKeyClass
		Keycodes supported: 248

    ↳ Barcode Reader                          	id=8	[slave  keyboard (3)]
	Reporting 1 classes:
		Class originated from: 8. Type: XIKeyClass
		Keycodes supported: 248

Вопрос: как заставить работать переключение раскладки? Кроме добавления строки в .xsessionrc?

Добавление еще одного grp:shifts_toggle проблему не решает, при удалении опций переключения и установлке из консоли через setxkbmap - все снова работает, список опций идентичен первому листингу.

★★★★★

переходник, с переключалкой и всё, больше ничего не понадобится.

anonymous
()
Ответ на: Из твоего же лога от mamboo

опечатка, сорри (уже после экспериментов запостил).

изначально - переключалка работала. переткнул клаву в юсб переходник - переключалка отсохла.

проверю еще раз...

NiTr0 ★★★★★
() автор топика
Ответ на: Из твоего же лога от mamboo

Хм, таки да, опечатка там всю жизнь жила. Поправил - все заколосилось.

Тогда возникает вопрос - как же переключалка до того работала-то, при PS/2 подключении?....

NiTr0 ★★★★★
() автор топика
Последнее исправление: NiTr0 (всего исправлений: 1)
Ответ на: комментарий от NiTr0

Тогда возникает вопрос - как же переключалка до того работала-то

отсохло переключение раскладок (индикация - жива)

1. А индикатор не мог быть еще и переключатором? Или индикация - это grp_led:scroll?

2. Давным-давно прописанное невесть в каком конфиге setxkbmap -option "grp:shifts_toggle", которое срабатывало.

Короче, тебе виднее, что и где ты менял последнее время.

mamboo ★★
()
Ответ на: комментарий от mamboo

1. индикация скроллом (+ гуевый индикатор внизу), переключение - двумя шифтами.

2. поискал по /etc - ничего не нашел кроме ошметка давно выпиленного hal.

Прикол-то весь в том, что отсохло с переключением клавы с ps/2 в юсб...

NiTr0 ★★★★★
() автор топика
Ответ на: комментарий от NiTr0

+ гуевый индикатор внизу

Вот на него я и намекал.

Кроме /etc еще можно в ~/ поискать.

mamboo ★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.