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

Wurgl (speak^Wcrunching for Special: Off-Topic)
Wurgl (speak^Wc...
Joined: 11 Feb 05
Posts: 321
Credit: 140550008
RAC: 0
Topic 195712

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://einsteinathome.org/host/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://einsteinathome.org/workunit/94644461

M. Schmitt
M. Schmitt
Joined: 27 Jun 05
Posts: 478
Credit: 15872262
RAC: 0

How does boinc find out, that a user is moving the mouse/ hackin

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


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

Quote:

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.

Quote:
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.

Quote:

[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://einsteinathome.org/host/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.

Quote:
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.

Quote:
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)
Wurgl (speak^Wc...
Joined: 11 Feb 05
Posts: 321
Credit: 140550008
RAC: 0

RE: RE: First of all: It

Quote:
Quote:
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" :-)

Quote:

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).

Quote:

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)

Quote:
Quote:

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).

Quote:

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).

Quote:

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?

M. Schmitt
M. Schmitt
Joined: 27 Jun 05
Posts: 478
Credit: 15872262
RAC: 0

RE: Seems that it is loaded

Quote:
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."

Quote:

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.

Quote:
Quote:

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

Quote:
Quote:
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.

Quote:
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.

Quote:
Quote:

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).

Quote:

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.

Gundolf Jahn
Gundolf Jahn
Joined: 1 Mar 05
Posts: 1079
Credit: 341280
RAC: 0

RE: ...You also could

Quote:
...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

Computer sind nicht alles im Leben. (Kleiner Scherz)

M. Schmitt
M. Schmitt
Joined: 27 Jun 05
Posts: 478
Credit: 15872262
RAC: 0

LOL, yes.

LOL, yes.

KSMarksPsych
KSMarksPsych
Moderator
Joined: 15 Oct 05
Posts: 2702
Credit: 4090227
RAC: 0

There is problems with

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)

Einstein@Home Moderator

Wurgl (speak^Wcrunching for Special: Off-Topic)
Wurgl (speak^Wc...
Joined: 11 Feb 05
Posts: 321
Credit: 140550008
RAC: 0

Aha! USB might explain it.

Aha! USB might explain it.

Jord
Joined: 26 Jan 05
Posts: 2952
Credit: 5779100
RAC: 0

6.12 will hopefully have a

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

Wurgl (speak^Wcrunching for Special: Off-Topic)
Wurgl (speak^Wc...
Joined: 11 Feb 05
Posts: 321
Credit: 140550008
RAC: 0

Now things are getting

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".

EDP really means Experimental Data Processing.

But for whatever reason I got a lot of memory allocation errors.
http://einsteinathome.org/host/1967526/tasks&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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.