It requires two distinct hardware subsystems - disc and keyboard - to be linked, and a fair amount of systems programming. But the converse approach, of having all disc I/O commands generated by the disc device driver make a side trip through the keyboard device driver is almost as bad, albeit that it doesn't require a whole new type of hardware device that receives "The front panel LED is on!" interrupts. It's not really practical - and would require a considerable amount of extra software and hardware - for output on the SATALED# signal to cause hardware interrupts that are received by software, which then triggers commands by the keyboard device driver. Those who remember life with SCSI will remember that SCSI hard disc activity didn't affect the "hard disc" LED, since it is driven by the ATA bridge hardware. (For the ICH10, for example, this output is the SATALED# output.) Hardware turns this output on and off as commands are sent across the SATA/PATA bus. They are connected to the mainboard, and - to cut a long story short - wired up to an output of the PCI-to-ATA bridge chip. The hard disc activity lights on your front panel are controlled by hardware. The keyboard LEDs are controlled by software - in particular by the keyboard device driver generating commands to be sent to the keyboard microprocessor that turn the LEDs on and off, in response to I/O Control requests. This is not a software problem to solve with a library. To have caps or other leds as HDD indicators. I did not test this, but just by looking the code looked ok.Īnd here's a shell script to do what you originally wanted. If you are more of person who likes to code stuff here's a link to en example code to change leds in X. If you don't have setleds in you system, my guess is that you can get it from this emerge package sys-apps/kbd. ![]() I think this will also work: sudo su -c 'setleds -L +num < /dev/console' dev/console should work being the system console and by that all VTs should be affected. ![]() ![]() Please note that X is usually ran as root so you'll either have to check permissions on X-windows tty or run it with root privileges. It comes trickier in X and this is the "simplest" way to try it. If you don't want to enable numlock, just light it up you can type: setleds -L +num So if you're in a VT you can just type setleds Well to change the led indicator on VT console you can use setleds.
0 Comments
Leave a Reply. |