PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > [Fwd: Re: Since chvt works, the problem must be the keymap]
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

[Fwd: Re: Since chvt works, the problem must be the keymap]

Réponse
 
LinkBack Outils de la discussion
Vieux 30/04/2007, 00h30   #1
David Claughton
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut [Fwd: Re: Since chvt works, the problem must be the keymap]

Florian Kulzer wrote:
>
> It would be interesting to see which keycodes and keysyms are reported
> if you run "xev", press (and hold) both CTRL and ALT, and then press F1,
> F2, etc. Does xev really display the keycodes for the Fn keys and the
> keysyms "XF86_Switch_VT_n"? Are the hexadecimal keysym values the same
> as the ones that you get with "grep VT /usr/share/X11/XKeysymDB"?
>


As another "sufferer" of this problem I thought I would give this a try
- I get ...

KeyPress event, serial 29, synthetic NO, window 0x2600001,
root 0x3e, subw 0x0, time 1066810844, (622,696), root630,759),
state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 29, synthetic NO, window 0x2600001,
root 0x3e, subw 0x0, time 1066810861, (622,696), root630,759),
state 0x14, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 29, synthetic NO, window 0x2600001,
root 0x3e, subw 0x0, time 1066815357, (622,696), root630,759),
state 0x1c, keycode 67 (keysym 0xffbe, F1), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 29, synthetic NO, window 0x2600001,
root 0x3e, subw 0x0, time 1066815411, (622,696), root630,759),
state 0x1c, keycode 67 (keysym 0xffbe, F1), same_screen YES,
XLookupString gives 0 bytes:

KeyRelease event, serial 29, synthetic NO, window 0x2600001,
root 0x3e, subw 0x0, time 1066816162, (622,696), root630,759),
state 0x1c, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:

KeyRelease event, serial 29, synthetic NO, window 0x2600001,
root 0x3e, subw 0x0, time 1066816188, (622,696), root630,759),
state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:

And "grep VT /usr/share/X11/XKeysymDB" returns :

XF86_Switch_VT_1 :1008FE01
XF86_Switch_VT_2 :1008FE02
XF86_Switch_VT_3 :1008FE03
XF86_Switch_VT_4 :1008FE04
XF86_Switch_VT_5 :1008FE05
XF86_Switch_VT_6 :1008FE06
XF86_Switch_VT_7 :1008FE07
XF86_Switch_VT_8 :1008FE08
XF86_Switch_VT_9 :1008FE09
XF86_Switch_VT_10 :1008FE0A
XF86_Switch_VT_11 :1008FE0B
XF86_Switch_VT_12 :1008FE0C

Does this tell anyone anything?

Dave.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 30/04/2007, 01h10   #2
David Claughton
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Since chvt works, the problem must be the keymap

David Claughton wrote:
> Florian Kulzer wrote:
>>
>> It would be interesting to see which keycodes and keysyms are reported
>> if you run "xev", press (and hold) both CTRL and ALT, and then press F1,
>> F2, etc. Does xev really display the keycodes for the Fn keys and the
>> keysyms "XF86_Switch_VT_n"? Are the hexadecimal keysym values the same
>> as the ones that you get with "grep VT /usr/share/X11/XKeysymDB"?
>>

