All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	intel-gfx@lists.freedesktop.org, peter.hutterer@redhat.com
Subject: Re: [PATCH 3/3] xf86-video-intel: Add a helper for setting backlight without root rights
Date: Sat, 15 Feb 2014 22:37:29 +0100	[thread overview]
Message-ID: <52FFDE19.80007@redhat.com> (raw)
In-Reply-To: <20140215115227.GP32602@nuc-i3427.alporthouse.com>

Hi,

On 02/15/2014 12:52 PM, Chris Wilson wrote:
> On Sat, Feb 15, 2014 at 09:48:14AM +0100, Hans de Goede wrote:
>> Hi,
>>
>> On 02/15/2014 12:54 AM, Chris Wilson wrote:
>>> On Sat, Feb 15, 2014 at 12:02:37AM +0100, Hans de Goede wrote:
>>>> Once the xserver stops running as root on kms capabable systems, we will need
>>>> some other way to access the backlight.
>>>>
>>>> The approach taken in this patch leaves most of the heavy lifting (wrt
>>>> doing everything suid root safe) to pkexec, as is done in ie
>>>> gnome-settings-daemon, which controls the backlight directly on ati and
>>>> nouveau cards.
>>>>
>>>> This commit adds src/backlight.h and src/backlight.c as a place to share common
>>>> backlight code, in the future most of the duplicate backlight code inside
>>>> src/sna/sna_display.c and src/uxa/intel_display.c should be moved there.
>>>
>>> Right, I agree and think we can make that transition now. It should not
>>> result in much more code than motion than introducing the helper.
>>> Importantly, I think it will also clarify the tests we require before
>>> declaring the backlight functional.
>>
>> So you would like me to unify things before adding the helper I assume,
>> so first a unifying patch introducing backlight.[c,h] and then a patch adding
>> the helper on top ?
> 
> No, I've just moved some code around in your patch and reduced a little
> more duplication. I'm happy with it all now, except for one minor
> niggle..

Nice, thanks for working on this! I'll run some tests with your modified code
coming Monday to ensure that everything works as it should with pkexec and
the xserver running as a regular user.

> How do you make pkexec work? On my f20, it just hangs in
> polkit_authority_check_authorization_sync()

Do you have selinux in enforcing mode ? That is know to cause this issue.
I need to file selinux policy bugs for both this as well as for Xorg's inability
to talk to systemd-logind when selinux is in enforcing mode. Doing:
setenforce 0 as root may help.

Regards,

Hans

  reply	other threads:[~2014-02-15 21:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14 23:02 [PATCH 1/3] xf86-video-intel: Fix fd_set_nonblock Hans de Goede
2014-02-14 23:02 ` [PATCH 2/3] xf86-video-intel: export fd_set_cloexec / fd_set_nonblock Hans de Goede
2014-02-14 23:02 ` [PATCH 3/3] xf86-video-intel: Add a helper for setting backlight without root rights Hans de Goede
2014-02-14 23:54   ` Chris Wilson
2014-02-15  8:48     ` Hans de Goede
2014-02-15 11:52       ` Chris Wilson
2014-02-15 21:37         ` Hans de Goede [this message]
2014-02-15 11:53       ` [PATCH] intel: " Chris Wilson
2014-02-15 15:47         ` Chris Wilson
2014-02-14 23:44 ` [PATCH 1/3] xf86-video-intel: Fix fd_set_nonblock Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52FFDE19.80007@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=peter.hutterer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.