BOINC / boinc

Open-source software for volunteer computing and grid computing.
https://boinc.berkeley.edu
GNU Lesser General Public License v3.0
2.02k stars 446 forks source link

[PATCH] user activity detection inoperative on Linux #442

Closed romw closed 9 years ago

romw commented 9 years ago

Reported by fthomas on 9 Nov 37845619 09:46 UTC Hi,

Since r13948 HOST_INFO::users_idle() in client/hostinfo_unix.C always returns true on Debian Linux and therefore the client doesn't suspend computation while the user is active (neither mouse nor keyboard activity is recognized). I compiled 5.10.27 with the previous HOST_INFO::users_idle() but all the #ifdefs removed and the resulting client suspends computation when the keyboard is used but doesn't suspend when the mouse is used. I thought this is because there is no /dev/mouse on my system, only /dev/input/mice and /dev/input/mouse0, but using both device files in HOST_INFO::users_idle() doesn't get computation suspending working when the mouse is used.

Gre,[[BR]] Frank

My global_prefs_override.xml contains the following relevant settings:

<global_preferences>
  ...
  <run_if_user_active>0</run_if_user_active>
  <idle_time_to_run>1.000000</idle_time_to_run>
  ...
</global_preferences>

Migrated-From: http://boinc.berkeley.edu/trac/ticket/463

romw commented 9 years ago

Commented by fthomas on 15 May 37854791 19:06 UTC BTW: The part about not detecting mouse activity was also reported in #71 and #359. Ticket #71 was closed because of r13948, but as I said above this change does not fix the issue with broken mouse activity detection. Maybe #71 should be reopened?

romw commented 9 years ago

Commented by fthomas on 5 Apr 37920943 06:40 UTC Alex Malinovich confirmed independently from me that r13948 broke keyboard detection on Debian GNU/Linux, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=448982#26.

romw commented 9 years ago

Commented by fthomas on 22 Jun 37921026 19:06 UTC I've just tested the official ''5.10.28 Development version (Ubuntu Release - standard GUI)'' build from boinc.berkeley.edu and as expected it also does not detect keyboard and mouse activity on Debian GNU/Linux.

romw commented 9 years ago

