Skip to content

Dell drac console repeating keys

wordpress meta

title: 'Dell Drac Console Repeating Keys'
date: '2012-11-23T17:35:41-06:00'
status: publish
permalink: /dell-drac-console-repeating-keys
author: admin
excerpt: ''
type: post
id: 122
category:
    - KVM
    - Linux
tag: []
post_format: []

I have had issues using Dell Drac’s on some servers. It appears to be related to high latency network connections.

Sometimes it is important to login to a Hypervisor Linux console and it is impossible if your keys repeat and you try to login as rrrooooottttt. Believe me I thought it was mildly amusing trying to get logged in like that but no dice. Hint: You can’t see the password.

It is possible this issue could be related to the Windows client. I was using a Windows 7 client in a Virtualbox VM and I am not 100% sure but someone else was able to connect from a KVM client without the keys repeating. I played with a lot of options to fix this and some people had luck with setterm on the command line.

setterm -repeat off

However I need the repeating keys fixed before login and not after we logged in so above would not work for me. Also I could not get setterm to work, no matter where I tried inserting the command during OS startup. Options are:
- Change the getty for the virtual console in inittab or wherever the OS runs getty. In our case with Ubuntu upstart in /etc/init/tty[1|8].conf. The idea is to pass the –I variable to getty with a command string.
- Run setterm in rc.local or wherever newer flavors of Linux want to run custom command on startup.
- Kernel parameter with atkbd.reset= or something similar although it sounded like the kernel developers gave up on this idea. I am not sure.

I finally had some success by sending raw codes to the terminal direct ie not using setterm. So for instance sending the virtual console a keycode to change the foreground color to green as follow:

 /dev/tty1

The following command which appears is for DEC terminals did work.

Turn on:

 /dev/tty1

Turn off:

 /dev/tty1

More codes here: http://linux.about.com/library/cmd/blcmdl4_console_codes.htm

So I ended up adding below to INKVM001 to give us a green and no key repeat virtual console on tty4:

# tail -1 console-setup.conf
 exec echo -en "\\033[32m\\033[8\\033[?8l" > /dev/tty4

To access different virtual console you just use Alt-F# when in text mode and Ctrl-Alt-F# when in a graphics mode. In this case the Drac menu can send the an Alt-F4 macro and you will have a safe (and green) login terminal which will not drive you innnnsssssannnnneeeee.

Other commands I was playing with just for reference:

# dpkg-reconfigure keyboard-configuration

setterm -blank 0 -powerdown 0 -powersave off > /dev/tty${index}

exec /sbin/getty -I `setterm -clear all -foreground yellow -bold -store` -8 38400 tty1

# kbdrate -d 1000
 Typematic Rate set to 10.9 cps (delay = 1000 ms)

Links:
http://www.kernel.org/doc/Documentation/kernel-parameters.txt
http://www.win.tue.nl/~aeb/linux/kbd/scancodes-12.html
http://luv.asn.au/overheads/virtualconsoles.html
http://linux.about.com/library/cmd/blcmdl4_console_codes.htm
http://www.linuxquestions.org/questions/linux-general-1/setting-terminal-colors-with-setterm-718290/
http://shallowsky.com/blog/linux/install/ctrl-key-debian-squeeze.html
https://bugzilla.redhat.com/show_bug.cgi?id=181457
http://www.ibiblio.org/pub/Linux/docs/HOWTO/Keyboard-and-Console-HOWTO