Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard backlight: 0% is not persistent on Shut Down and then restarting computer #339

Open
ovari opened this issue Jun 29, 2021 · 17 comments

Comments

@ovari
Copy link

ovari commented Jun 29, 2021

No description provided.

@ovari ovari changed the title Keyboard backlight: 0% is not persistent on Shut Down and then restarting computer Keyboard backlight: 0% is not persistent on Shut Down and then restarting computer Jun 29, 2021
@MidnightNerd
Copy link

MidnightNerd commented Jun 30, 2021

Quick workaround is to add
dbus-send --type=method_call --print-reply=literal --system --dest='org.freedesktop.UPower' '/org/freedesktop/UPower/KbdBacklight' 'org.freedesktop.UPower.KbdBacklight.SetBrightness' "int32:0}"
to autostart.
Normally Systemd should store and restore brightness, but i'm not very experienced with it.

@clefebvre
Copy link
Member

this is upstream from us. I suppose we could consider adding this to our daemon and not rely on systemd to do it for us, but that won't be done in BETA.

@ovari
Copy link
Author

ovari commented Jun 30, 2021

Will this be done in RELEASE?

It is not a permanent project and it will be deleted after the release.

Do we need to move this issue somewhere else so that when https://github.com/linuxmint/mint20.2-beta/ is deleted, this issue will be available?

Thank you

@ovari
Copy link
Author

ovari commented Jul 1, 2021

Thank you for your instructions @MidnightNerd. Unfortunately, when we tried to follow your instructions the keyboard backlight is still on. Below are the steps we did:

Startup ApplicationAddChoose command
Name: Keyboard backlight
Command: dbus-send --type=method_call --print-reply=literal --system --dest='org.freedesktop.UPower' '/org/freedesktop/UPower/KbdBacklight' 'org.freedesktop.UPower.KbdBacklight.SetBrightness' "int32:0}"

No keyboard backlight at all at any stage would be preferable. If not possible, would like to set no keyboard backlight from the earliest possible time, whether that is from the login screen or when the LM logo comes up.

Thank you

@ovari
Copy link
Author

ovari commented Jul 1, 2021

Can a Mouse backlight please also be added to the Power Manager applet? Thank you

@MidnightNerd
Copy link

@ovari can you change keyboard backlight with the power manager applet? And can you turn off kbd backlight when you enter the command in terminal?
If that doesn't work can you search for a file named brightness in /sys/class select the file that is related to your keyboard and open a root terminal with sudo su and run echo BRIGHTNESS > PATH_TO_YOUR_BRIGHTNESS_FILE where brightness needs to be replaced with 0 or any number lower than the value in the file max_brightness in the same folder.

@clefebvre
Copy link
Member

Yes, I'll transfer this to cinnamon-settings-daemon now.

@clefebvre clefebvre transferred this issue from linuxmint/mint20.2-beta Jul 1, 2021
@ovari
Copy link
Author

ovari commented Jul 1, 2021

@MidnightNerd we change the keyboard backlight using the power manager applet. It is on 0% so we move it to 100% and then back down to 0% and then it is turned off.

Don't know how to do that in the terminal.

Perhaps we should wait patiently until a fix in is Linux Mint for everyone and this issue is closed.

@clefebvre should Keyboard backlight be renamed to Backlight and change the keyboard and mice backlights?

Thank you

@MidnightNerd
Copy link

MidnightNerd commented Jul 1, 2021

This bug has nothing to do with linuxmint at all. This is a device specific problem and may has to do with bad software support for your keyboard. On most keyboards this should work out of the box. Normally there is a systemd unit for this. Can you run systemctl list-units --type=service |grep systemd-backlight in terminal and send us the output?

@ovari Here is a script that should solve your problem. Open a terminal in the folder where the script is and run mv keyboard.sh.txt keyboard.sh && chmod +x keyboard.sh next add the script to autostart. You can try reducing the sleep times in the script.
keyboard.sh.txt

@ovari how can you change mouse backlight?

@clefebvre i guess this is no common issue, so we don't need an extra entry in the settings daemon. Theres already a good solution. The brightness of every device that has the entry[email protected] in the udev db will be loaded and saved on boot/shutdown.

@ovari
Copy link
Author

ovari commented Jul 2, 2021

$ systemctl list-units --type=service |grep systemd-backlight

  systemd-backlight@backlight:intel_backlight.service   loaded active exited  Load/Save Screen Backlight Brightness of backlight:intel_backlight           
  systemd-backlight@leds:asus::kbd_backlight.service    loaded active exited  Load/Save Screen Backlight Brightness of leds:asus::kbd_backlight

@ovari
Copy link
Author

ovari commented Jul 2, 2021

How can you change mouse backlight?

The Logitech G300s Optical Gaming Mouse blue light stays on. The blue light stripes are shown in the image below.

Logitech G300s Optical Gaming Mouse

@ovari
Copy link
Author

ovari commented Jul 2, 2021

Does Linux Mint provide a way to change colors, binding, and even create custom macros for the mouse buttons?

Is RatSlap available for Linux Mint?

Can Linux Mint Driver Manager please install RatSlap if a Logitech mouse (G300 or G300S) is detected?

Thank you

@ovari
Copy link
Author

ovari commented Jul 2, 2021

Here is a script that should solve your problem. Open a terminal in the folder where the script is and run mv keyboard.sh.txt keyboard.sh && chmod +x keyboard.sh next add the script to autostart. You can try reducing the sleep times in the script.
keyboard.sh.txt

Thank you for your instructions. Which directory should the file be saved? We can wait as this seems to be adding customization just for us and we prefer that fixes are available for everyone. Thank you

@MidnightNerd
Copy link

@ovari i guess that this issue has to do with the asus kernel module.
To confirm this turn off keyboard backlight shut down and boot your computer and run cat /sys/class/leds/asus::kbd_backlight/brightness if the return value is 0 and your keyboard is on there's something wrong with the keyboard backlight driver.
If the fix should be available for everyone i guess the kernel module needs to be fixed.

  1. The directory of the script doesn't matter.
  2. AFAIK ratslap isn't available in many distributions. But there's a compiled program that you can simply use. I guess you won't find ratslap in the near futures in the repository.

@ovari
Copy link
Author

ovari commented Jul 2, 2021

  1. Confirming the error as
$ cat /sys/class/leds/asus::kbd_backlight/brightness
0

and the keyboard backlight is on

  1. Which directory would Linux Mint put it in?
  2. Is there another program that is included in Linux Mint that configures mice buttons, lights, etc?

Thank you

@MidnightNerd
Copy link

Here is a ratslap gui: https://github.com/Asocia/rattrap there is no program included in linux mint. It's not very difficult to install the two programs.
i guess no one will put the effort to create packages in it, because the program only works with one mouse.
@ovari Can this issue be closed?

@ovari
Copy link
Author

ovari commented Jul 2, 2021

Is the Keyboard backlight issue yet to be resolved? If so, should this issue remain open?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants