Problems with BOINC under Linux / Ubuntu 12.04 (BOINC 7.0.27 / 42)

Message boards : Questions and problems : Problems with BOINC under Linux / Ubuntu 12.04 (BOINC 7.0.27 / 42)
Message board moderation

To post messages, you must log in.

AuthorMessage
Profile mercury1981
Avatar

Send message
Joined: 1 Jan 13
Posts: 13
Message 46980 - Posted: 1 Jan 2013, 14:14:20 UTC

Hi!

I'm having some very annoying problems with BOINC under Linux (more precise Ubuntu 12.04):

+ After booting BOINC Manager does not recognize my Geforce 560 Ti - only if I stop BOINC service manually and start it again the GPU is available.
+ Detection if computer is idle or not does not work - it always states "computer in use" even if computer is not in use - if I start work using "Activity" menu everything works as expected.

What I already tried:

+ Using BOINC 7.0.42 (manually added using PPA) - still detection of idle computer does not work / same problem with GPU and even more no more progress in work-units displayed.
+ Installing CUDA package from Ubuntu PPA -> did not change anything.
+ add "sleep" to init.d boinc-client script -> the problem that GPU option is not active is fixed but no I have problems with login using GDM: I need 2 tries to login using GDM and I can see in the background that there are some weird signs in the background.


Can anybody please help / give me instructions on how to narrow the problems?

Thanks a lot!




cat global_prefs.xml

<global_preferences>
<source_project>http://bam.boincstats.com/</source_project>
<mod_time>1356721465</mod_time>
<ram_max_used_idle_pct>0</ram_max_used_idle_pct>
<work_buf_min_days>1</work_buf_min_days>
<cpu_usage_limit>90</cpu_usage_limit>
<disk_min_free_gb>1</disk_min_free_gb>
<end_hour>0</end_hour>
<suspend_cpu_usage>90</suspend_cpu_usage>
<disk_interval>60</disk_interval>
<leave_apps_in_memory/>
<max_bytes_sec_up>0</max_bytes_sec_up>
<max_bytes_sec_down>0</max_bytes_sec_down>
<run_gpu_if_user_active>0</run_gpu_if_user_active>
<ram_max_used_busy_pct>0</ram_max_used_busy_pct>
<idle_time_to_run>1</idle_time_to_run>
<start_hour>0</start_hour>
<max_cpus>10</max_cpus>
<disk_max_used_pct>50</disk_max_used_pct>
<net_end_hour>6</net_end_hour>
<net_start_hour>0</net_start_hour>
<work_buf_additional_days>3</work_buf_additional_days>
<cpu_scheduling_period_minutes>60</cpu_scheduling_period_minutes>
<disk_max_used_gb>10</disk_max_used_gb>
<suspend_if_no_recent_input>0</suspend_if_no_recent_input>
<run_if_user_active>0</run_if_user_active>
<max_ncpus_pct>100</max_ncpus_pct>
<vm_max_used_pct>75</vm_max_used_pct>
</global_preferences>

cat global_prefs_override.xml

<global_preferences>
<run_on_batteries>0</run_on_batteries>
<run_if_user_active>0</run_if_user_active>
<run_gpu_if_user_active>0</run_gpu_if_user_active>
<idle_time_to_run>1.000000</idle_time_to_run>
<suspend_cpu_usage>25.000000</suspend_cpu_usage>
<start_hour>0.000000</start_hour>
<end_hour>0.000000</end_hour>
<net_start_hour>0.000000</net_start_hour>
<net_end_hour>0.000000</net_end_hour>
<leave_apps_in_memory>0</leave_apps_in_memory>
<confirm_before_connecting>1</confirm_before_connecting>
<hangup_if_dialed>0</hangup_if_dialed>
<dont_verify_images>0</dont_verify_images>
<work_buf_min_days>1.000000</work_buf_min_days>
<work_buf_additional_days>5.000000</work_buf_additional_days>
<max_ncpus_pct>0.000000</max_ncpus_pct>
<cpu_scheduling_period_minutes>120.000000</cpu_scheduling_period_minutes>
<disk_interval>60.000000</disk_interval>
<disk_max_used_gb>10.000000</disk_max_used_gb>
<disk_max_used_pct>50.000000</disk_max_used_pct>
<disk_min_free_gb>1.000000</disk_min_free_gb>
<vm_max_used_pct>75.000000</vm_max_used_pct>
<ram_max_used_busy_pct>50.000000</ram_max_used_busy_pct>
<ram_max_used_idle_pct>90.000000</ram_max_used_idle_pct>
<max_bytes_sec_up>0.000000</max_bytes_sec_up>
<max_bytes_sec_down>0.000000</max_bytes_sec_down>
<cpu_usage_limit>100.000000</cpu_usage_limit>
<daily_xfer_limit_mb>0.000000</daily_xfer_limit_mb>
<daily_xfer_period_days>0</daily_xfer_period_days>
</global_preferences>
ID: 46980 · Report as offensive
doggybob

Send message
Joined: 5 Dec 12
Posts: 42
Message 46985 - Posted: 1 Jan 2013, 20:02:06 UTC - in response to Message 46980.  

