! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Add support for chromebook in xfpm-backlight-helper (how to inside!)
Status:
RESOLVED: INVALID
Product:
Xfce4-power-manager
Component:
General

Comments

Description tomwallroth 2018-11-18 21:35:10 CET
Dear xfce developers,

I would like to ask you to add support for the backlight of intel-based chromebooks (or probably any intel n3060 based notebook for that matter).
First off I have to apologize that I am not submitting a patch myself, but I have no idea how your workflow for accepting patches works etc; I would have created a PR on github or bitbucket or gitlab since I know the procedure there.

I had a look at the source code all the needed change is very small:

in `xfpm-backlight-helper.c` a new item must be added to the `backlight_interfaces`, called "intel_backlight". And that should be it.

Here's the tree from the `/sys/class/backlight` interface:

```
	(xenial)root@localhost:~# find /sys/class/backlight/intel_backlight/
	/sys/class/backlight/intel_backlight/
	/sys/class/backlight/intel_backlight/type
	/sys/class/backlight/intel_backlight/brightness
	/sys/class/backlight/intel_backlight/power
	/sys/class/backlight/intel_backlight/power/control
	/sys/class/backlight/intel_backlight/power/async
	/sys/class/backlight/intel_backlight/power/dark_resume_active
	/sys/class/backlight/intel_backlight/power/runtime_enabled
	/sys/class/backlight/intel_backlight/power/runtime_active_kids
	/sys/class/backlight/intel_backlight/power/runtime_active_time
	/sys/class/backlight/intel_backlight/power/autosuspend_delay_ms
	/sys/class/backlight/intel_backlight/power/runtime_status
	/sys/class/backlight/intel_backlight/power/runtime_usage
	/sys/class/backlight/intel_backlight/power/runtime_suspended_time
	/sys/class/backlight/intel_backlight/bl_power
	/sys/class/backlight/intel_backlight/max_brightness
	/sys/class/backlight/intel_backlight/device
	/sys/class/backlight/intel_backlight/subsystem
	/sys/class/backlight/intel_backlight/resume_brightness
	/sys/class/backlight/intel_backlight/uevent
	/sys/class/backlight/intel_backlight/actual_brightness
```

As you can see, the `brightness` and `max_brightness` handles are there and are working as expected, so just adding "intel_backlight" should work nicely.

Anyway, I would be delighted I you were to include this small change in a future release to get out-of-the-box support for the backlight on chromebooks running xfce using crouton.
Comment 1 Andre Miranda editbugs 2018-11-18 22:17:46 CET
git format-patch HEAD^ attached to this bug report is our current form of PR (spoiler: at some point we will move to gitlab).
Comment 2 tomwallroth 2018-11-19 03:11:47 CET
Hey Andre, thanks for the quick response. I've now figured out that my change would only be applicable to the older power manager plugin which is shipped with ubuntu xenial. I will try out the newest version and submit a patch as you advised. So I'll close this for now so as not to clutter your bugtracker!

Bug #14889

Reported by:
tomwallroth
Reported on: 2018-11-18
Last modified on: 2018-11-19

People

Assignee:
Ali Abdallah
CC List:
4 users

Version

Attachments

Additional information