{"action":"created","issue":{"url":"https://api.github.com/repos/mate-desktop/mate-power-manager/issues/147","labels_url":"https://api.github.com/repos/mate-desktop/mate-power-manager/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/mate-desktop/mate-power-manager/issues/147/comments","events_url":"https://api.github.com/repos/mate-desktop/mate-power-manager/issues/147/events","html_url":"https://github.com/mate-desktop/mate-power-manager/issues/147","id":89036938,"number":147,"title":"Brightness logic error on battery","user":{"login":"jazzrz86","id":6050714,"avatar_url":"https://avatars.githubusercontent.com/u/6050714?v=3","gravatar_id":"","url":"https://api.github.com/users/jazzrz86","html_url":"https://github.com/jazzrz86","followers_url":"https://api.github.com/users/jazzrz86/followers","following_url":"https://api.github.com/users/jazzrz86/following{/other_user}","gists_url":"https://api.github.com/users/jazzrz86/gists{/gist_id}","starred_url":"https://api.github.com/users/jazzrz86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jazzrz86/subscriptions","organizations_url":"https://api.github.com/users/jazzrz86/orgs","repos_url":"https://api.github.com/users/jazzrz86/repos","events_url":"https://api.github.com/users/jazzrz86/events{/privacy}","received_events_url":"https://api.github.com/users/jazzrz86/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-17T14:44:07Z","updated_at":"2015-11-05T19:44:27Z","closed_at":null,"body":"I may have found an issue with the brightness/backlight logic when on battery:\r\n\r\n* I have set the option reduce backlight when on battery and disabled reducing backlight when idle.\r\n* I want the backlight to be 100.0 when on AC and 50% of that when I am on battery- I set the options in the UI.\r\n* Initially, when I boot the machine on battery it is correct, it will halve the initial AC brightness value.  However, leaving the laptop idle will cause the backlight to increase back to 100.0 after a few seconds.\r\n\r\nI look at the code and notice that it only considers the battery reduce option when the call to gpm_backlight_brightness_evaluate_and_set (gpm-backlight.c:272) has the use_initial = TRUE. However, looking at the idle code at idle_changed_cb (gpm-backlight.c:550) it does not pass TRUE to use_initial, cause the backlight scale to be at 100% at the end of the function- verified from using --verbose to the main exec.\r\n\r\nI believe the use_initial flag is redundant as it should ALWAYS consider the backlight reduce on battery option."},"comment":{"url":"https://api.github.com/repos/mate-desktop/mate-power-manager/issues/comments/154169607","html_url":"https://github.com/mate-desktop/mate-power-manager/issues/147#issuecomment-154169607","issue_url":"https://api.github.com/repos/mate-desktop/mate-power-manager/issues/147","id":154169607,"user":{"login":"raveit65","id":961604,"avatar_url":"https://avatars.githubusercontent.com/u/961604?v=3","gravatar_id":"","url":"https://api.github.com/users/raveit65","html_url":"https://github.com/raveit65","followers_url":"https://api.github.com/users/raveit65/followers","following_url":"https://api.github.com/users/raveit65/following{/other_user}","gists_url":"https://api.github.com/users/raveit65/gists{/gist_id}","starred_url":"https://api.github.com/users/raveit65/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raveit65/subscriptions","organizations_url":"https://api.github.com/users/raveit65/orgs","repos_url":"https://api.github.com/users/raveit65/repos","events_url":"https://api.github.com/users/raveit65/events{/privacy}","received_events_url":"https://api.github.com/users/raveit65/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T19:44:27Z","updated_at":"2015-11-05T19:44:27Z","body":"https://github.com/mate-desktop/mate-power-manager/commit/954a80e6c2f945c6abf0a244d1a5dcb14c0ac5fb\r\nPR is merged, but it is mentioned as possible fix, so i will leave the report a while open.\r\n@jazzrz86 \r\nDoes the commit fixes your issue?"}}