LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Bodhi (https://www.linuxquestions.org/questions/bodhi-92/)
-   -   Amusing backlight gadget interaction with caps lock (https://www.linuxquestions.org/questions/bodhi-92/amusing-backlight-gadget-interaction-with-caps-lock-4175646315/)

bobl01 01-16-2019 03:56 AM

Amusing backlight gadget interaction with caps lock
 
I've been working on improving the Japan theme and I've been making good progress. However, along the way I noticed an amusing interaction between the backlight gadget and the caps lock key on my computer. I'm running Bodhi 5 32 bit on a Mac (OS X) using Virtual Box.

When I pull up the backlight slider to "increase" the screen brightness, the caps lock light comes on. And when I slide it down, it goes off. As you might imagine with a guest running under Virtual Box, the backlight itself isn't changed (it's under the control of the OS X host). I assume this is connected to a related issue that the caps lock light always turns on when I power up the Bodhi guest virtual machine.

Anyone else noticed anything similar?

the_waiter 01-16-2019 06:02 AM

Interesting Bob

I will try to reproduce when I get home

Štefan

the_waiter 01-16-2019 09:53 AM

Hmmm

Interesting. I can not reproduce your behavior but I found something. This is the ss of backlight module under Vbox

http://www.enlightenment.org/ss/e-5c...3.49459977.png

This is not there under real machine. I have to look at moksha code what that means.

Stefan

bobl01 01-16-2019 10:03 AM

I wouldn't make this a high priority, Stefan. It's a little anomaly which is probably some feature of running as a virtual machine. It's more amusing than annoying.

Bob

the_waiter 01-16-2019 10:07 AM

No no, I am not gonna waste lot of time for this. I know VM is different than real machine. Devs know why they added devices to the listbox. Anyway, it is interesting and I did not know this exists.

Stefan

rbtylee 01-16-2019 11:21 AM

Quote:

Originally Posted by the_waiter (Post 5949819)
No no, I am not gonna waste lot of time for this. I know VM is different than real machine. Devs know why they added devices to the listbox. Anyway, it is interesting and I did not know this exists.

Stefan

I have saw that too altho I couldn't duplicate the issue reported. I also wonder why this is there on VM and not on hardware.

rbtylee 01-17-2019 06:01 AM

@the_waiter, I am adding this to the Moksha Issues google Docs we maintain. As well as the following information for those interested:

Quote:

See files moksha/src/modules/conf_display/e_int_config_dpms.c
And moksha/src/bin/e_backlight.c

In the latter file note the comment:
/* FIXME: need to make this more precise so we don't set keyboard LEDs or something */
This and a few other things reminds me at some point sooner than later I need to go thru the list of known issues and start fixing stuff. At least fix all the easy stuff I can and examine more e22 backports to see if they are applicable.

Meanwhile on this specific issue, patches are of course accepted provided they work and don't break anything. lol. If anyway is brave enough to bite that bullet.

Quote:

Originally Posted by bobl01 (Post 5949712)
... I assume this is connected to a related issue that the caps lock light always turns on when I power up the Bodhi guest virtual machine.

Anyone else noticed anything similar?

Now this issue of caps lock being on when I first boot Bodhi up is a longstanding irritation for me. Oddly enough most bodhi ISOs I have installed in Virtualbox have this issue. But not all :confused: I am unsure if this has to do with the Bodhi iso or the virtualbox version I was installing it on. I have running hardware installs of bodhi 2.4 to bodhi 5.0 and many of them have Virtualbox installed with several if not many VMs. (ok at some point i need to clean all this crap up on my multiple machines with multiple partitions and multiple OSes. too busy -- low priority)

Anyways back on topic: I have noted it just never really knew where to look for it. It seems that this also occurs in e22. But don't quote me on that I need to recheck that. Perhaps it is related. If so that would be fantastic because it would give a some place to start debugging the issue.

the_waiter 01-17-2019 09:39 AM

This all is really odd. How could be backlight module related to the capslock or numlock? Maybe I will be a lucky man and e devs answer me on irc...

rbtylee 01-18-2019 06:37 AM

Quote:

Originally Posted by the_waiter (Post 5950200)
This all is really odd. How could be backlight module related to the capslock or numlock? Maybe I will be a lucky man and e devs answer me on irc...

Uncertain on that but the same issue persists in e22: https://i.imgur.com/AnocYbl.png

the_waiter 01-18-2019 07:02 AM

Yes, I checked the code and it is the same. I talked with okra (e-dev) and he claimed it must be a mapping issue in VBox. The real reason why the code is collecting the device info is uncertain for me but he told if there are some "insane" devices, they will be listed in the setting. And bobl01 is really right. The backlight slider has a real impact to capslock. I tried it in terminal. When I slide up to max, the first letter is capital. Any other letters are normal as, the slider goes down immediatelly. A real mystery, yes

S

rbtylee 01-18-2019 08:07 AM

For future reference, the output of the command find /sys/ -type f -iname '*brightness*'

On a VM, BL5.0

Code:

find: ‘/sys/kernel/debug’: Permission denied
/sys/devices/platform/i8042/serio0/input/input0/input0::capslock/max_brightness
/sys/devices/platform/i8042/serio0/input/input0/input0::capslock/brightness
/sys/devices/platform/i8042/serio0/input/input0/input0::scrolllock/max_brightness
/sys/devices/platform/i8042/serio0/input/input0/input0::scrolllock/brightness
/sys/devices/platform/i8042/serio0/input/input0/input0::numlock/max_brightness
/sys/devices/platform/i8042/serio0/input/input0/input0::numlock/brightness
/sys/module/video/parameters/brightness_switch_enabled

On my laptop:

Code:

find: ‘/sys/kernel/debug’: Permission denied
/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/max_brightness
/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness
/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/actual_brightness
/sys/devices/platform/i8042/serio0/input/input4/input4::capslock/max_brightness
/sys/devices/platform/i8042/serio0/input/input4/input4::capslock/brightness
/sys/devices/platform/i8042/serio0/input/input4/input4::numlock/max_brightness
/sys/devices/platform/i8042/serio0/input/input4/input4::numlock/brightness
/sys/devices/platform/i8042/serio0/input/input4/input4::scrolllock/max_brightness
/sys/devices/platform/i8042/serio0/input/input4/input4::scrolllock/brightness
find: ‘/sys/fs/pstore’: Permission denied
/sys/module/video/parameters/brightness_switch_enabled
/sys/module/i915/parameters/invert_brightness

I am uncertain why in a VM it picks up on stuff in /sys/devices/platform/i8042/serio0/input/input0/ but on my hardware it ignores stuff in /sys/devices/platform/i8042/serio0/input/input4/ :confused: To understand why I would prob have to run e thru dbg and set breakpoints at the relevant places and examine variables and function calls closely. Sounds like a good way to waste most of a day :(

But I would presume when the brightness module picks up on these key settings it is to increase the brightness of the led (turn on or turn off most likely) on the key, assuming you have a keyboard with leds on said keys.

makarovnik 01-23-2019 05:20 PM

Is there a fix or workaround?
 
I did not have a problem with the CAPS key light until I did an apt-get upgrade.

At the end the setup detected the correct keyboard (I think) but now after every login my CAPS key is illuminated but when I type I get lowercase. If I then hit the CAPS LOCK the light goes out and I still get lowercase. When I hit the CAPS LOCK key yet another time, the light is illuminated but I get uppercase. Any way to check this or just make it not illuminate the CAPS key indicator after login? I am not running VM. It's just a standard install on a hard drive.

bobl01 01-23-2019 06:57 PM

I don't know if this is relevant at all, but if you go to the settings panel -> screen -> Backlight, then at the bottom of the dialog window that opens up, there are three (on my system) text lines, which end with "capslock", "numlock", and "scrolllock". I have no idea what they mean, and no idea how these lines are supposed to be used, but their very presence on a Backlight dialog window would hint that the backlight and the capslock light are linked in some way.

(Later) After some investigation, I discovered that the following Terminology commands will turn the capslock light on and off.
cd /sys/class/leds/input0::capslock
echo 1 | sudo tee brightness
echo 0 | sudo tee brightness

Whether it's possible to build these into a startup script is a question for another day, since I'm need some shuteye!

makarovnik 01-23-2019 07:03 PM

Yes I noticed the same thing. They are definitely linked but they shouldn't be. I can understand them being linked to KEYBOARD backlight but not DISPLAY backlight.

My temporary solution was to turn the slider for normal backlight down to < 50. When I adjust it to 50 that is the threshold where my capslock indicator lights up. I left the other sliders alone so the dim backlight still is on 30.

The path that appears at the bottom of the dialog box (in case anyone wants to cut and paste it) is:
/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:046D:C31C.0002/input/input6/input6::capslock

I will do some testing to see if I can comment something out or change a setting in one of the files but I'm no hacker or programmer and don't really know linux all that well but I'm learning.

I'm guessing it's something in the file in the above mentioned directory, named "trigger". I'm thinking there is an entry in there for capslock that can be commented out or the value changed. Maybe someone that knows more than me (shouldn't be hard) can give it a look.

m4dj0e 09-27-2020 10:50 AM

I just encountered the same issue... any of you guys found a permanent solution for this?


All times are GMT -5. The time now is 12:41 PM.