>
> As another "sufferer" of this problem I thought I would give this a try
> - I get ...
>
> KeyPress event, serial 29, synthetic NO, window 0x2600001,
> root 0x3e, subw 0x0, time 1066810844, (622,696), root630,759),
> state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
> XLookupString gives 0 bytes:
> XmbLookupString gives 0 bytes:
> XFilterEvent returns: False
>
> KeyPress event, serial 29, synthetic NO, window 0x2600001,
> root 0x3e, subw 0x0, time 1066810861, (622,696), root630,759),
> state 0x14, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
> XLookupString gives 0 bytes:
> XmbLookupString gives 0 bytes:
> XFilterEvent returns: False
>
> KeyPress event, serial 29, synthetic NO, window 0x2600001,
> root 0x3e, subw 0x0, time 1066815357, (622,696), root630,759),
> state 0x1c, keycode 67 (keysym 0xffbe, F1), same_screen YES,
> XLookupString gives 0 bytes:
> XmbLookupString gives 0 bytes:
> XFilterEvent returns: False
>
> KeyRelease event, serial 29, synthetic NO, window 0x2600001,
> root 0x3e, subw 0x0, time 1066815411, (622,696), root630,759),
> state 0x1c, keycode 67 (keysym 0xffbe, F1), same_screen YES,
> XLookupString gives 0 bytes:
>
> KeyRelease event, serial 29, synthetic NO, window 0x2600001,
> root 0x3e, subw 0x0, time 1066816162, (622,696), root630,759),
> state 0x1c, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
> XLookupString gives 0 bytes:
>
> KeyRelease event, serial 29, synthetic NO, window 0x2600001,
> root 0x3e, subw 0x0, time 1066816188, (622,696), root630,759),
> state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
> XLookupString gives 0 bytes:
>
> And "grep VT /usr/share/X11/XKeysymDB" returns :
>
> XF86_Switch_VT_1 :1008FE01
> XF86_Switch_VT_2 :1008FE02
> XF86_Switch_VT_3 :1008FE03
> XF86_Switch_VT_4 :1008FE04
> XF86_Switch_VT_5 :1008FE05
> XF86_Switch_VT_6 :1008FE06
> XF86_Switch_VT_7 :1008FE07
> XF86_Switch_VT_8 :1008FE08
> XF86_Switch_VT_9 :1008FE09
> XF86_Switch_VT_10 :1008FE0A
> XF86_Switch_VT_11 :1008FE0B
> XF86_Switch_VT_12 :1008FE0C
>
> Does this tell anyone anything?
>
> Dave.
>
>


Sorry, sorry - first I reply directly to Florian by mistake, then I try
to correct that and end up screwing up the Subject and threading. I
must be getting tired :-)


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 30/04/2007, 11h50   #3
Florian Kulzer
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Since chvt works, the problem must be the keymap

On Mon, Apr 30, 2007 at 00:26:12 +0100, David Claughton wrote:
> Florian Kulzer wrote:
>> It would be interesting to see which keycodes and keysyms are reported
>> if you run "xev", press (and hold) both CTRL and ALT, and then press F1,
>> F2, etc. Does xev really display the keycodes for the Fn keys and the
>> keysyms "XF86_Switch_VT_n"? Are the hexadecimal keysym values the same
>> as the ones that you get with "grep VT /usr/share/X11/XKeysymDB"?

>
> As another "sufferer" of this problem I thought I would give this a try
> - I get ...
>
> KeyPress event, serial 29, synthetic NO, window 0x2600001,
> root 0x3e, subw 0x0, time 1066810844, (622,696), root630,759),
> state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
> XLookupString gives 0 bytes:
> XmbLookupString gives 0 bytes:
> XFilterEvent returns: False
>
> KeyPress event, serial 29, synthetic NO, window 0x2600001,
> root 0x3e, subw 0x0, time 1066810861, (622,696), root630,759),
> state 0x14, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
> XLookupString gives 0 bytes:
> XmbLookupString gives 0 bytes:
> XFilterEvent returns: False
>
> KeyPress event, serial 29, synthetic NO, window 0x2600001,
> root 0x3e, subw 0x0, time 1066815357, (622,696), root630,759),
> state 0x1c, keycode 67 (keysym 0xffbe, F1), same_screen YES,
> XLookupString gives 0 bytes:
> XmbLookupString gives 0 bytes:
> XFilterEvent returns: False


I think that is part of the problem: Even though you hold down CTRL and
ALT before you press F1, you still get the normal "F1" keysymbol and not
the "XF86_Switch_VT_1" one. If I run "xev" and press the three keys then
I never see the KeyPress event for F1 because X switches to the
terminal. If, on the other hand, I disable VT switching in my xorg.conf
then I still do not get any event for F1 if I press it while CTRL + ALT
are held down. Something within X obviously intercepts these events and
processes them or deletes them from the event queue, depending on the
settings in xorg.conf.

[ snip: we see the expected three KeyRelease events ]

> And "grep VT /usr/share/X11/XKeysymDB" returns :
>
> XF86_Switch_VT_1 :1008FE01


[...]

I have the same here.

> Does this tell anyone anything?


Check what is assigned to keycode 67. I see this:

$ xmodmap -pk | egrep '^[ ]+67 '
67 0xffbe (F1) 0x1008fe01 (XF86_Switch_VT_1)

If your output looks different then you can try if

xmodmap -e 'keycode 67 = F1 XF86_Switch_VT_1'

restores the VT switching.

