How does boinc find out, that a user is moving the mouse/ hacking on the keyboard?


Advanced search

Message boards : Problems and Bug Reports : How does boinc find out, that a user is moving the mouse/ hacking on the keyboard?

AuthorMessage
Wurgl (speak^Wcrunching for Special: Off-Topic)
Send message
Joined: Feb 11 05
Posts: 314
Credit: 9,353,768
RAC: 4,903
Message 111168 - Posted 17 Mar 2011 18:55:38 UTC

    Last modified: 17 Mar 2011 18:59:15 UTC

    First of all: It is Linux, and Suse ... (sorry for using Suse ...)

    Today I (somehow accidently) upgraded my machine and since now CUDA is working.

    So far fine. The first GPU-WU is already waiting for validation and is really faster than the CPU.

    However, the problem ist that my machine (actuall only X) is really, really slow when boinc is running. As I found out with the utility "top", the programm X is using something between 30 and 60% of one of the CPU's. If I stop boinc, X just uses 1-5% of CPU and the machine is really fast.

    Now, there is an option (in both the local boinc manager and on the website) to stop using the GPU while a user (or my cat if i had one) is moving the mouse or pressing any key. But this has no effect on my machine, the only way to make it usable again is to stop *all* boinc and all 8 CPU's.

    I start boinc with a special user "boinc" from cron with an entry like this:

    # crontab -u boinc -l
    # DO NOT EDIT THIS FILE - edit the master and reinstall.
    # (/tmp/crontab.XXXXn8gDwH installed on Sun Dec 19 17:26:38 2010)
    # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
    @reboot cd ~/BOINC;nohup ./run_client --daemon


    Of course, I do not use the machine with that account (a shell like /bin/false is not really usable *g*). And for h[i|y]st[o|e]rical reasons I do not even start X when the machine boots.

    Now I see some problem for the boinc program to find out, if someone is using mouse/keyboard aka "computer is in use". But without tons of Valium I cannot use my machine while a CUDA-boinc is running at full speed. I tried it, but clicking on a new mail, then waiting up to 5 seconds to see that mail, drives me crazy.

    [edit]
    What hacks do I need to make the X-Server responding faster? Or what changes to the configuration is needed for boinc to detect mouse-moves/keyboard pressing?
    [/edit]

    Now some infos ...
    My computer:
    http://einstein.phys.uwm.edu/show_host_detail.php?hostid=1967526

    the nvidia module has version 260.19.44 (from March 7, 2011)

    the kernel is 2.6.38-rc7-2-default (causing nvidia 260.1936 from January 21, 2011 not to work ... for whatever reasons).

    boinc:
    BOINC client version 6.10.17 for x86_64-pc-linux-gnu

    and the first CUDA-WU is this one:
    http://einstein.phys.uwm.edu/workunit.php?wuid=94644461

    Profile M. Schmitt
    Avatar
    Send message
    Joined: Jun 27 05
    Posts: 480
    Credit: 15,872,262
    RAC: 0
    Message 111179 - Posted 18 Mar 2011 6:14:18 UTC - in response to Message 111168.

      First of all: It is Linux, and Suse ... (sorry for using Suse ...)

      I shouldn't answer you, cause of that excuse. ;)

      However, the problem ist that my machine (actuall only X) is really, really slow when boinc is running. As I found out with the utility "top", the programm X is using something between 30 and 60% of one of the CPU's. If I stop boinc, X just uses 1-5% of CPU and the machine is really fast.

      Now, there is an option (in both the local boinc manager and on the website) to stop using the GPU while a user (or my cat if i had one) is moving the mouse or pressing any key. But this has no effect on my machine, the only way to make it usable again is to stop *all* boinc and all 8 CPU's.

      You don't need that setting, X should always react very fast(It does here), cause all apps run in the background. So it must be something else that is slowing down your desktop.

      I start boinc with a special user "boinc" from cron with an entry like this:
      # crontab -u boinc -l
      # DO NOT EDIT THIS FILE - edit the master and reinstall.
      # (/tmp/crontab.XXXXn8gDwH installed on Sun Dec 19 17:26:38 2010)
      # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
      @reboot cd ~/BOINC;nohup ./run_client --daemon


      Of course, I do not use the machine with that account (a shell like /bin/false is not really usable *g*). And for h[i|y]st[o|e]rical reasons I do not even start X when the machine boots.

      You can only run the CUDA apps if the driver is loaded through X(logged in!) or if the CUDA module is loaded at boot time see here.

      [edit]
      What hacks do I need to make the X-Server responding faster? Or what changes to the configuration is needed for boinc to detect mouse-moves/keyboard pressing?
      [/edit]

      Now some infos ...
      My computer:
      http://einstein.phys.uwm.edu/show_host_detail.php?hostid=1967526

      the nvidia module has version 260.19.44 (from March 7, 2011)

      Install the new Beta driver from here(270.26)
      Then you can use the BRP3cuda32NV270 app, that will use no full CPU, but about 33% of one CPU.

      the kernel is 2.6.38-rc7-2-default (causing nvidia 260.1936 from January 21, 2011 not to work ... for whatever reasons).

      Why do you use a kernel without support from OpenSUSE? Installing the new Version 11.4 will bring the kernel 2.6.37 to you. Is this one too old? With all kernels from OpenSUSE you will get drivers from Nvidia that will work.

      boinc:
      BOINC client version 6.10.17 for x86_64-pc-linux-gnu

      Not the newest version, but shouldn't be the reason of your problems.

      You could also try to start boinc with the option --check_all_logins, if you want to use mouse/keyboard detection.

      Last not least, your GPU has 512MB RAM available. The CUDA apps usually use 300MB, but as otheres reported they can use up to 400MB. This will leave only a small amount of memory for X. If you start boinc(with X) and change user afterwards, it might be very tight. Better use the advice from the Nvidia forum and create an init-script that starts BOINC with the user boinc.

      Check the amount of free GPU memory with the command 'nvidia-smi -q'.


      ____________

      Wurgl (speak^Wcrunching for Special: Off-Topic)
      Send message
      Joined: Feb 11 05
      Posts: 314
      Credit: 9,353,768
      RAC: 4,903
      Message 111181 - Posted 18 Mar 2011 8:11:40 UTC - in response to Message 111179.

        First of all: It is Linux, and Suse ... (sorry for using Suse ...)

        I shouldn't answer you, cause of that excuse. ;)


        ... and KDE .. if that helps to get even more "friends" :-)


        You don't need that setting, X should always react very fast(It does here), cause all apps run in the background. So it must be something else that is slowing down your desktop.
        You can only run the CUDA apps if the driver is loaded through X(logged in!) or if the CUDA module is loaded at boot time see here.


        Seems that it is loaded at boot time, since there is a file /etc/modprobe.d/50-nvidia.conf. I rebootet the machine after installing the nvidia driver just to be sure, that everything really works (not because it was needed).


        Install the new Beta driver from here(270.26)
        Then you can use the BRP3cuda32NV270 app, that will use no full CPU, but about 33% of one CPU.


        From the nvidia page ...
        270.26 February 21, 2011
        260.1944 March 7, 2011

        260.1944 is the newest (considering at the date)


        the kernel is 2.6.38-rc7-2-default (causing nvidia 260.1936 from January 21, 2011 not to work ... for whatever reasons).


        Why do you use a kernel without support from OpenSUSE? Installing the new Version 11.4 will bring the kernel 2.6.37 to you. Is this one too old? With all kernels from OpenSUSE you will get drivers from Nvidia that will work.

        This is the Suse kernel. For whatever reasons (and yes, this was accidently) I upgraded to 11.5 and not to 11.3 (which was was my plan).


        You could also try to start boinc with the option --check_all_logins, if you want to use mouse/keyboard detection.


        # ./boinc --help
        ...
        Usage: ./boinc [options]
        ...
        --check_all_logins for idle detection, check remote logins too


        So, this options checks remote logins. Although my computer is placed under my desk, I think this is not what "remote login" means :-)

        At least I interpret that line as a mean to additionally check remote logins, and not to check activity at all (including remote logins).



        Last not least, your GPU has 512MB RAM available. The CUDA apps usually use 300MB, but as otheres reported they can use up to 400MB. This will leave only a small amount of memory for X. If you start boinc(with X) and change user afterwards, it might be very tight. Better use the advice from the Nvidia forum and create an init-script that starts BOINC with the user boinc.

        Check the amount of free GPU memory with the command 'nvidia-smi -q'.


        I tried this. Thats what it says ...
        # nvidia-smi -q

        ==============NVSMI LOG==============


        Timestamp : Fri Mar 18 08:27:19 2011

        Driver Version : 260.19.44


        Yes, no memory information and no more lines. Thats all it tells me.

        There is another option which tells me the memory.
        First: with a stopped boinc

        # nvidia-smi -a

        ==============NVSMI LOG==============


        Timestamp : Fri Mar 18 08:28:14 2011

        Driver Version : 260.19.44


        GPU 0:
        Product Name : GeForce 9500 GT
        PCI Device/Vendor ID : 64010de
        PCI Location ID : 0:4:0
        Board Serial : 1266914972570
        Display : Connected
        Temperature : 40 C
        Fan Speed : 50%
        Utilization
        GPU : 0%
        Memory : 6%
        Power State : PSTATE 0
        Power Capping : Disabled


        And now: with a running boinc
        # nvidia-smi -a

        ==============NVSMI LOG==============


        Timestamp : Fri Mar 18 08:31:51 2011

        Driver Version : 260.19.44


        GPU 0:
        Product Name : GeForce 9500 GT
        PCI Device/Vendor ID : 64010de
        PCI Location ID : 0:4:0
        Board Serial : 1266914972570
        Display : Connected
        Temperature : 43 C
        Fan Speed : 50%
        Utilization
        GPU : 83%
        Memory : 45%
        Power State : PSTATE 0
        Power Capping : Disabled

        45% of memory seems to be okay.


        But my question was: How is keyboard/mouse activity detected? I can live with a system which reacts slow when I start using it and is fast again afterwards. I cannot live with a system which reacts like an old 386 ...

        Or, if that does not work: How can I disable CUDA?

        Profile M. Schmitt
        Avatar
        Send message
        Joined: Jun 27 05
        Posts: 480
        Credit: 15,872,262
        RAC: 0
        Message 111182 - Posted 18 Mar 2011 9:42:59 UTC - in response to Message 111181.

          Seems that it is loaded at boot time, since there is a file /etc/modprobe.d/50-nvidia.conf. I rebootet the machine after installing the nvidia driver just to be sure, that everything really works (not because it was needed).

          From the Nvidia forum:
          "In order to run CUDA applications, the CUDA module must be loaded and the entries in /dev created. This may be achieved by initializing X Windows, or by creating a script to load the kernel module and create the entries."

          From the nvidia page ...
          270.26 February 21, 2011
          260.1944 March 7, 2011

          260.1944 is the newest (considering at the date)

          This is *not* the Beta driver.
          Look here and the following posts.


          the kernel is 2.6.38-rc7-2-default (causing nvidia 260.1936 from January 21, 2011 not to work ... for whatever reasons).


          Why do you use a kernel without support from OpenSUSE? Installing the new Version 11.4 will bring the kernel 2.6.37 to you. Is this one too old? With all kernels from OpenSUSE you will get drivers from Nvidia that will work.

          This is the Suse kernel. For whatever reasons (and yes, this was accidently) I upgraded to 11.5 and not to 11.3 (which was was my plan).

          This is a Beta version, that might cause problems.

          You could also try to start boinc with the option --check_all_logins, if you want to use mouse/keyboard detection.


          # ./boinc --help
          ...
          Usage: ./boinc [options]
          ...
          --check_all_logins for idle detection, check remote logins too


          So, this options checks remote logins. Although my computer is placed under my desk, I think this is not what "remote login" means :-)

          At least I interpret that line as a mean to additionally check remote logins, and not to check activity at all (including remote logins).

          Multiple Users can be logged in, even on the desktop. So give it a try. I understand this option in a way, that it is checking remote logins too.

          Last not least, your GPU has 512MB RAM available. The CUDA apps usually use 300MB, but as otheres reported they can use up to 400MB. This will leave only a small amount of memory for X. If you start boinc(with X) and change user afterwards, it might be very tight. Better use the advice from the Nvidia forum and create an init-script that starts BOINC with the user boinc.

          Check the amount of free GPU memory with the command 'nvidia-smi -q'.


          I tried this. Thats what it says ...

          nvidia-smi -a

          45% of memory seems to be okay.

          Your query(-a) doesn't work with the beta driver any more. But you found out anyway. :)
          Your GPU doesn't have that many shaders, so maybe more work is done by the CPU and less memory is used on the GPU(speculation).

          But my question was: How is keyboard/mouse activity detected? I can live with a system which reacts slow when I start using it and is fast again afterwards. I cannot live with a system which reacts like an old 386 ...

          Or, if that does not work: How can I disable CUDA?

          You can disable CUDA with a cc_config.xml file.
          And my answer was that this is abnormal and you shouldn't need that option. I run 2 CUDA apps at the same time and the load of my X-server is about 1-2%(KDE).
          About mouse/keyboard detection I can't say anything. There is probably a system call in user space that can handle this. You probably need to look in the source code to find out. You also could upgrade to boinc 5.10.58. maybe this will solve the problem.
          But the best will be probably to downgrade to the stable version 11.4.
          ____________

          Profile Gundolf Jahn
          Send message
          Joined: Mar 1 05
          Posts: 1050
          Credit: 309,787
          RAC: 62
          Message 111183 - Posted 18 Mar 2011 10:00:56 UTC - in response to Message 111182.

            ...You also could upgrade to boinc 5.10.58. maybe this will solve the problem...

            That would be a downgrade (and the last version was 5.10.45 ;-).

            I think you made a typo and meant 6.10.58

            Gruß,
            Gundolf

            Profile M. Schmitt
            Avatar
            Send message
            Joined: Jun 27 05
            Posts: 480
            Credit: 15,872,262
            RAC: 0
            Message 111185 - Posted 18 Mar 2011 10:25:23 UTC - in response to Message 111183.

              LOL, yes.
              ____________

              Profile KSMarksPsych
              Forum moderator
              Avatar
              Send message
              Joined: Oct 15 05
              Posts: 2398
              Credit: 1,044,188
              RAC: 0
              Message 111203 - Posted 19 Mar 2011 9:32:12 UTC

                There is problems with keyboard usage detection in BOINC and has been for quite a while. Some people report that using a PS/2 keyboard works where a USB keyboard doesn't. And in my setup (USB keyboard and mouse) detection of both fails.

                Fedora and KDE and 6.10.56 if anyone really cares :)
                ____________
                Kathryn :o)
                The BOINC FAQ Service
                The Unofficial BOINC Wiki
                The Trac System
                More BOINC information than you can shake a stick of RAM at.

                Wurgl (speak^Wcrunching for Special: Off-Topic)
                Send message
                Joined: Feb 11 05
                Posts: 314
                Credit: 9,353,768
                RAC: 4,903
                Message 111204 - Posted 19 Mar 2011 12:00:02 UTC - in response to Message 111203.

                  Aha! USB might explain it.

                  Profile Ageless
                  Avatar
                  Send message
                  Joined: Jan 26 05
                  Posts: 2780
                  Credit: 3,583,638
                  RAC: 11,049
                  Message 111205 - Posted 19 Mar 2011 12:14:55 UTC - in response to Message 111204.

                    6.12 will hopefully have a fix for that.
                    - client, linux: use X server for idle detection if available.
                    ____________
                    Jord

                    -The BOINC FAQ Service
                    - BOINC 7.0 FAQ


                    I used to be an adventurer like you. Then I took an arrow in the knee...

                    Wurgl (speak^Wcrunching for Special: Off-Topic)
                    Send message
                    Joined: Feb 11 05
                    Posts: 314
                    Credit: 9,353,768
                    RAC: 4,903
                    Message 111210 - Posted 20 Mar 2011 7:37:41 UTC - in response to Message 111205.

                      Last modified: 20 Mar 2011 8:13:33 UTC

                      Now things are getting strange.

                      Suddenly I see "Stopped, User is active"¹. The only thing I changed was stopping (or rather suspending) Boinc in its menu. So it seems to work "sometimes".

                      <Conspiracy theory>EDP really means Experimental Data Processing.</Conspiracy theory>

                      But for whatever reason I got a lot of memory allocation errors.
                      http://einstein.phys.uwm.edu/results.php?hostid=1967526&offset=0&show_names=0&state=5
                      All of them are CUDA WUs, the regular CPU computes fine. And no, there is no screen saver, just blank screen.

                      Still CUDA-Memory errors? However, this is was nvidia-smi says:

                      # nvidia-smi -a

                      ==============NVSMI LOG==============


                      Timestamp : Sun Mar 20 09:11:44 2011

                      Driver Version : 260.19.44


                      GPU 0:
                      Product Name : GeForce 9500 GT
                      PCI Device/Vendor ID : 64010de
                      PCI Location ID : 0:4:0
                      Board Serial : 1266914972570
                      Display : Connected
                      Temperature : 43 C
                      Fan Speed : 50%
                      Utilization
                      GPU : 3%
                      Memory : 7%
                      Power State : PSTATE 0
                      Power Capping : Disabled



                      ¹) Not the original text, translated from German to English

                      Post to thread

                      Message boards : Problems and Bug Reports : How does boinc find out, that a user is moving the mouse/ hacking on the keyboard?


                      Home · Your account · Message boards

                      This material is based upon work supported by the National Science Foundation (NSF) under Grants PHY-1104902, PHY-1104617 and PHY-1105572 and by the Max Planck Gesellschaft (MPG). Any opinions, findings, and conclusions or recommendations expressed in this material are those of the investigators and do not necessarily reflect the views of the NSF or the MPG.

                      Copyright © 2013 Bruce Allen