Date: Sat, 25 Jun 2016 19:30:47 +0200 From: Polytropon <freebsd@edvax.de> To: Manish Jain <bourne.identity@hotmail.com> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: Re: Bad experience switching to SSD on FreeBSD 10.3 Message-ID: <20160625193047.d72237d4.freebsd@edvax.de> In-Reply-To: <AM3PR02MB0963C663127CF29DD35C8CE6F62F0@AM3PR02MB0963.eurprd02.prod.outlook.com> References: <VI1PR02MB0974EE59E723F9B6678BDAC1F62E0@VI1PR02MB0974.eurprd02.prod.outlook.com> <649e47bb82b8c14b8068733a62f554f1@dweimer.net> <20160624232512.84ba05c4.freebsd@edvax.de> <AM3PR02MB0963C663127CF29DD35C8CE6F62F0@AM3PR02MB0963.eurprd02.prod.outlook.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 25 Jun 2016 09:08:46 +0000, Manish Jain wrote: > >>> > >>> 1) Keyboard -> LED backlit keyboard (Cooler Master Devastator, USB) > >>> 2) 2 GB DDR3 RAM -> 8GB DDR3 (G Skill) > >>> 3) Sata HD -> SSD (Samsung EVO 500 GB) > >>> > >>> The keyboard upgrade itself failed for FreeBSD. The moment I switch on > >>> the LED backlight light for the keys, console output freezes till I > >>> turn off the backlight. This is surprising because the keyboard works > >>> well on XP, which was developed almost 2 decades back. The reason this > >>> is important for me is because I love working in the dark, with no > >>> bright lights around. LED keyboards make that possible. Not just that, > >>> the keyboard looks sensational - particularly with LED on, when the > >>> thing looks futuristic. > >> > >> Cooler Master Devastator is a poorly designed LED keyboard for using on > >> FreeBSD/Linux, I did a quick search because I was surprised it wouldn't > >> work. > >> > > > >> Someone else might have a better idea for a work around on this. > > > > Press Scroll Lock to activate light (console locked), press Pause/Break > > to unlock console again. As both keys are next to each other, > > develop the routine to press them after each other to toggle the > > light. Inside X, Scroll Lock usually has no function assigned, > > so it shouldn't be a problem there. > > > I found a doc which says the keyboard can be used with linux with this > script : > > #!/bin/bash > FLAGS=$(xset -q | awk 'NR==2' | awk '{ print $10 }') > if [ "$FLAGS" = 00000000 ]; then > xset led on > else > xset led off > fi > > Would this kind of script work on FreeBSD too ? First line would have to be #!/bin/sh, because /bin/bash is not part of the FreeBSD default installation. But do you have a locking problem in X? The script calls xset, this is _inside_ X. Scroll Lock doesn't have a function inside X (per default). If I press Scroll Lock on my keyboard, nothing happens (the LED doesn't even light up). Furthermore, the xset invocation looks strange. Something is missing. Accoding to "man xset": led The led option controls the keyboard LEDs. This controls the turning on or off of one or all of the LEDs. It accepts an optional integer, a preceding dash(-) or an 'on/off' flag. If no parameter or the 'on' flag is given, all LEDs are turned on. If a preceding dash or the flag 'off' is given, all LEDs are turned off. If a value between 1 and 32 is given, that LED will be turned on or off depending on the existence of a pre- ceding dash. ``xset led 3'' would turn led #3 on. ``xset -led 3'' would turn it off. The particular LED values may refer to different LEDs on different hardware. If the X server supports the XKEYBOARD (XKB) extension, leds may be referenced by the XKB indicator name by specifying the `named' keyword and the indicator name. For example, to turn on the Scroll Lock LED: xset led named "Scroll Lock" So that command would turn off all LEDs... which looks wrong... and the example clearly states how to turn on the Scroll Lock LED (and to turn it off: xset -led named "Scroll Lock"). Inside X, it would probably be the easiest thing to do _nothing_. :-) In console mode, I'd suggest to re-assign Scroll Lock to "empty" (no action). Example: Let's say you use "german ISO" (where in fact you're using a different layout, but let's just assume this to illustrate the modification". In /etc/rc.conf, you have something like this: keymap="german.iso" # <--- this line keyrate="fast" font8x14="iso-8x14" font8x16="iso-8x16" font8x8="iso-8x8" saver="no" blanktime="NO" scrnmap="NO" Then you reference the /usr/share/syscons/keymaps/german.iso.kbd file. In that file, there is a line 070 slock slock slock slock slock slock slock slock O ^^^^^ Which is the Scroll Lock key. The 2nd column is "slock", Scroll Lock. Replace it with "nop" (no operation). 070 nop slock slock slock slock slock slock slock O ^^^ After restart, the key won't do anything except switching the background light on and off. The Scroll Lock functionality (!) will be kept with the Pause/Break key: 104 slock saver slock saver susp nop susp nop O That's a "quick & dirty" instruction that doesn't survive an OS update in a clean manner, but it should solve the problem (if you don't want to go with the "Scroll Lock, Pause/Break" key sequence I suggested). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160625193047.d72237d4.freebsd>