Hello community, here is the log from the commit of package xorg-x11-server for openSUSE:Factory checked in at Wed Jul 27 10:07:44 CEST 2011.
-------- --- xorg-x11-server/xorg-x11-server.changes 2011-05-26 17:09:09.000000000 +0200 +++ /mounts/work_src_done/STABLE/xorg-x11-server/xorg-x11-server.changes 2011-07-08 10:23:53.000000000 +0200 @@ -1,0 +2,137 @@ +Fri Jul 8 08:20:41 UTC 2011 - [email protected] + +- update: + * randr1_1-sig11.diff + removed accidentally forgotten debugging code. + * u_OS-acpi-Reconnect-to-acpid-when-it-gets-restarted.patch + made socket non-blocking. Idea taken from a pach for SLES11. + +------------------------------------------------------------------- +Thu Jul 7 16:02:13 UTC 2011 - [email protected] + +- don't look for 10-evdev.conf for anything older than 11.3 + (this includes SLE-11). + +------------------------------------------------------------------- +Thu Jul 7 10:10:34 UTC 2011 - [email protected] + +- remove use-last-screen.patch: + This patch has been rejected upstream. We will try to resolve + this issue differently by not providing any screen, monitor or + device section. + +------------------------------------------------------------------- +Thu Jul 7 10:08:05 UTC 2011 - [email protected] + +- remove disable-fbblt-opt.diff: + We are unable to reproduce this issue any more. + So let's remove the workaround and start from scratch + when issue resurfaces and find a proper fix. + +------------------------------------------------------------------- +Wed Jul 6 09:04:30 UTC 2011 - [email protected] + +- fixed bug-197858_dpms.diff: + removed pieces that have been solved differently today. + +------------------------------------------------------------------- +Wed Jul 6 07:48:17 UTC 2011 - [email protected] + +- remove moblin-use_preferred_mode_for_all_outputs.diff: + remove moblin specific patches. + +------------------------------------------------------------------- +Tue Jul 5 13:54:21 UTC 2011 - [email protected] + +- rename edit_data_sanity_check.diff -> edid_data_sanity_check.diff + +------------------------------------------------------------------- +Tue Jul 5 13:44:54 UTC 2011 - [email protected] + +- remove p_xkills_wrong_client.diff: + made obsolete by commit b7f3618f. + +------------------------------------------------------------------- +Tue Jul 5 12:45:46 UTC 2011 - [email protected] + +- remove xorg-server-1.8.0.diff: + issue is now resolved in spec file. + +------------------------------------------------------------------- +Tue Jul 5 05:11:47 UTC 2011 - [email protected] + +- fix zap_warning_fix.diff: + recover from noisy people. + +------------------------------------------------------------------- +Tue Jul 5 05:09:40 UTC 2011 - [email protected] + +- remove p_xorg_acpi.diff + add u_OS-acpi-Reconnect-to-acpid-when-it-gets-restarted.patch + removed redundant error message. + +------------------------------------------------------------------- +Mon Jul 4 17:01:40 UTC 2011 - [email protected] + +- remove mouse.diff: + Never understood what this patch was good for. + +------------------------------------------------------------------- +Mon Jul 4 16:58:46 UTC 2011 - [email protected] + +- remove p_bug96328.diff: + /dev/input/mice is the default mouse for X -configure + on Linux for a long time already. + +------------------------------------------------------------------- +Mon Jul 4 12:19:43 UTC 2011 - [email protected] + +- remove xephyr.diff: + solved by configure options in spec file. + +------------------------------------------------------------------- +Mon Jul 4 12:10:14 UTC 2011 - [email protected] + +- remove libdrm.diff: + not needed any more, drivers seem to be fixed. + +------------------------------------------------------------------- +Mon Jul 4 11:32:31 UTC 2011 - [email protected] + +- remove xorg-docs.diff: + solved in spec file. + +------------------------------------------------------------------- +Mon Jul 4 10:06:49 UTC 2011 - [email protected] + +- remove pixman.diff: + Doesn't seem to be needed any more. + +------------------------------------------------------------------- +Mon Jul 4 05:58:11 UTC 2011 - [email protected] + +- remove xorg-x11-nonroot-vesa.patch, org-server-nohwaccess.diff: + There are other things missing to make those patches useful. + +------------------------------------------------------------------- +Fri Jul 1 14:18:49 UTC 2011 - [email protected] + +- remove: xserver-1.6.1-nouveau.patch. + This patch was only cosmetic. + +------------------------------------------------------------------- +Fri Jul 1 13:41:18 UTC 2011 - [email protected] + +- remove: CVE-2010-2240-address_space_limit.patch + CVE-2010-2240-tree_depth_limit.patch + These security issues have been handled in the Linux kernel in a + much more general fashion. + +------------------------------------------------------------------- +Fri Jul 1 11:37:33 UTC 2011 - [email protected] + +- remove: bitmap_always_unscaled.diff + missing_font_paths.diff + This has now been solved in the spec file directly. + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- CVE-2010-2240-address_space_limit.patch CVE-2010-2240-tree_depth_limit.patch bitmap_always_unscaled.diff disable-fbblt-opt.diff edit_data_sanity_check.diff fpic.diff libdrm.diff missing_font_paths.diff moblin-use_preferred_mode_for_all_outputs.diff mouse.diff p_bug96328.diff p_xkills_wrong_client.diff p_xorg_acpi.diff pixman.diff use-last-screen.patch xephyr.diff xorg-docs.diff xorg-server-1.8.0.diff xorg-server-nohwaccess.diff xorg-server-option_libxf86config.diff xorg-x11-nonroot-vesa.patch xserver-1.6.1-nouveau.patch New: ---- edid_data_sanity_check.diff u_OS-acpi-Reconnect-to-acpid-when-it-gets-restarted.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xorg-x11-server.spec ++++++ --- /var/tmp/diff_new_pack.Vy6J8X/_old 2011-07-27 10:04:20.000000000 +0200 +++ /var/tmp/diff_new_pack.Vy6J8X/_new 2011-07-27 10:04:20.000000000 +0200 @@ -17,7 +17,6 @@ # norootforbuild -%define moblin 0 Name: xorg-x11-server %define dirsuffix 1.9.3 @@ -32,7 +31,7 @@ %endif Url: http://xorg.freedesktop.org/ Version: 7.6_%{dirsuffix} -Release: 29 +Release: 31 License: GPLv2+ ; MIT License (or similar) BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: System/X11/Servers/XF86_4 @@ -55,17 +54,10 @@ Source5: modprobe.nvidia Source7: xorg-docs-1.6.tar.bz2 Source8: xorg-backtrace -Patch1: fpic.diff Patch2: p_default-module-path.diff Patch6: pu_fixes.diff -Patch8: p_bug96328.diff -Patch13: p_xorg_acpi.diff -Patch14: p_xkills_wrong_client.diff +Patch13: u_OS-acpi-Reconnect-to-acpid-when-it-gets-restarted.patch Patch16: p_xnest-ignore-getimage-errors.diff -Patch23: disable-fbblt-opt.diff -Patch27: mouse.diff -Patch29: xephyr.diff -Patch36: libdrm.diff %if %vnc ### Dan Nicholson <[email protected]> #http://people.freedesktop.org/~dbn/xorg-server-xf4vnc.patch @@ -82,13 +74,10 @@ Patch51: xorg-server-xf4vnc-fix-keyboard-layout-handling.diff %endif Patch45: bug-197858_dpms.diff -Patch67: xorg-docs.diff Patch77: fbdevhw.diff -Patch79: edit_data_sanity_check.diff -Patch93: pixman.diff +Patch79: edid_data_sanity_check.diff Patch101: zap_warning_xserver.diff Patch103: confine_to_shape.diff -Patch104: bitmap_always_unscaled.diff Patch106: randr1_1-sig11.diff Patch112: fix-dpi-values.diff Patch123: vidmode-sig11.diff @@ -98,36 +87,24 @@ Patch129: bug474071-fix1.diff Patch143: autoconfig_fallback_fbdev_first.diff Patch145: driver-autoconfig.diff -Patch147: xserver-1.6.1-nouveau.patch Patch162: cache-xkbcomp-output-for-fast-start-up.patch Patch163: xserver-bg-none-root.patch Patch164: xorg-detect-psb.patch -Patch168: xorg-server-nohwaccess.diff -Patch169: xorg-x11-nonroot-vesa.patch Patch200: bug534768-prefer_local_symbols.patch Patch202: 0001-Check-harder-for-primary-PCI-device.patch Patch203: 0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch -Patch204: missing_font_paths.diff -Patch205: xorg-server-1.8.0.diff Patch206: fix_fglrx_screendepth_issue.patch -Patch207: xorg-server-option_libxf86config.diff Patch210: pio_ia64.diff Patch211: 0001-Prevent-XSync-Alarms-from-senslessly-calling-CheckTr.patch Patch213: xorg-server-xdmcp.patch -Patch217: CVE-2010-2240-address_space_limit.patch -Patch218: CVE-2010-2240-tree_depth_limit.patch Patch220: Use-external-tool-for-creating-backtraces-on-crashes.patch Patch221: commit-5c6a2f9.diff Patch222: sync-fix.patch -Patch223: use-last-screen.patch Patch224: pad-size-of-system-memory-copy-for-1x1-pixmaps Patch225: xorg-server-stop-cpu-eating.diff Patch226: record-avoid-crash-when-calling-RecordFlushReplyBuff.patch Patch227: Replace-malloc-with-calloc-to-initialize-the-buffers.patch Patch228: EXA-mixed-ModifyPixmapHeader-pitch-fixes.-bug-33929.patch -%if %moblin -Patch300: moblin-use_preferred_mode_for_all_outputs.diff -%endif %description This package contains the X.Org Server. @@ -187,17 +164,10 @@ %prep %setup -q -n xorg-server-%{dirsuffix} -a4 -a7 -%patch1 %patch2 %patch6 -%patch8 -p0 -%patch13 -%patch14 +%patch13 -p1 %patch16 -p2 -%patch23 -%patch27 -%patch29 -%patch36 -p0 %if %vnc %patch39 -p1 %patch40 -p0 @@ -214,14 +184,11 @@ %endif %patch45 -p0 pushd xorg-docs-* -%patch67 popd %patch77 %patch79 -p1 -%patch93 %patch101 -p1 %patch103 -%patch104 -p1 %patch106 -p1 %patch112 -p0 %patch123 -p0 @@ -233,37 +200,25 @@ popd %patch143 -p0 %patch145 -p0 -%patch147 -p1 %patch162 -p1 %patch163 -p1 %patch164 -p1 -%patch168 -p1 -%patch169 -p1 %patch200 -p1 %patch202 -p1 %patch203 -p1 -%patch204 -p0 -%patch205 -p0 %patch206 -p0 -%patch207 -p0 %patch210 -p1 %patch211 -p1 %patch213 -p1 -%patch217 -p1 -%patch218 -p1 # Disable backtrace generation patch for now #%patch220 -p1 %patch221 -p1 %patch222 -p1 -%patch223 -p1 %patch224 -p1 %patch225 -p1 %patch226 -p1 %patch227 -p1 %patch228 -p1 -%if %moblin -%patch300 -p1 -%endif %build pushd xorg-docs-* @@ -285,6 +240,8 @@ --enable-kdrive \ --enable-kdrive-evdev \ --enable-xephyr \ + --disable-xfake \ + --disable-xfbdev \ --enable-record \ --enable-xcsecurity \ --with-sha1=libcrypto \ @@ -305,7 +262,12 @@ --with-os-vendor="SUSE LINUX" \ --with-fontrootdir="/usr/share/fonts" \ --with-xkb-path="/usr/share/X11/xkb" \ - --with-xkb-output="/var/lib/xkb/compiled" + --with-xkb-output="/var/lib/xkb/compiled" \ + --with-default-font-path="/usr/share/fonts/misc:unscaled,\ +/usr/share/fonts/Type1/,/usr/share/fonts/100dpi:unscaled,\ +/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/URW/,\ +/usr/share/fonts/cyrillic:unscaled,\ +/usr/share/fonts/truetype/,built-ins" make %{?jobs:-j %jobs} make -C hw/kdrive %{?jobs:-j %jobs} @@ -324,6 +286,12 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/X11 ln -snf ../../../usr/bin/Xorg $RPM_BUILD_ROOT/var/lib/X11/X ln -snf ../../var/lib/X11/X $RPM_BUILD_ROOT/usr/bin/X +%if %suse_version > 1120 +%ifnarch s390 s390x +mkdir -p $RPM_BUILD_ROOT/etc/X11/xorg.conf.d +cp $RPM_BUILD_ROOT/%{_datadir}/X11/xorg.conf.d/10-evdev.conf $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/ +%endif +%endif mkdir -p $RPM_BUILD_ROOT/usr/%{_lib}/xorg/modules/updates/{fonts,input,linux,drivers,multimedia,extensions} install -m 644 $RPM_SOURCE_DIR/README.updates $RPM_BUILD_ROOT/usr/%{_lib}/xorg/modules/updates mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d @@ -394,6 +362,9 @@ %ifnarch s390 s390x %if %suse_version > 1120 %dir /etc/X11/xorg.conf.d +%config(noreplace) /etc/X11/xorg.conf.d/10-evdev.conf +%dir %{_datadir}/X11/xorg.conf.d +%{_datadir}/X11/xorg.conf.d/10-evdev.conf %endif %dir /etc/modprobe.d %dir /var/lib/X11 @@ -403,15 +374,17 @@ %dir /usr/%{_lib}/xorg /usr/%{_lib}/xorg/protocol.txt %{_mandir}/man1/* +%{_mandir}/man7/* +%doc %{_datadir}/doc/xorg-docs/ %exclude %{_mandir}/man1/Xdmx.1* %exclude %{_mandir}/man1/Xephyr.1* %exclude %{_mandir}/man1/Xnest.1* -%{_mandir}/man7/* +%exclude %{_mandir}/man7/Standards.7* +%exclude %{_mandir}/man7/Consortium.7* +%exclude %{_mandir}/man7/XProjectTeam.7* +%exclude %{_mandir}/man7/XOrgFoundation.7* /var/lib/xkb/compiled/README.compiled %ifnarch s390 s390x -%if %suse_version > 1120 -/etc/X11/xorg.conf.d/10-evdev.conf -%endif /etc/modprobe.d/50-nvidia.conf %verify(not mode) /usr/bin/Xorg /usr/bin/X ++++++ bug-197858_dpms.diff ++++++ --- /var/tmp/diff_new_pack.Vy6J8X/_old 2011-07-27 10:04:20.000000000 +0200 +++ /var/tmp/diff_new_pack.Vy6J8X/_new 2011-07-27 10:04:20.000000000 +0200 @@ -67,39 +67,3 @@ return ih; } ---- os/WaitFor.c -+++ os/WaitFor.c -@@ -142,6 +142,7 @@ - * For more info on ClientsWithInput, see ReadRequestFromClient(). - * pClientsReady is an array to store ready client->index values into. - *****************/ -+volatile fd_set tmp_set; - - int - WaitForSomething(int *pClientsReady) -@@ -279,10 +280,9 @@ - if (expired) - return 0; - } -- } -+ } - else -- { -- fd_set tmp_set; -+ { - - if (*checkForInput[0] == *checkForInput[1]) { - if (timers) -@@ -317,6 +317,12 @@ - QueueWorkProc(EstablishNewConnections, NULL, - (pointer)&LastSelectMask); - -+#ifdef DPMSExtension -+ XFD_ANDSET(&tmp_set, &devicesReadable, &EnabledDevices); -+ if (XFD_ANYSET (&tmp_set) && (DPMSPowerLevel != DPMSModeOn)) -+ DPMSSet(serverClient, DPMSModeOn); -+#endif -+ - if (XFD_ANYSET (&devicesReadable) || XFD_ANYSET (&clientsReadable)) - break; - /* check here for DDXes that queue events during Block/Wakeup */ ++++++ edid_data_sanity_check.diff ++++++ Index: xorg-server-1.6.3.901/hw/xfree86/modes/xf86Crtc.c ================================================================================ --- xorg-server-1.7.99/hw/xfree86/modes/xf86Crtc.c +++ xorg-server-1.7.99/hw/xfree86/modes/xf86Crtc.c @@ -2916,8 +2916,14 @@ p->output->MonInfo->features.vsize); if (det_mon->type == DT && det_mon->section.d_timings.h_size != 0 && - det_mon->section.d_timings.v_size != 0) { - + det_mon->section.d_timings.v_size != 0 && + det_mon->section.d_timings.v_size != 0 && + /* some sanity checking for aspect ration */ + ((det_mon->section.d_timings.h_size / + det_mon->section.d_timings.v_size) < 2) && + ((det_mon->section.d_timings.v_size / + det_mon->section.d_timings.h_size) < 2) + ) { p->output->mm_width = det_mon->section.d_timings.h_size; p->output->mm_height = det_mon->section.d_timings.v_size; p->ret = TRUE; ++++++ u_OS-acpi-Reconnect-to-acpid-when-it-gets-restarted.patch ++++++ >From 142ba992065dd9c37a9d06dc6e96cfc9adfb6be0 Mon Sep 17 00:00:00 2001 From: Egbert Eich <[email protected]> Date: Tue, 5 Jul 2011 06:56:43 +0200 Subject: [PATCH] OS/acpi: Reconnect to acpid when it gets restarted. Patch-mainline: To be upstreamed On Linux the Xserver connects to the ACPI daemon to receive power management events. If this daemon isn't started when the server starts or goes down the connection is lost. When this happens we add a timer which periodically tries to reconnect. Signed-off-by: Egbert Eich <[email protected]> --- hw/xfree86/os-support/linux/lnx_acpi.c | 68 ++++++++++++++++++++++++++----- hw/xfree86/os-support/linux/lnx_apm.c | 9 ++++ 2 files changed, 66 insertions(+), 11 deletions(-) diff --git a/hw/xfree86/os-support/linux/lnx_acpi.c b/hw/xfree86/os-support/linux/lnx_acpi.c index 5fad194..8dd6881 100644 --- a/hw/xfree86/os-support/linux/lnx_acpi.c +++ b/hw/xfree86/os-support/linux/lnx_acpi.c @@ -32,9 +32,12 @@ #define ACPI_VIDEO_HEAD_INVALID (~0u - 1) #define ACPI_VIDEO_HEAD_END (~0u) +static PMClose doLnxACPIOpen(void); static void lnxCloseACPI(void); static pointer ACPIihPtr = NULL; +static OsTimerPtr acpiTimer = NULL; PMClose lnxACPIOpen(void); +PMClose lnxACPIPoll(void); /* in milliseconds */ #define ACPI_REOPEN_DELAY 1000 @@ -52,6 +55,22 @@ lnxACPIReopen(OsTimerPtr timer, CARD32 time, pointer arg) #define LINE_LENGTH 80 +static CARD32 +lnxACPICheckTimer(OsTimerPtr timer, CARD32 now, pointer arg) +{ +#if DEBUG + ErrorF("ACPI: trying to reopen\n"); +#endif + if (doLnxACPIOpen()) { +#if DEBUG + ErrorF("ACPI: successfully reopened\n"); +#endif + acpiTimer = NULL; + return 0; + } + return 10000; +} + static int lnxACPIGetEventFromOs(int fd, pmEvent *events, int num) { @@ -127,33 +146,35 @@ lnxACPIConfirmEventToOs(int fd, pmEvent event) } } -PMClose -lnxACPIOpen(void) +static PMClose +doLnxACPIOpen(void) { - int fd; + int fd = -1; struct sockaddr_un addr; int r = -1; static int warned = 0; - DebugF("ACPI: OSPMOpen called\n"); if (ACPIihPtr || !xf86Info.pmFlag) return NULL; DebugF("ACPI: Opening device\n"); - if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) > -1) { + fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (fd > -1) { memset(&addr, 0, sizeof(addr)); addr.sun_family = AF_UNIX; strcpy(addr.sun_path, ACPI_SOCKET); - if ((r = connect(fd, (struct sockaddr*)&addr, sizeof(addr))) == -1) { - if (!warned) + r = connect(fd, (struct sockaddr*)&addr, sizeof(addr)); + if (r == -1) { + if (errno != warned) xf86MsgVerb(X_WARNING,3,"Open ACPI failed (%s) (%s)\n", ACPI_SOCKET, strerror(errno)); - warned = 1; - shutdown(fd, 2); + warned = errno; + shutdown(fd, SHUT_RDWR); close(fd); return NULL; } - } + } else + return NULL; xf86PMGetEventFromOs = lnxACPIGetEventFromOs; xf86PMConfirmEventToOs = lnxACPIConfirmEventToOs; @@ -164,6 +185,25 @@ lnxACPIOpen(void) return lnxCloseACPI; } +PMClose +lnxACPIPoll(void) +{ + TimerSet(NULL, 0, 10000, lnxACPICheckTimer, NULL); + return lnxCloseACPI; +} + +PMClose +lnxACPIOpen(void) +{ + PMClose ret; +#ifdef DEBUG + ErrorF("ACPI: OSPMOpen called\n"); +#endif + ret = doLnxACPIOpen(); + + return ret; +} + static void lnxCloseACPI(void) { @@ -172,8 +212,14 @@ lnxCloseACPI(void) DebugF("ACPI: Closing device\n"); if (ACPIihPtr) { fd = xf86RemoveGeneralHandler(ACPIihPtr); - shutdown(fd, 2); + shutdown(fd, SHUT_RDWR); close(fd); ACPIihPtr = NULL; + xf86PMGetEventFromOs = NULL; + xf86PMConfirmEventToOs = NULL; + if (acpiTimer) { + TimerCancel(acpiTimer); + acpiTimer = NULL; + } } } diff --git a/hw/xfree86/os-support/linux/lnx_apm.c b/hw/xfree86/os-support/linux/lnx_apm.c index 54c6989..c8b254f 100644 --- a/hw/xfree86/os-support/linux/lnx_apm.c +++ b/hw/xfree86/os-support/linux/lnx_apm.c @@ -12,6 +12,7 @@ #ifdef HAVE_ACPI extern PMClose lnxACPIOpen(void); +extern PMClose lnxACPIPoll(void); #endif #ifdef HAVE_APM @@ -149,6 +150,14 @@ xf86OSPMOpen(void) ret = lnxAPMOpen(); #endif +#ifdef HAVE_ACPI + /* if we can neither open ACPI nor APM poll for an ACPI service to + become available */ + + if (!ret && !xf86acpiDisableFlag) + ret = lnxACPIPoll(); +#endif + return ret; } -- 1.6.0.2 >From 3f35d15f7c7eb202de36e2d1040f27ef7b38c1d2 Mon Sep 17 00:00:00 2001 From: Egbert Eich <[email protected]> Date: Thu, 7 Jul 2011 09:01:35 +0200 Subject: [PATCH] OS/ACPI: Make socket to read from acpid non-blocking. If acpid for some reason does not service a connect() this function may hang forever stalling the Xserver. To prevent this make the socket non-blocking. If connect returns EINPROGRESS use select() and getsockopt() to check for completion of the connect request. select() gets a different timeout depending if it is called during startup or to do a reconnect. Signed-off-by: Egbert Eich <[email protected]> --- hw/xfree86/os-support/linux/lnx_acpi.c | 34 +++++++++++++++++++++++++++---- 1 files changed, 29 insertions(+), 5 deletions(-) diff --git a/hw/xfree86/os-support/linux/lnx_acpi.c b/hw/xfree86/os-support/linux/lnx_acpi.c index 8dd6881..f0e6eb4 100644 --- a/hw/xfree86/os-support/linux/lnx_acpi.c +++ b/hw/xfree86/os-support/linux/lnx_acpi.c @@ -32,7 +32,7 @@ #define ACPI_VIDEO_HEAD_INVALID (~0u - 1) #define ACPI_VIDEO_HEAD_END (~0u) -static PMClose doLnxACPIOpen(void); +static PMClose doLnxACPIOpen(struct timeval *); static void lnxCloseACPI(void); static pointer ACPIihPtr = NULL; static OsTimerPtr acpiTimer = NULL; @@ -58,10 +58,11 @@ lnxACPIReopen(OsTimerPtr timer, CARD32 time, pointer arg) static CARD32 lnxACPICheckTimer(OsTimerPtr timer, CARD32 now, pointer arg) { + struct timeval timeval = { 0, 0 }; #if DEBUG ErrorF("ACPI: trying to reopen\n"); #endif - if (doLnxACPIOpen()) { + if (doLnxACPIOpen(&timeval)) { #if DEBUG ErrorF("ACPI: successfully reopened\n"); #endif @@ -147,7 +148,7 @@ lnxACPIConfirmEventToOs(int fd, pmEvent event) } static PMClose -doLnxACPIOpen(void) +doLnxACPIOpen(struct timeval *tv_p) { int fd = -1; struct sockaddr_un addr; @@ -158,13 +159,34 @@ doLnxACPIOpen(void) return NULL; DebugF("ACPI: Opening device\n"); - fd = socket(AF_UNIX, SOCK_STREAM, 0); + fd = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0); if (fd > -1) { memset(&addr, 0, sizeof(addr)); addr.sun_family = AF_UNIX; strcpy(addr.sun_path, ACPI_SOCKET); r = connect(fd, (struct sockaddr*)&addr, sizeof(addr)); if (r == -1) { + int sock_errno = errno; + if (sock_errno == EINPROGRESS) { + fd_set fds; + int result; + do { + FD_ZERO(&fds); + FD_SET(fd, &fds); + result = select(fd + 1, NULL, &fds, NULL, tv_p); + } while (result < 0 && errno == EINTR); + if (result < 0) + sock_errno = errno; + else if (result > 0) { + int sock_errno; + socklen_t size = sizeof(sock_errno); + if (0 > getsockopt(fd, SOL_SOCKET, SO_ERROR, &sock_errno, + &size)) + sock_errno = errno; + if (!sock_errno) + goto success; + } + } if (errno != warned) xf86MsgVerb(X_WARNING,3,"Open ACPI failed (%s) (%s)\n", ACPI_SOCKET, strerror(errno)); @@ -176,6 +198,7 @@ doLnxACPIOpen(void) } else return NULL; + success: xf86PMGetEventFromOs = lnxACPIGetEventFromOs; xf86PMConfirmEventToOs = lnxACPIConfirmEventToOs; ACPIihPtr = xf86AddGeneralHandler(fd,xf86HandlePMEvents,NULL); @@ -196,10 +219,11 @@ PMClose lnxACPIOpen(void) { PMClose ret; + struct timeval timeval = { 0, 30000 }; #ifdef DEBUG ErrorF("ACPI: OSPMOpen called\n"); #endif - ret = doLnxACPIOpen(); + ret = doLnxACPIOpen(&timeval); return ret; } -- 1.7.3.4 ++++++ zap_warning_xserver.diff ++++++ --- /var/tmp/diff_new_pack.Vy6J8X/_old 2011-07-27 10:04:21.000000000 +0200 +++ /var/tmp/diff_new_pack.Vy6J8X/_new 2011-07-27 10:04:21.000000000 +0200 @@ -44,7 +44,7 @@ + gettimeofday(&NewZap, NULL); + + if ((NewZap.tv_sec - LastZap.tv_sec) >= 2) { -+ xf86OSRingBell(100, 1000, 500); ++ xf86OSRingBell(30, 1000, 50); + LastZap = NewZap; + break; + } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