Commented by davea on 14 Aug 37922262 20:26 UTC (In [14346]) - client: hopefully fix keyboard input detection on Linux (may fix #463)

romw commented 9 years ago

Commented by fthomas on 1 Apr 37923265 13:20 UTC I've applied r14346 to 5.10.30 and built it, but keyboard input detection is still broken.

romw commented 9 years ago

Commented by davea on 3 Dec 37985437 09:46 UTC I don't have a desktop Debian system to test on; Frank, would you be able to debug this? (it should be something fairly simple)

romw commented 9 years ago

Commented by fthomas on 21 Feb 37997405 21:46 UTC Ok, here is what I found out. Negating check_all_logins results in the client suspending computation when there is activity on a terminal:

--- a/client/hostinfo_unix.C
+++ b/client/hostinfo_unix.C
@@ -965,7 +965,7 @@ bool HOST_INFO::users_idle(bool check_all_logins, double idl
     time_t idle_time = time(0) - (long) (60 * idle_time_to_run);

 #ifdef HAVE_UTMP_H
-    if (check_all_logins) {
+    if (!check_all_logins) {
         if (!all_logins_idle(idle_time)) return false;
     }
 #endif

Where activity on a terminal means either opening a terminal or typing something into a terminal. The client does not suspend when there is general keyboard activity, typing a URL into !FireFox's location bar for example. With this change boinc behaves as before r13948. Was the check_all_logins parameter in function calls of users_idle() changed after r13948?

The device_idle(idle_time, "/dev/mouse") and device_idle(idle_time, "/dev/kbd") calls always return true on Debian GNU/Linux because there are no such device files (as I said in my initial report). They would be useless even if the device is changed to /dev/input/mouse0 (which exists on Debian) because its atime (time of last access) is always the time as the system booted up. My /dev is handled by udev, I don't know if the device's atime is updated, when udev is not used.

BTW: All tests were performed with the current code in trunk/boinc/.

romw commented 9 years ago

Commented by davea on 9 Aug 37998501 10:40 UTC (In [14449]) - Partly fix keyboard detection on Linux. With this change, we detect opening a terminal or typing into a terminal; we don't detect typing into other applications. (from Frank Thomas). Partly fixes #463

romw commented 9 years ago

Commented by oteodoro on 30 Jul 38013028 12:00 UTC On my computer, Boinc segfaults on me when i pass --check_all_logins to boinc_client. The mouse fails to work also when I unpatched parts of the r13948 code. I created a patch for Linux to detect input mouse events from /dev/input/mouse0 which requires the CONFIG_INPUT_EVDEV kernel option. As of now, with this patch, both my keyboard and mouse events kill the project process and also the segfault gets avoided. It was patched against 5.8.28.

Tests that produced segfaults: 6.1.5 (trunk) fail, 5.10.29 fail, 5.10.28 fail, 5.10.27 fail, 5.10.26 good, 5.10.25 good, 5.10.21 good

romw commented 9 years ago

Commented by oteodoro on 4 Apr 38013030 22:13 UTC i mean 5.10.28

romw commented 9 years ago

Commented by oteodoro on 16 Apr 38013039 12:53 UTC the attachment didn't put the headers :( ill insert here

--- client/client_state.C.orig  2008-01-04 21:03:14.000000000 -0800
+++ client/client_state.C   2008-01-04 20:53:06.000000000 -0800
@@ -34,6 +34,10 @@
 #endif
 #endif

+#ifdef linux
+#include <sys/fcntl.h>
+#endif
+
 #include "parse.h"
 #include "str_util.h"
 #include "util.h"
@@ -125,6 +129,19 @@
     launched_by_manager = false;
     initialized = false;
     last_wakeup_time = dtime();
+#ifdef linux
+    mouse_moved = true;
+    mouse_event_t = time(NULL);
+    mouse_fd = open("/dev/input/mouse0", O_RDONLY);
+#endif    
+}
+
+CLIENT_STATE::~CLIENT_STATE()
+{
+#ifdef linux
+    if(mouse_fd != -1)
+        close(mouse_fd);
+#endif
 }

 void CLIENT_STATE::show_host_info() {
@@ -414,6 +431,10 @@
        http_ops->get_fdset(curl_fds);
         all_fds = curl_fds;
         gui_rpcs.get_fdset(gui_rpc_fds, all_fds);
+#ifdef linux
+        FD_SET(mouse_fd, &all_fds.read_fds);
+        if (mouse_fd > all_fds.max_fd) all_fds.max_fd = mouse_fd;
+#endif        
         double_to_timeval(x, tv);
         n = select(
             all_fds.max_fd+1,
@@ -429,6 +451,17 @@

         http_ops->got_select(all_fds, x);
         gui_rpcs.got_select(all_fds);
+#ifdef linux
+        if (mouse_fd != -1) {
+            if (FD_ISSET(mouse_fd, &all_fds.read_fds)) {
+                char ps2_packet[3]; //assume ps/2 mouse protocol 3 byte packet
+                if(read(mouse_fd, ps2_packet, 3) == 3) {
+                    mouse_moved = true;
+                    mouse_event_t = time(NULL);
+                }
+            }
+        }
+#endif

         if (n==0) break;

@@ -496,6 +529,10 @@
 #ifdef __APPLE__
          , &idletime
 #endif
+#ifdef linux
+         , &mouse_moved
+         , mouse_event_t
+#endif
     );

     if (user_active != old_user_active) {
--- client/client_state.h.orig  2008-01-04 21:03:14.000000000 -0800
+++ client/client_state.h   2008-01-04 19:58:12.000000000 -0800
@@ -213,6 +213,7 @@
 // --------------- client_state.C:
 public:
     CLIENT_STATE();
+    ~CLIENT_STATE();    
     void show_host_info();
     int init();
     bool poll_slow_events();
@@ -243,6 +244,11 @@
     bool garbage_collect_always();
     bool update_results();
     int nresults_for_project(PROJECT*);
+#ifdef linux
+    int mouse_fd;
+    bool mouse_moved;
+    time_t mouse_event_t;
+#endif

 // --------------- cpu_sched.C:
 private:
--- client/hostinfo_unix.C.orig 2008-01-04 21:03:14.000000000 -0800
+++ client/hostinfo_unix.C  2008-01-04 19:58:12.000000000 -0800
@@ -946,6 +946,24 @@
     return (idleTime > (60 * idle_time_to_run));
 }

+#elif linux
+
+bool HOST_INFO::users_idle(bool check_all_logins, double idle_time_to_run, bool* mouse_moved, time_t mouse_event_t) {
+    time_t cur_time = time(NULL);
+    time_t idle_time = cur_time - (long) (60 * idle_time_to_run);
+    if (mouse_event_t != 0) {
+        if (mouse_moved && mouse_event_t < idle_time)
+            *mouse_moved = false;
+    }
+
+    bool idle_result = true;
+#ifdef HAVE_UTMP_H
+    idle_result = idle_result && all_logins_idle(idle_time);
+#endif
+    idle_result = idle_result && (mouse_moved ? !*mouse_moved : true);
+    return idle_result;
+}
+
 #else  // ! __APPLE__

 bool HOST_INFO::users_idle(bool check_all_logins, double idle_time_to_run) {
--- lib/hostinfo.h.orig 2008-01-04 21:03:21.000000000 -0800
+++ lib/hostinfo.h  2008-01-04 19:58:12.000000000 -0800
@@ -72,6 +72,8 @@
     bool host_is_running_on_batteries();
 #ifdef __APPLE__
     bool users_idle(bool check_all_logins, double idle_time_to_run, double *actual_idle_time=NULL);
+#elif linux
+    bool users_idle(bool check_all_logins, double idle_time_to_run, bool* mouse_moved = NULL, time_t mouse_event_t = 0);
 #else
     bool users_idle(bool check_all_logins, double idle_time_to_run);
 #endif
--- checkin_notes.orig  2008-01-04 21:03:32.000000000 -0800
+++ checkin_notes   2008-01-04 19:58:12.000000000 -0800
@@ -7985,3 +7985,13 @@
     mac_installer/
         release_boinc.sh
         release_GridRepublic.sh
+
+Orson Teodoro 04 Jan 2008
+    - Linux: Input event mouse idle detection and segfault fix
+    client/
+        client_state.C
+        client_state.h
+        hostinfo_unix.C
+        main.C
+    lib/
+        hostinfo.h
romw commented 9 years ago

Commented by davea on 29 Aug 38023132 07:33 UTC Ideally I'd like a simpler/smaller fix (e.g., not involving changes to client_state.C).

I think the same thing could be done entirely within one function, using a static fd variable, and using non-blocking I/O instead of select()

romw commented 9 years ago

Commented by fthomas on 17 May 38039293 08:00 UTC Replying to fthomas (myself):

Ok, here is what I found out. Negating check_all_logins results in the client suspending computation when there is activity on a terminal: ... With this change boinc behaves as before r13948. Was the check_all_logins parameter in function calls of users_idle() changed after r13948?

I just found out that the client has the --check_all_logins option which sets the boolean CLIENT_STATE::check_all_logins to true if the client is started with it. Now if one starts the client with --check_all_logins activity detection will fail because of r14449. Instead of applying r14449 the BOINC client should be rather started with the --check_all_logins option, right? But what I don't understand is why activity detection worked before r13948 and without the --check_all_logins option, because the assignment of CLIENT_STATE::check_all_logins did not changed. Probably the use of --check_all_logins prior to r13948 also broke activity detection.

romw commented 9 years ago

Commented by fthomas on 31 Mar 38274125 00:53 UTC I've just toyed with Linux event interface to check for user input (from any input device) and this code snippet is the result:

#include <cstdio>
#include <ctime>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

#include <linux/input.h>

#define EVENT_DEVICES 32
static int fd[time_t last_event = time(NULL);

void open_event_devs() {
    char event_dev[32](EVENT_DEVICES];
static);

    for (int i = 0; i < EVENT_DEVICES; i++) {
        sprintf(event_dev, "/dev/input/event%i", i);
        fd[= open(event_dev, O_RDONLY|O_NONBLOCK);
    }
}

bool event_devs_idle(time_t t) {
    struct input_event ev;
    bool retval = true;

    if (last_event > t) return false;

    for (int i = 0; i < EVENT_DEVICES; i++) {
        if (fd[i](i]) == -1)
            continue;
        if (read(fd[i], &ev, sizeof(struct input_event)) < 0)
            continue;
        if (ev.time.tv_sec > t) {
            last_event = ev.time.tv_sec;
            retval = false;
        }
    }
    return retval;
}

int main(int argc, char** argv) {
    open_event_devs();

    while (1) {
        time_t idle_time = time(NULL) - 3;
        if (event_devs_idle(idle_time))
            printf("OOO System is idle...\n");
        else
            printf("XXX User is active...\n");
        usleep(500000);
    }
    return 0;
}

This seems to work but the problem with /dev/input/event%i is that they are normally only readable by root (as well as other files in /dev/input/). So probably my code example or oteodoro's patch are NOT applicable to solve this problem.

BTW: Some documentation about the Linux event interface is available here: http://www.frogmouth.net/hid-doco/x401.html
http://www.frogmouth.net/hid-doco/c537.html

romw commented 9 years ago

Commented by Ageless on 31 Jan 38280289 08:00 UTC Reopening to allow others to add comments, if necessary. This thread on the BOINC Dev forums shows it isn't working in 5.10.45

I'll update the milestone as well. But is there any solution in sight before the release of BOINC 6.2?

romw commented 9 years ago

Commented by Dagorath on 5 Feb 38280608 12:53 UTC It isn't just Debian, it's broke on Fedora 8/7/5 too.

I can appreciate the fact that volunteers working on this problem have families and jobs as their top priority. All of us appreciate the tremendous effort you volunteers put forth and wish we had the skills/knowledge to help out. I hope this problem can be given a little more attention than it has been given because it seems a lot of people are turning to Linux as Vista proves to be just another M$ scam. BOINC does a pretty decent job of living off spare CPU cycles but not always, probably due to badly designed/written science apps, etc. Therefore we have a backup... BOINC can be configured to suspend apps on keyboard/mouse activity. That backup absolutely **must** work on **all** platforms or BOINC will acquire the reputation for being a resource hog. Users will **not** overlook that sin and software reviewers and bloggers will spread the word if the problem continues. My Fedora 8 and 5 hosts are at the disposal of anybody who needs to test fixes for this problem. Contact me direct at dagorath at shaw dot ca if it helps.
romw commented 9 years ago

Commented by fthomas on 23 Mar 38287393 03:06 UTC Heureka! I think I've found a possible solution for this problem by reading the /proc/interrupts file and counting the interrupts of the keyboard, mouse or a PS/2 device (but not of an USB HID). If the mouse is moved or a keystroke happens the interrupts counter is increased and activity can then be detected. And since /proc/interrupts is normally world-readable, file permissions are also not a problem. Here is the code:

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <unistd.h>

FILE* f;
long irq_count[interrupts_idle(time_t t) {
    static time_t last_irq = time(NULL);
    char line[256](256];

bool);
    int i = 0;
    long ccount = 0;

    rewind(f);
    while (fgets(line, sizeof(line), f)) {
        // Check for mouse, keyboard and PS/2 devices.
        if (strcasestr(line, "mouse") != NULL ||
            strcasestr(line, "keyboard") != NULL ||
            strcasestr(line, "i8042") != NULL) {
            // If any IRQ count changed, update last_irq.
            if (sscanf(line, "%d: %ld", &i, &ccount) == 2 &&
                irq_count[!= ccount) {
                last_irq = time(NULL);
                irq_count[i](i]) = ccount;
            }
        }
    }
    return last_irq < t ? true : false;
}

int main(int argc, char** argv) {
    f = fopen("/proc/interrupts", "r");
    if (! f)
        exit(1);

    while (1) {
        time_t idle_time = time(NULL) - 3;
        if (interrupts_idle(idle_time))
            printf("OOO System is idle...\n");
        else
            printf("XXX User is active...\n");
        usleep(500000);
    }
    exit(0);
}

BTW: Can somebody (with the required permissions) please change the title of this ticket to "user activity detection partially inoperative on Linux", thanks.

romw commented 9 years ago

Commented by fthomas on 26 Feb 38287546 14:40 UTC Ok, I've just added the file interrupts_idle.patch which adds interrupts_idle() to client/hostinfo_unix.C. It seems to work fine for me. David, can you please test it and maybe improve the code.

romw commented 9 years ago

Commented by davea on 22 Mar 38288677 00:53 UTC I checked in the interrupts_idle() code.

Should we get rid of the other checks (e.g., all_tty_idle(), device_idle())?

romw commented 9 years ago

Commented by Nicolas on 27 Sep 38288696 16:00 UTC [15049]: improved user idle checking on Linux

Nobody said it's completely fixed, though :)

romw commented 9 years ago

Commented by Nicolas on 20 Mar 38288697 06:40 UTC Fix title.

romw commented 9 years ago

Commented by fthomas on 3 Nov 38290001 21:46 UTC Replying to davea:

I checked in the interrupts_idle() code.

Thanks. I noticed that other functions that read from files under /proc are guarded by "#if LINUX_LIKE_SYSTEM". Should the interrupts_idle() call be guarded by this too? I also want to note that interrupts_idle() will always return false when it is first called. That means that boinc_client after it has been started always assumes that the user is not idle.

Should we get rid of the other checks (e.g., all_tty_idle(), device_idle())?

At least all_logins_idle() and all_tty_idle() should stay because interrupts_idle() will not detect activity from a remote login.

The question is if there are other systems where device_idle() works but interrupts_idle() not. Do other Unix-like systems even have /proc/interrupts? (According to http://en.wikipedia.org/wiki/Procfs /proc/interrupts seems to be a Linux extension)

romw commented 9 years ago

Commented by Dagorath on 19 Sep 38755928 04:53 UTC Are we sliding backwards on this issue? In BOINC 6.2.15 on Linux Fedora 5 and 6.2.14 on Fedora 9, BOINC fails to detect typing in a terminal. I was under the impression that much was working.

romw commented 9 years ago

Commented by davea on 9 Sep 38756795 07:06 UTC My test results on FC9 with 6.3.12:

PS/2 keyboard: detected PS/2 mouse: detected USB keyboard: detected USB mouse: not detected

Any ideas on how to detect USB mouse?

romw commented 9 years ago

Commented by Pepo on 16 Mar 38812829 01:20 UTC As it actually belongs here too (although it does not solve the issue BOINC-side, but is hopefully the right shot):

According to Rom Walton:

This may explain why we run across the keyboard and mouse activity detection in Linux every once and while: [http://www.cs.wisc.edu/condor/kernel.patch.html

Distributions that rely on the Linux 2.4.x and all Linux 2.6.x kernels through version 2.6.10, do not modify the atime of the input device file. ... The problem manifests itself in that Condor cannot properly detect console USB keyboard or USB mouse activity. [[BR]]

The submitted 2.6.10 patch is adding just following to 6 different input devices' driver files:

if (retval > 0)
    file->f_dentry->d_inode->i_atime = CURRENT_TIME;
romw commented 9 years ago

Commented by ex-user on 1 Jun 39356715 20:26 UTC Replying to Dagorath:

BOINC does a pretty decent job of living off spare CPU cycles but not always, probably due to badly designed/written science apps, etc. Therefore we have a backup... BOINC can be configured to suspend apps on keyboard/mouse activity. That backup absolutely must work on all platforms or BOINC will acquire the reputation for being a resource hog. Users will not overlook that sin and software reviewers and bloggers will spread the word if the problem continues.

Running Ubuntu 9.04 with BOINC 6.2.18 and this old bug still exist. I'm glad to share my idle CPU, but this bug is quite annoying, so I've uninstalled BOINC until it is fixed.

romw commented 9 years ago

Commented by LiSrt on 11 Jan 39430316 14:40 UTC Replying to ex-user:

Replying to Dagorath:

BOINC does a pretty decent job of living off spare CPU cycles but not always, probably due to badly designed/written science apps, etc. Therefore we have a backup... BOINC can be configured to suspend apps on keyboard/mouse activity. That backup absolutely must work on all platforms or BOINC will acquire the reputation for being a resource hog. Users will not overlook that sin and software reviewers and bloggers will spread the word if the problem continues.

Running Ubuntu 9.04 with BOINC 6.2.18 and this old bug still exist. I'm glad to share my idle CPU, but this bug is quite annoying, so I've uninstalled BOINC until it is fixed.

I am getting this on Mandriva 2009.1 with all updates and BOINC 6.6.31

It's only noticeable because with the CUDA functionality added, I only want the graphics card to be used by BOINC while I'm away from the computer, however the "in-use" detection appears broken.

As soon as I start BOINC, it will wait for however long I've specified in the "...idle for x minutes" preference before it starts hogging 100% of the GPU no matter if the mouse moves or stuff is typed in a word processor or browser. This is not acceptable - it causes freezing for several seconds at a time.

What is odd is that if I type in any terminal window, BOINC detects it and stops using the GPU...

romw commented 9 years ago

Commented by davea on 19 Jun 39430345 22:13 UTC The mechanisms for detecting activity differ between USB devices and PS2 devices, and they differ between distros and versions as well. We only have 1 Linux system for testing (FC10), and we rely on outside developers to provide code for the other cases. Can you point me to code for Ubuntu?

romw commented 9 years ago

Commented by fcestrada on 12 Mar 39537278 05:46 UTC Replying to davea:

The mechanisms for detecting activity differ between USB devices and PS2 devices, and they differ between distros and versions as well. We only have 1 Linux system for testing (FC10), and we rely on outside developers to provide code for the other cases. Can you point me to code for Ubuntu?

This bug persists in Debian. I forwarded you in our system the bug http://bugs.debian.org/534273 and the Debian BOINC Maintainers want to help you to solve it. If you need any test or help, please contact us in pkg-boinc-devel@lists.alioth.debian.org or 534273@bugs.debian.org

romw commented 9 years ago

Commented by mjakubicek on 21 Apr 40008280 16:00 UTC Apparently this bug affects Fedora as well:(

romw commented 9 years ago

Commented by cli on 21 Feb 40865153 23:33 UTC I've played around with libxss which is part of the Xserver to detect user idle times. I created a patch (not very clean regarding includes and makefile) that uses this lib to detect the idle time. It works fine for me (using both USB Keyboard/Mouse).

Disadvantages:[core client must be linked again several X libs (-lX11 -lXss -lXext)[BR]- core client needs a DISPLAY environment variable[[BR]]- user running the core client needs access to the Xserver (can be done with /usr/bin/xhost local:boinc)

romw commented 9 years ago

Commented by Nicolas on 4 Dec 40865782 03:06 UTC While it'd be a good idea to use libxss instead of looking at device files directly, your patch wouldn't cover what's possibly the most common case: the boinc client installed from distro packages, running on its own X-less user account, starting on boot, potentially even before the X server starts. How would it get the DISPLAY env var in that situation?

romw commented 9 years ago

Commented by cli on 13 Jan 40866186 22:13 UTC On my Debian BOINC runs as daemon with its own user "boinc". For my tests I hardcoded "DISPLAY=:.0.0" in the /etc/init.d/boinc-client start script. That's not very flexible but should be the default on most Linux desktop systems. Perhaps someone know a more flexible approach? The start order in /etc/rc2.d/ could be easily adapted to start BOINC after X. With xhost one can grant the boincuser access to X (which is also necessary if you want to run GPU apps on radeon cards btw).

You're right, that is something to be discussed, but in my opinion this bug does not really affect the X-less environments (terminal activity detection still works, I think).

romw commented 9 years ago

Commented by cli on 9 Feb 40884126 18:40 UTC I think I made my patch a little more robust, so it will catch with the X server if boinc is started before X. Additionally, I added some checks for libxss and a required header in the configure.ac (don't blame me, my first try with autoconf).[[BR]]In the Debian bugtracker there are suggestions (!http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=596656) to split the boinc-client package in two packages, one for command-line only and one using X. I think my patch makes perfectly sense for the latter case.

romw commented 9 years ago

Commented by cli on 28 Jun 41096279 08:00 UTC Is there anything I can do to get this (or a similar) patch integrated?

romw commented 9 years ago

Commented by davea on 11 Jun 41125266 20:26 UTC I checked this in; sorry for the delay.

romw commented 9 years ago

Commented by cli on 24 Nov 41127456 03:33 UTC Great, thanks! :)

romw commented 9 years ago

Commented by LiSrt on 27 Dec 41310754 11:06 UTC Is there any way to tell whether the version of boinc I have contains this fix or not?

I'm using version 6.12.23 and the bug still appears to be present, so either it's not in this build, or it is not working on my system for whatever reason.

(using mouse/keyboard outside a terminal is not detected by boinc, typing in a terminal is detected by boinc)

romw commented 9 years ago

Commented by cli on 5 Nov 41311123 16:26 UTC The patch is probably used if the "boinc" binary is linked agains libXss. If

ldd -r /usr/bin/boinc | grep -i xss

returns a line like

libXss.so.1 => /usr/lib/libXss.so.1 (0xb74f9000)

it is likely that libXss-dev headers were present at building and the patch is used.

romw commented 9 years ago

Commented by Dagorath on 30 Dec 41459919 22:13 UTC

I've reopened this ticket because the problem has returned. I followed cli's suggestion to run ldd on the boinc binary in the post above mine and find that the ldd command produces no output in BOINC 6.10.58. Running the command against 6.12.33 I get

/home/kim/BOINC/boinc: /usr/lib64/libssl.so.0.9.8: no version information available (required by /home/kim/BOINC/boinc) /home/kim/BOINC/boinc: /usr/lib64/libcrypto.so.0.9.8: no version information available (required by /home/kim/BOINC/boinc) /home/kim/BOINC/boinc: /usr/lib64/libcurl.so.4: no version information available (required by /home/kim/BOINC/boinc)

I installed BOINC from the Berkeley installer, not from the package manager.

romw commented 9 years ago

Commented by Metamorf on 20 Jun 41933096 00:28 UTC It appears the patch has been applied to the SVN source repository as of version 7.0. Be sure to add the '--with-x' flag to your './configure' invocation when compiling.

romw commented 9 years ago

Commented by Maeda on 6 Aug 42334765 15:23 UTC Replying to Metamorf:

It appears the patch has been applied to the SVN source repository as of version 7.0. Be sure to add the '--with-x' flag to your './configure' invocation when compiling. Hi !

I have the same problem with Bluetooth mouse and keyboard. It doesn't detect activity, but with direct keyboard or mouse, it's working.

Is it possible to apply a patch for the 6.10 ?

romw commented 9 years ago

Commented by blueyed on 14 May 42529318 09:05 UTC This patch/fix might be related: http://boinc.berkeley.edu/trac/changeset/25732/boinc/trunk

(AFAIK it should be in 7.0.30+, i.e. 7.0.31)