linuxmint / cinnamon-settings-daemon

The settings daemon for the Cinnamon desktop
GNU General Public License v2.0
57 stars 58 forks source link

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

Open ovari opened 3 years ago

MidnightNerd commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

MidnightNerd commented 3 years ago

@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 commented 3 years ago

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

ovari commented 3 years ago

@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 commented 3 years ago

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 entrySYSTEMD_WANTS=systemd-backlight@DEVICENAME.service in the udev db will be loaded and saved on boot/shutdown.

ovari commented 3 years ago
$ 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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago
  1. Confirming the error as

    $ cat /sys/class/leds/asus::kbd_backlight/brightness
    0

    and the keyboard backlight is on

  2. Which directory would Linux Mint put it in?

  3. Is there another program that is included in Linux Mint that configures mice buttons, lights, etc?

Thank you

MidnightNerd commented 3 years ago

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 commented 3 years ago

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