--
Regards, | http://users.icfo.es/Florian.Kulzer
Florian |


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 30/04/2007, 21h00   #4
Amy Templeton
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Since chvt works, the problem must be the keymap

Florian Kulzer wrote:
> Check what is assigned to keycode 67. I see this:


> $ xmodmap -pk | egrep '^[ ]+67 '
> 67 0xffbe (F1) 0x1008fe01 (XF86_Switch_VT_1)


> If your output looks different then you can try if


> xmodmap -e 'keycode 67 = F1 XF86_Switch_VT_1'


> restores the VT switching.


Well, I've got what seems to be the correct output. Also,
xev seems to read things fine from what I can tell. I would
be glad to provide the exact output if it would be ful.

Thanks,
Amy


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 30/04/2007, 21h50   #5
Florian Kulzer
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Since chvt works, the problem must be the keymap

On Mon, Apr 30, 2007 at 16:03:42 -0400, Amy Templeton wrote:
> Florian Kulzer wrote:
> > Check what is assigned to keycode 67. I see this:

>
> > $ xmodmap -pk | egrep '^[ ]+67 '
> > 67 0xffbe (F1) 0x1008fe01 (XF86_Switch_VT_1)

>
> > If your output looks different then you can try if

>
> > xmodmap -e 'keycode 67 = F1 XF86_Switch_VT_1'

>
> > restores the VT switching.

>
> Well, I've got what seems to be the correct output. Also,
> xev seems to read things fine from what I can tell. I would
> be glad to provide the exact output if it would be ful.


At the moment it seems to me that we have checked all the common
pitfalls and still we have no clue why VT switching does not work for
you. Pretty much all that we can do now is poke at a few more things and
hope that a hint comes up. I am now simply very curious what events are
reported when you press CTR + ALT + F1. The KeyPress events for CTRL and
ALT should harbor no surprises, but what happens with F1? Is it reported
as keysym "F1", is it recognized as keysym "XF86_Switch_VT_1" or is it
swallowed by X?

I would also suggest that you check the end /var/log/Xorg.0.log right
after you try to switch VTs. I see these new lines in the log after I
switch to tty1 with CTRL + ALT + F1:

(II) AIGLX: Suspending AIGLX clients for VT switch
(II) intel(0): xf86UnbindGARTMemory: unbind key 0
(II) intel(0): xf86UnbindGARTMemory: unbind key 1
(II) intel(0): xf86UnbindGARTMemory: unbind key 2
(II) intel(0): xf86UnbindGARTMemory: unbind key 3
(II) intel(0): xf86UnbindGARTMemory: unbind key 4

Maybe your VT switching is indeed blocked by a problem with the graphics
driver as suggested earlier by cga. In that case I would hope that the
log will give us a hint what to do about it.

--
Regards, | http://users.icfo.es/Florian.Kulzer
Florian |


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 01/05/2007, 02h00   #6
cga2000
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Since chvt works, the problem must be the keymap

On Mon, Apr 30, 2007 at 04:31:53PM EDT, Florian Kulzer wrote:
> On Mon, Apr 30, 2007 at 16:03:42 -0400, Amy Templeton wrote:
> > Florian Kulzer wrote:
> > > Check what is assigned to keycode 67. I see this:

> >
> > > $ xmodmap -pk | egrep '^[ ]+67 '
> > > 67 0xffbe (F1) 0x1008fe01 (XF86_Switch_VT_1)

> >
> > > If your output looks different then you can try if

> >
> > > xmodmap -e 'keycode 67 = F1 XF86_Switch_VT_1'

> >
> > > restores the VT switching.

> >
> > Well, I've got what seems to be the correct output. Also,
> > xev seems to read things fine from what I can tell. I would
> > be glad to provide the exact output if it would be ful.

>
> At the moment it seems to me that we have checked all the common
> pitfalls and still we have no clue why VT switching does not work for
> you. Pretty much all that we can do now is poke at a few more things and
> hope that a hint comes up. I am now simply very curious what events are
> reported when you press CTR + ALT + F1. The KeyPress events for CTRL and
> ALT should harbor no surprises, but what happens with F1? Is it reported
> as keysym "F1", is it recognized as keysym "XF86_Switch_VT_1" or is it
> swallowed by X?
>
> I would also suggest that you check the end /var/log/Xorg.0.log right
> after you try to switch VTs. I see these new lines in the log after I
> switch to tty1 with CTRL + ALT + F1:
>
> (II) AIGLX: Suspending AIGLX clients for VT switch
> (II) intel(0): xf86UnbindGARTMemory: unbind key 0
> (II) intel(0): xf86UnbindGARTMemory: unbind key 1
> (II) intel(0): xf86UnbindGARTMemory: unbind key 2
> (II) intel(0): xf86UnbindGARTMemory: unbind key 3
> (II) intel(0): xf86UnbindGARTMemory: unbind key 4
>
> Maybe your VT switching is indeed blocked by a problem with the graphics
> driver as suggested earlier by cga. In that case I would hope that the
> log will give us a hint what to do about it.


