{"id":122,"date":"2012-11-23T17:35:41","date_gmt":"2012-11-24T01:35:41","guid":{"rendered":"http:\/\/blog.ls-al.com\/?p=122"},"modified":"2012-12-01T17:21:30","modified_gmt":"2012-12-02T01:21:30","slug":"dell-drac-console-repeating-keys","status":"publish","type":"post","link":"https:\/\/blog.ls-al.com\/dell-drac-console-repeating-keys\/","title":{"rendered":"Dell Drac Console Repeating Keys"},"content":{"rendered":"

I have had issues using Dell Drac\u2019s on some servers. It appears to be related to high latency network connections.<\/p>\n

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\u2019t see the password.<\/p>\n

It is possible this issue could be related to the Windows client. \u00a0I 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.\u00a0I played with a lot of options to fix this and some people had luck with setterm on the command line.<\/p>\n

setterm -repeat off<\/pre>\n

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:
\n- 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 \u2013I variable to getty with a command string.
\n- Run setterm in rc.local or wherever newer flavors of Linux want to run custom command on startup.
\n- Kernel parameter with atkbd.reset= or something similar although it sounded like the kernel developers gave up on this idea. I am not sure.<\/p>\n

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:<\/p>\n

# echo -en "\\\033[32m\\\033[8]" > \/dev\/tty1<\/pre>\n

The following command which appears is for DEC terminals did work.<\/p>\n

Turn on:<\/p>\n

# echo -en "\\\033[?8h" > \/dev\/tty1<\/pre>\n

Turn off:<\/strong><\/p>\n

# echo -en "\\\033[?8l" > \/dev\/tty1<\/pre>\n

More codes here: http:\/\/linux.about.com\/library\/cmd\/blcmdl4_console_codes.htm<\/p>\n

So I ended up adding below to INKVM001 to give us a green and no key repeat virtual console on tty4:<\/p>\n

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

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.<\/p>\n

Other commands I was playing with just for reference:<\/strong><\/p>\n

# dpkg-reconfigure keyboard-configuration\r\n\r\nsetterm -blank 0 -powerdown 0 -powersave off > \/dev\/tty${index}\r\n\r\nexec \/sbin\/getty -I `setterm -clear all -foreground yellow -bold -store` -8 38400 tty1\r\n\r\n# kbdrate -d 1000\r\n Typematic Rate set to 10.9 cps (delay = 1000 ms)<\/pre>\n

Links:<\/strong>
\nhttp:\/\/www.kernel.org\/doc\/Documentation\/kernel-parameters.txt
\nhttp:\/\/www.win.tue.nl\/~aeb\/linux\/kbd\/scancodes-12.html
\nhttp:\/\/luv.asn.au\/overheads\/virtualconsoles.html
\nhttp:\/\/linux.about.com\/library\/cmd\/blcmdl4_console_codes.htm
\nhttp:\/\/www.linuxquestions.org\/questions\/linux-general-1\/setting-terminal-colors-with-setterm-718290\/
\nhttp:\/\/shallowsky.com\/blog\/linux\/install\/ctrl-key-debian-squeeze.html
\nhttps:\/\/bugzilla.redhat.com\/show_bug.cgi?id=181457
\nhttp:\/\/www.ibiblio.org\/pub\/Linux\/docs\/HOWTO\/Keyboard-and-Console-HOWTO<\/p>\n","protected":false},"excerpt":{"rendered":"

I have had issues using Dell Drac\u2019s on some servers. It appears to be related to high latency network connections.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9],"tags":[],"class_list":["post-122","post","type-post","status-publish","format-standard","hentry","category-kvm","category-linux"],"_links":{"self":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/comments?post=122"}],"version-history":[{"count":0,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/122\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/media?parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/categories?post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/tags?post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}