MASTER: acpid should be disabled from xorg-server (fedora patch)

Bug #496859 reported by Pauli
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gdm (Ubuntu)
Won't Fix
Undecided
Unassigned
xorg-server (Ubuntu)
Won't Fix
Wishlist
Unassigned

Bug Description

Binary package hint: kdebase-workspace

Xserver tries to connect to acpid.socket very soon after starting. It may fail because acpid is started after X because of missing dependency in upstart job.

This include kdm, gdm and failsafe-X that I have installed. I suspect all others dms are affected too.

ProblemType: Bug
Architecture: i386
Date: Tue Dec 15 09:06:28 2009
DistroRelease: Ubuntu 9.10
Package: kdm 4:4.3.2-0ubuntu7.1
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-16.53-generic
SourcePackage: kdebase-workspace
Uname: Linux 2.6.31-16-generic i686
XsessionErrors: (polkit-gnome-authentication-agent-1:2414): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

Revision history for this message
Pauli (paniemin) wrote :
affects: kdebase-workspace (Ubuntu) → gdm (Ubuntu)
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

X doesn't need to connect to the acpid socket, and works fine if it doesn't

Changed in gdm (Ubuntu):
status: New → Won't Fix
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

the acpid code should be purged from the server.

affects: xorg (Ubuntu) → xorg-server (Ubuntu)
Changed in xorg-server (Ubuntu):
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

make that "acpi code"

Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

Bryce, can you comment on:

 - what X does with acpid.socket
 - what the consequences of missing it on startup would be
 - whether we can drop the acpid.socket lookup at all, or
 - whether we can make X watch /var/run/acpid.socket with inotify and use it if it shows up

Thanks!
Mark

Revision history for this message
Bryce Harrington (bryce) wrote :

Hi Mark,

No, xserver does not need acpi to be running. We've known for some time about the error message that gets produced when it isn't there; in fact I had to quell it because it'd spam the Xorg.0.log (see lp #247195). The spamming eventually got fixed upstream, but the acpi probing code (and corresponding error message) is still there.

What the code in question is doing is setting up a listener to acpid for power management events (suspend/resume/battery-status) If it doesn't see acpid at boot, it sets a timer to try again later. So as I understand it, it's not really X *depending* on acpi for anything but rather honoring its presence if it is there.

I checked a recently installed/updated desktop and laptop and see that acpid is still present on both, so assume it's appropriate for X to continue to listen for them. I'm subbing Steve in hopes he understands this notification path better and can shed some light for us.

Revision history for this message
Steve Langasek (vorlon) wrote :

Why does the X server care about ACPI events at all, as opposed to input events?

Yes, if X still wants ACPI events, then we're dealing with acpid, for the nonce; I'm just surprised it should need to.

Revision history for this message
Bryce Harrington (bryce) wrote : Re: [Bug 496859] Re: *dm upstart job should depend on acpid because X tries to connect to acpid socket very soon after starting.

On Wed, Mar 10, 2010 at 07:10:18PM -0000, Steve Langasek wrote:
> Why does the X server care about ACPI events at all, as opposed to input
> events?

Legacy support?

> Yes, if X still wants ACPI events, then we're dealing with acpid, for
> the nonce; I'm just surprised it should need to.

I guess we could fairly easily just disable it and see if anything
breaks. I can do the patch but I'd like your direction on if this is
sane or not at this point in the release.

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Re: *dm upstart job should depend on acpid because X tries to connect to acpid socket very soon after starting.
Revision history for this message
Bryce Harrington (bryce) wrote :

Heh, I went to package that patch and discovered that I had looked at this patch once before in troubleshooting #439138, but the error message had been just a red herring. Notice especially starting with comment #32 on that bug report a proposal was made to add an acpid dependency but in further investigation this was identified as unnecessary.

That said, I don't have solid opinions one way or another as to whether to keep acpid support enabled in X or not. I no of no issues which would be caused or solved by this change. From what I understand of the code, X may issue this error message but it has timing code to try again later, so if acpid is just late coming up that's totally okay. And if acpid never comes up for whatever reason, it won't break X.

Guidance from Steve Langasek is "unless there's evidence that the change actually fixes something, I think it should be postponed to M". This seems a sensible plan.

Meanwhile, I've packaged the patch and stuck it in a PPA to make it easy for anyone who would like to do some testing with this:
https://edge.launchpad.net/~bryceharrington/+archive/yellow

Revision history for this message
Bryce Harrington (bryce) wrote : Re: acpid should be disabled from xorg-server (fedora patch)

Well, if it ain't broke....

Aside the confusing arising from the error message, I don't know of any tangible breakage that removing acpid would solve, so I'm going to leave it alone for now. I think this is a change we could put in for Lucid+1 to give maximum time to test it for regressions. I'll leave it a wishlist bug for now.

summary: - *dm upstart job should depend on acpid because X tries to connect to
- acpid socket very soon after starting.
+ acpid should be disabled from xorg-server (fedora patch)
Changed in xorg-server (Ubuntu):
status: Confirmed → Triaged
Bryce Harrington (bryce)
summary: - acpid should be disabled from xorg-server (fedora patch)
+ MASTER: acpid should be disabled from xorg-server (fedora patch)
Revision history for this message
Bryce Harrington (bryce) wrote :

It's been over a year without any indication of a problem that disabling acpid in xserver would solve, so I'm going to close this for now. If anyone can make a case for why to remove it, reopen this bug and let us know.

Changed in xorg-server (Ubuntu):
status: Triaged → Won't Fix
Revision history for this message
Bryce Harrington (bryce) wrote :

(Or if you can't reopen the bug since it's in state wontfix, please file a new bug against xorg-server.)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.