Normally, that would have been my first reaction to the problem. But
then this was some 4-5 years ago and I can't be sure I looked .. or if
I saw anything.

Also, I'm not sure the behavior of xev is to be relied upon in this
case. From a totally non-technical standpoint, it could be that when
CTRL+Alt+Fn "works" as intended, xev never gets to "see" it .. and otoh,
when it does not, the keycode gets passed to xev. If you follow my
general train of thought.

If I was experiencing such a problem at this point I think I would
subscribe to one of the X.org mailing lists. They are clearly meant for
developers only and these folks may very well not be willing to deal
with us mortals .. but then they should be able to tell us where to go
to try and figure out what this problem is ..

worth a try?

Thanks,
cga


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 01/05/2007, 02h10   #7
David Claughton
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Since chvt works, the problem must be the keymap

Florian Kulzer wrote:
> Check what is assigned to keycode 67. I see this:
>
> $ xmodmap -pk | egrep '^[ ]+67 '
> 67 0xffbe (F1) 0x1008fe01 (XF86_Switch_VT_1)
>
> If your output looks different then you can try if
>
> xmodmap -e 'keycode 67 = F1 XF86_Switch_VT_1'
>
> restores the VT switching.
>


This does seem to be the answer, or nearly at least ...

david@debian:~$ xmodmap -pk | egrep '^[ ]+67 '
67 0xffbe (F1) 0xffca (F13)

This is wrong, so I run the second command ...

david@debian:~$ xmodmap -e 'keycode 67 = F1 XF86_Switch_VT_1'
david@debian:~$ xmodmap -pk | egrep '^[ ]+67 '
67 0xffbe (F1) 0x1008fe01 (XF86_Switch_VT_1)

This now allows me to switch VT on pressing Shift-F1, but not on
Ctrl-Alt-F1. Checking the xmodmap man page reveals that this is correct
- the command maps keycode = keysym shifted-keysym.

However despite careful reading of the man page and a bit of googling,
I'm not sure of the correct way to get the XF86_Switch_VT_1 keysym onto
Ctrl-Alt-F1 where it belongs?

Thanks, Dave.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 01/05/2007, 02h40   #8
Amy Templeton
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Since chvt works, the problem must be the keymap [(mostly SOLVED)]

So I did some follow-through and read through a bit of the
sudoers manual, and added the following to the line for my
username to the system /etc/sudoers file (using visudo, of
course):

Code:
_______________________

NOPASSWD: /usr/bin/chvt
_______________________

....which allows me to successfully invoke chvt without
entering a password. I then added the following stanzas to
my ~/.xmodmap file:

Code:
_____________________

"sudo chvt 1"
control + Mod1 + F1
"sudo chvt 2"
control + Mod1 + F2
"sudo chvt 3"
control + Mod1 + F3
"sudo chvt 4"
control + Mod1 + F4
"sudo chvt 5"
control + Mod1 + F5
"sudo chvt 6"
control + Mod1 + F6
_____________________

....which allows me to switch to a VT using control-alt-f#!
Sweet! Mission accomplished! Thanks for the of everyone
here.

However, there is one small hitch: when invoked from a
commandline, chvt takes me to a VT. There, I can log in,
move to another VT with Alt-f#, or go back to X with alt-f7.
However, when invoked via a keybinding, chvt takes me to the
correct VT, from which I can either log in or go back to X
with alt-f7. If, however, I try to change to another VT from
there, it flashes over to it for a second and then switches
back. This also happens if I invoke chvt from the VT. Unless
somebody has an immediately obvious fix for this, however,
I'm willing to live with this, since the fix above is
admittedly treating the symptoms but not so much the
problem.

Anyway, thanks again to everyone.

Amy


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h11.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,32112 seconds with 16 queries