If you install BOINC from repositories it installs on an unprivileged user account named boinc. boinc doesn't have permission to access parts of the video subsystem which means it cannot cetect the presence of the CUDA drivers which means it thinks you don't have the 560 installed. You can work around that but I forget how, the info is posted somewhere here on the forum but I don't remember where.

The easiest fix is to uninstall BOINC using apt-get and reinstall it using the Berkeley installer. That way it installs and runs on your account which has access to the GPU.

Idle detection has never worked properly on Linux. Seems like they fix it and then some lib changes and breaks it. I've heard it works on some distros but not all. You can use BOINC's "suspend when CPU use exceeds _ %" or use other options to suspend crunching when specified applications run to get an effect similar to "suspend when computer is in use".

Your other problems sound like gnome/unity acting up. I've had problems with both gnome and KDE and have found the only solution is to turn off all the useless eye candy and never use the BOINC screen savers because they're nothing but trouble.

"Windows" -- an American English word, meaning "A real operating system is too hard for me."
ID: 46985 · Report as offensive
Profile mercury1981
Avatar

Send message
Joined: 1 Jan 13
Posts: 13
Message 47002 - Posted: 2 Jan 2013, 10:29:05 UTC - in response to Message 46985.  

Hi doggybob!

Thanks for your reply:

Regarding the GPU problem - the following workaround works for me now:

I added the following line to /etc/rc.local:

echo "service boinc-client restart" | at now + 1 minutes


Regarding idle detection:
I noticed that for example in Skype for Linux idle detection works fine - so perhaps it would be possible to link it to this status?

Regarding "suspend when CPU use exceeds _ %" - but in that case I would get a problem with GPU usage again, right? I mean CPU usage would be below a certain amount (e.g. 25%) because I'm only using firefox but if GPU would be used I would get some problems with further usage - right?
ID: 47002 · Report as offensive
doggybob

Send message
Joined: 5 Dec 12
Posts: 42
Message 47010 - Posted: 2 Jan 2013, 13:32:13 UTC - in response to Message 47002.  

Regarding idle detection:
I noticed that for example in Skype for Linux idle detection works fine - so perhaps it would be possible to link it to this status?


You might have something there. There is a Trac ticket for the idle detection problem. You could add your suggestion to that ticket.

Regarding "suspend when CPU use exceeds _ %" - but in that case I would get a problem with GPU usage again, right? I mean CPU usage would be below a certain amount (e.g. 25%) because I'm only using firefox but if GPU would be used I would get some problems with further usage - right?


I dunno. Try it and see.

"Windows" -- an American English word, meaning "A real operating system is too hard for me."
ID: 47010 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5081
United Kingdom
Message 47011 - Posted: 2 Jan 2013, 14:31:15 UTC - in response to Message 47010.  

Regarding idle detection:
I noticed that for example in Skype for Linux idle detection works fine - so perhaps it would be possible to link it to this status?

You might have something there. There is a Trac ticket for the idle detection problem. You could add your suggestion to that ticket.

Regarding "suspend when CPU use exceeds _ %" - but in that case I would get a problem with GPU usage again, right? I mean CPU usage would be below a certain amount (e.g. 25%) because I'm only using firefox but if GPU would be used I would get some problems with further usage - right?

I dunno. Try it and see.

There was an active discussion on this subject over the developer mailing list yesterday, leading to trac changeset [20daf38].

That won't be in any pre-built client yet, but if you have the ability to compile your own from a git trunk checkout, it might be worth a test.
ID: 47011 · Report as offensive
Profile mercury1981
Avatar

Send message
Joined: 1 Jan 13
Posts: 13
Message 47064 - Posted: 5 Jan 2013, 21:16:34 UTC

Thanks - so no other help than waiting that the idle-detection will be fixed?
http://boincstats.com/signature/-1/user/84773/sig.png
ID: 47064 · Report as offensive
kdsjsdj

Send message
Joined: 5 Jan 13
Posts: 81
Message 47065 - Posted: 5 Jan 2013, 23:09:11 UTC - in response to Message 47064.  

It sounds like you missed Richard's suggestion to compile your own client with the changeset he linked to? If you're saying that's not an option or you tried it but it didn't work then yes... nothing for you to do but wait.
ID: 47065 · Report as offensive
Profile mercury1981
Avatar

Send message
Joined: 1 Jan 13
Posts: 13
Message 47079 - Posted: 6 Jan 2013, 17:34:40 UTC

Ok - sorry - I did not mention that self-compiling it is not an option for me :-)
http://boincstats.com/signature/-1/user/84773/sig.png
ID: 47079 · Report as offensive
Profile mercury1981
Avatar

Send message
Joined: 1 Jan 13
Posts: 13
Message 47189 - Posted: 12 Jan 2013, 8:20:11 UTC

Hi!

Just in case somebody is interested - I found a workaround for the idle-detection problem:

I'm using Gnome-screensaver to trigger starting / stopping of BOINC service:

Step 1: Create a file and make it executeable:
Step 2: use the following command to hook to gnome-screensaver in order to start / stop BOINC service

dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'" | ( while true; do read X; if echo $X | grep "boolean true" &> /dev/null; then sudo service boinc-client start; elif echo $X | grep "boolean false" &> /dev/null; then sudo service boinc-client stop; fi done ) 


Step 3: disable password prompt for "sudo" by adding the following line to /etc/sudoers

your_username ALL=(ALL) NOPASSWD: ALL


Step 4: start BOINC-Manager and set it to "run always"
Step 5: add your created script-file to your auto-start scripts in gnome
Step 6: restart your PC and check if everything works as expected :-)
http://boincstats.com/signature/-1/user/84773/sig.png
ID: 47189 · Report as offensive
kdsjsdj

Send message
Joined: 5 Jan 13
Posts: 81
Message 47192 - Posted: 12 Jan 2013, 11:30:22 UTC - in response to Message 47189.  

Awesome!! bash scripting at its finest. Lots of people are going to thank you for that. I'm bookmarking this post in my browser and by the power invested in me as chief forum troll I dub thee one cool dude.

Now it occurs to me why idle detection never worked for you and probably never works for anybody with BOINC installed from repos... you're running BOINC client as a daemon therefore it runs on the unprivileged boinc account which likely doesn't have access to the keyboard and mouse sub-systems used to detect user using the computer. If so then idle detection will never work for boinc unless a way can be found to give boinc access to mouse and keyboard. I doubt the BOINC devs have pursued that angle as they are committed only to the Berkeley build, not builds in repos. And package maintainers haven't either because, well, who knows what excuse they have. They seem to never be without one, they'll blame it on the kernel devs if they can't think of anything else.

Until then your bash script is an excellent workaround except for the fact it requires removal of the password prompt for sudo. Unless you have the files for the new missile defense system on your disk I suppose it's not a big security concern but if it is then you might do man sudo and look at the -A and -S options. It looks like there might be a possibility to use those options to somehow read the password from a disk file and pass it to sudo.

I am definitely not an expert when it comes to bash scripts but couldn't that single long line be broken into a series of shorter lines and the semi-colons deleted? It would make it easier to read but if it doesn't execute properly then of course there is no point.

Let's see if there isn't a way to give boinc access to the mouse and keyboard so idle detection can work the way it should. If not then I intend to test your workaround a little more and probably put it in the official BOINC wiki. Should go into some FAQs too. Other possibilities are to have the package maintainers add code to setup that script when they install BOINC or else give boinc the required permissions for mouse-keyboard access.
ID: 47192 · Report as offensive
cuihao

Send message
Joined: 18 Jan 13
Posts: 2
China
Message 47367 - Posted: 18 Jan 2013, 7:11:55 UTC

I am an Archlinux user. Idle detection failed, too.

If boinc is run by root, it works well. But if by user boinc, it fails. STDERR:
[code]......
18-Jan-2013 15:03:25 [World Community Grid] Restarting task X0960102061501200807281120_0 using hcc1 version 705 in slot 1
18-Jan-2013 15:03:25 [World Community Grid] Restarting task X0960102061433200807281122_0 using hcc1 version 705 in slot 3
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
...... (repeat)[code]

Maybe adding user boinc to some group will work, and I'm trying.
ID: 47367 · Report as offensive
kdsjsdj

Send message
Joined: 5 Jan 13
Posts: 81
Message 47375 - Posted: 18 Jan 2013, 11:17:04 UTC - in response to Message 47367.  

Maybe adding user boinc to some group will work, and I'm trying.


I am pretty sure that will work because adding user boinc to the video group (plus other steps depending on distro) is what allows boinc access to GPU so GPU tasks can be crunched. I experimented with a few groups months ago and gave up. Hope you have better luck.



ID: 47375 · Report as offensive
cuihao

Send message
Joined: 18 Jan 13
Posts: 2
China
Message 47384 - Posted: 18 Jan 2013, 15:53:39 UTC - in response to Message 47375.  

I've tried it and it doesn't work. It might solve the problem of GPU detection, but not idle detection problem.

I found a solution (from https://wiki.archlinux.org/index.php/BOINC ) to solve idle detection problem now. It's about permission of X connection. Run:
xhost local:boinc

this will disable access control so that BOINC can do idle detection.
ID: 47384 · Report as offensive
kdsjsdj

Send message
Joined: 5 Jan 13
Posts: 81
Message 47389 - Posted: 18 Jan 2013, 16:31:25 UTC - in response to Message 47384.  

I've tried it and it doesn't work. It might solve the problem of GPU detection, but not idle detection problem.

I found a solution (from https://wiki.archlinux.org/index.php/BOINC ) to solve idle detection problem now. It's about permission of X connection. Run:
xhost local:boinc

this will disable access control so that BOINC can do idle detection.


I wasn't suggesting the solution for GPU would work for mouse and keyboard detection. I meant the same type of solution should work.

Thanks! If I can confirm that I'll add it to the wiki.
ID: 47389 · Report as offensive

Message boards : Questions and problems : Problems with BOINC under Linux / Ubuntu 12.04 (BOINC 7.0.27 / 42)

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.