Message boards : GPUs : Is there a way in Linux Mint 19.1 to delay boinc start at boot?
Message board moderation
Author | Message |
---|---|
Send message Joined: 28 Feb 16 Posts: 32 |
With no delay it starts automatically at boot. Not giving enough time for graphics drivers to start. it's causing an issue with no GPU unless I restart boinc after boot. Delaying Boinc-Manager does not solve it. At boot Boinc starts projects in the post up. In other words: If I do a sudo /etc/init.d/boinc-client restartafter the box is booted, then the GPU is found and used for projects. But if I just reboot I get the "no usable GPU found." Win11 x64-Asus AMD 2.7GHzX4-16GB-GT730 2GB Garuda x64-ASUS-Intel 2.7GHzX2-16GB-GT450 Mint21.3 x64-Xeon 2.4GHzX4-32GB-nVidia GT730 2GB Garuda Linux x64-Intel-2.1GHz-8GB OMV-7 x64-NASIntel-i3-3.6GHz-32GB-29TB |
Send message Joined: 5 Oct 06 Posts: 5130 |
I started typing 'Linux delay serv...' into Google, knowing the BOINC runs as a service under Linux. It's a common enough question for Google to autocomplete it as linux delay service startup on bootIf you paste that into the search engine of your choice, you should get some good hints. I'm not a Linux person, but I think that I've seen this question often enough to propose that we ought to have the delay built in to the systemd we ship out with the repository ppas (if I'm not muddling two different bits of terminology there). If you find a working solution among the search results, please post it here, or if a Linux specialist reading here would like to take up the challenge, we could maybe fix this at source. |
Send message Joined: 17 Nov 16 Posts: 891 |
I would first try to add a SLEEP 60 to the beginning of the startup boinc-client script in /etc/init.d/boinc-client sleep 60 set -e . /lib/lsb/init-functions If that doesn't work I would then try to add an AFTER statement in the service startup script in /lib/systemd/system/boinc-client.service [Unit] Description=Berkeley Open Infrastructure Network Computing Client After=network.target After=multi.user.target The first suggestion simply tells the system to wait 60 seconds before executing the main parts of the boinc-client script. Disadvantage is that it will always take 60 seconds to restart the service after stopping it and restarting it. The second suggestion tells the service not to start until the video drivers are loaded which the multi.user.target is defined for. |
Send message Joined: 21 May 16 Posts: 37 |
Hello, could you please provide following infos:
|
Send message Joined: 27 Jun 08 Posts: 641 |
I have run into the same problem with five RX560 and 18.04 Minimal Desktop. Googling I see where boinc-client can run behind al other scrips. Tried it: Renamed all boinc_client in Rc0...Rc6 from "01" to "91" which forces it as the last script to run but that did not fix the problem. I can put a sleep 300 or so into the boinc_client script but I think that blocks. Since this is the last script anyway, maybe that is ok? There are five RX560 and it seems I need about 4-5 minutes or so to allow 18.04 to stabilize. I did not see an "autostart" at ./configure so I am not running that version with the autostart. I am guessing I could always add at script that runs in background MyScript & where MyScript is actually the boinc-client with the sleep 300 delay. I would need to pass arguments to but I don't want delay when running from command line. This gets confusing and I am no expert on Linux. amdgpu-pro-19.10-785425-ubuntu-18.04.tar on ubuntu-18.04.2-desktop-amd64.iso with RX560s [EDIT] Just thought more about this. I would have to move boinc-client out of init.d into some /bin In init.d I need to add a script that starts another script in background. That other script would do the delay and then run the real boinc-client. As usual I would have to debug ownership and access properties for all scripts which is a PITA. |
Send message Joined: 21 May 16 Posts: 37 |
BeemerBiker, could you please show us the output of # cat /usr/lib/systemd/system/boinc-client.service |
Send message Joined: 27 Jun 08 Posts: 641 |
[size=12] BeemerBiker, could you please show us the output of Something wrong with that, there is no "system" nor any reference to boinc jstateson@rx560:/usr/lib$ cd systemd jstateson@rx560:/usr/lib/systemd$ ls boot system-environment-generators user-environment-generators catalog tests user-generators logind.conf.d user user-preset jstateson@rx560:/usr/lib/systemd$ find . -name "*boinc*" -print jstateson@rx560:/usr/lib/systemd$ [EDIT] there are refs to boinc in syslog, will that do?? syslog:May 19 11:33:17 rx560 boinc[1636]: 19-May-2019 11:33:17 [---] Exiting syslog:May 19 11:33:54 rx560 boinc[838]: 19-May-2019 11:33:54 [---] Starting BOINC client version 7.9.3 for x86_64-pc-linux-gnu syslog:May 19 11:33:54 rx560 boinc[838]: 19-May-2019 11:33:54 [---] log flags: file_xfer, sched_ops, task syslog:May 19 11:33:54 rx560 boinc[838]: 19-May-2019 11:33:54 [---] Libraries: libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3 syslog:May 19 11:33:54 rx560 boinc[838]: 19-May-2019 11:33:54 [---] Data directory: /var/lib/boinc-client syslog:May 19 11:33:55 rx560 boinc[838]: 19-May-2019 11:33:55 [---] No usable GPUs found syslog:May 19 11:33:55 rx560 boinc[838]: 19-May-2019 11:33:55 [---] app version refers to missing GPU type ATI syslog:May 19 11:33:55 rx560 boinc[838]: 19-May-2019 11:33:55 [SETI@home] Application uses missing ATI GPU syslog:May 19 11:33:55 rx560 boinc[838]: 19-May-2019 11:33:55 [---] app version refers to missing GPU type ATI syslog:May 19 11:33:55 rx560 boinc[838]: 19-May-2019 11:33:55 [SETI@home] Application uses missing ATI GPU syslog:May 19 11:33:55 rx560 boinc[838]: 19-May-2019 11:33:55 [---] app version refers to missing GPU type ATI syslog:May 19 11:33:55 rx560 boinc[838]: 19-May-2019 11:33:55 [SETI@home] Application uses missing ATI GPU syslog:May 19 11:33:55 rx560 boinc[838]: 19-May-2019 11:33:55 [SETI@home] Missing coprocessor for task blc25_2bit_guppi_58340_41306_GJ876_0038.19434.409.19.28.102.vlar_0 Maybe I have an old distribution. I got 18.04 from here https://www.ubuntu.com/download/desktop all I did after getting it to work was apt-get install boinc-client have no idea where that came from but AFAICT it is not the lastest and greatest. |
Send message Joined: 21 May 16 Posts: 37 |
I have been told that on Ubuntu systemd unit file should be under /lib/systemd/system Please find boinc systemd unit file and paste it here |
Send message Joined: 27 Jun 08 Posts: 641 |
I have been told that on Ubuntu systemd unit file should be under /lib/systemd/system working on it. did find searching from root. [sudo] password for jstateson: root@rx560:/# find . -name "boinc-client.service" -print ./lib/systemd/system/boinc-client.service ./etc/systemd/system/multi-user.target.wants/boinc-client.service find: ‘./run/user/1000/gvfs’: Permission denied ./sys/fs/cgroup/pids/system.slice/boinc-client.service ./sys/fs/cgroup/devices/system.slice/boinc-client.service ./sys/fs/cgroup/systemd/system.slice/boinc-client.service ./sys/fs/cgroup/unified/system.slice/boinc-client.service ./var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/boinc-client.service ===========here======== HOWEVER, THIS IS PROBABLY FROM THE RESTART SHOULD I REBOOT TO GENERATE THE PROBLEM?? ====================== root@rx560:/lib/systemd/system# ls -l boin* -rw-r--r-- 1 root root 418 May 22 2018 boinc-client.service root@rx560:/lib/systemd/system# cat boinc-client.service [Unit] Description=Berkeley Open Infrastructure Network Computing Client Documentation=man:boinc(1) After=network-online.target [Service] ProtectHome=true Type=simple Nice=10 User=boinc WorkingDirectory=/var/lib/boinc ExecStart=/usr/bin/boinc ExecStop=/usr/bin/boinccmd --quit ExecReload=/usr/bin/boinccmd --read_cc_config ExecStopPost=/bin/rm -f lockfile IOSchedulingClass=idle [Install] WantedBy=multi-user.target root@rx560:/lib/systemd/system# |
Send message Joined: 27 Jun 08 Posts: 641 |
Don't see much useful in that file |
Send message Joined: 21 May 16 Posts: 37 |
Don't see much useful in that file I do see instead. I had to understand if that happened even with BOINC upstream systemd unit file. Can you also show us the output of # systemctl status boinc-client # lsmod |
Send message Joined: 27 Jun 08 Posts: 641 |
Don't see much useful in that file http://stateson.net/images/boinc_info.txt There is a message when I log in about packages that can be updated and security concerns. I am going to update. * Canonical Livepatch is available for installation. - Reduce system reboots and improve kernel security. Activate at: https://ubuntu.com/livepatch 0 packages can be updated. 0 updates are security updates. Your Hardware Enablement Stack (HWE) is supported until April 2023. Last login: Sun May 19 13:27:55 2019 from 192.168.1.212 jstateson@rx560:~$ not sure about livepatch |
Send message Joined: 21 May 16 Posts: 37 |
This problem is going to be addressed upstream on Github, among BOINC issues. Thank you |
Send message Joined: 5 Oct 06 Posts: 5130 |
I see one possible point of confusion: BeemerBiker is showing us logs relating to an old, development version of BOINC (v7.9.3 - note the 'odd' middle integer), whereas Germano will be seeking to build onwards and upwards from the current release version 7.14.2 |
Send message Joined: 27 Jun 08 Posts: 641 |
I see one possible point of confusion: BeemerBiker is showing us logs relating to an old, development version of BOINC (v7.9.3 - note the 'odd' middle integer), whereas Germano will be seeking to build onwards and upwards from the current release version 7.14.2 yes, I posted about that earlier but it was an edit "afterthought" about 1/2 hour after the original post. is there as way to get the latest? I use the "apt-get" for everything. quote" Maybe I have an old distribution. I got 18.04 from here https://www.ubuntu.com/download/desktop all I did after getting it to work was apt-get install boinc-client have no idea where that came from but AFAICT it is not the lastest and greatest " |
Send message Joined: 5 Mar 08 Posts: 272 |
There is a similar query about delaying service startup on StackOverflow. See https://stackoverflow.com/questions/43001223/how-to-ensure-that-there-is-a-delay-before-a-service-is-started-in-systemd There are a few suggestions in there but I think using a timer and disabling the service is probably the easier one for you. It would be better if BOINC could do it as a config option as not all of us will want a delay and then there are the many different ways of doing it (just look at the message thread I linked to) and the different systemd/initd used by different flavours of Linux. BOINC already has a start_delay config option, however thats after its got going and before running tasks. Can we move that delay so that it occurs before the GPU detection? That way we don’t need another config option. MarkJ |
Send message Joined: 27 Jun 08 Posts: 641 |
There is a similar query about delaying service startup on StackOverflow. See https://stackoverflow.com/questions/43001223/how-to-ensure-that-there-is-a-delay-before-a-service-is-started-in-systemd I looked at that thread and tried ExecStarPre=/bin/sleep 60 but BOINC did not start. Found following error in syslog May 20 07:30:16 rx560 systemd[1]: boinc-client.service: Start-pre operation timed out. Terminating. May 20 07:30:16 rx560 systemd[1]: boinc-client.service: Failed with result 'timeout'. May 20 07:30:16 rx560 systemd[1]: Failed to start Berkeley Open Infrastructure Network Computing Client. Following was my mod: [Unit] Description=Berkeley Open Infrastructure Network Computing Client Documentation=man:boinc(1) After=network-online.target [Service] ProtectHome=true Type=simple Nice=10 User=boinc WorkingDirectory=/var/lib/boinc ExecStartPre=/bin/sleep 60 ExecStart=/usr/bin/boinc ExecStop=/usr/bin/boinccmd --quit ExecReload=/usr/bin/boinccmd --read_cc_config ExecStopPost=/bin/rm -f lockfile IOSchedulingClass=idle [Install] WantedBy=multi-user.target I would have thought this would work. I verified that sleep was at /bin jstateson@rx560:/bin$ ls -l sleep -rwxr-xr-x 1 root root 35000 Jan 18 2018 sleep jstateson@rx560:/bin$ Why didn't this work? Ownership? Attributes? I assume it terminated because it could not be executed?? [EDIT] I have 4 AMD S9x00 cards on Win10x64 system and had to add a 5 minute delay in the task scheduler as recommended by Jord. Your suggest about using the cc_config is the way to go. How would this get into the Ubuntu release? I have 7.9.3 and that is not even listed as a download at Berkeley. All I see there is 7.4.22. Is there even a 7.14.2 for Linux? |
Send message Joined: 27 Jun 08 Posts: 641 |
Needed to add TimeoutSec=infinity else time out default is 1min 30sec which is too short I had actually used 300 not the 60 I wrote earlier. The 60 would not have triggered the timeout but it was not long enough for GPU detection. This did work fine 1 5/20/2019 10:22:37 AM Starting BOINC client version 7.9.3 for x86_64-pc-linux-gnu 2 5/20/2019 10:22:37 AM log flags: file_xfer, sched_ops, task 3 5/20/2019 10:22:37 AM Libraries: libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3 4 5/20/2019 10:22:37 AM Data directory: /var/lib/boinc-client 5 5/20/2019 10:22:37 AM OpenCL: AMD/ATI GPU 0: Radeon RX 560 Series (driver version 2841.4, device version OpenCL 1.2 AMD-APP (2841.4), 3812MB, 3812MB available, 2449 GFLOPS peak) 6 5/20/2019 10:22:37 AM OpenCL: AMD/ATI GPU 1: Radeon RX 560 Series (driver version 2841.4, device version OpenCL 1.2 AMD-APP (2841.4), 4059MB, 4059MB available, 2449 GFLOPS peak) 7 5/20/2019 10:22:37 AM OpenCL: AMD/ATI GPU 2: Radeon RX 560 Series (driver version 2841.4, device version OpenCL 1.2 AMD-APP (2841.4), 4059MB, 4059MB available, 2449 GFLOPS peak) 8 5/20/2019 10:22:37 AM OpenCL: AMD/ATI GPU 3: Radeon RX 560 Series (driver version 2841.4, device version OpenCL 1.2 AMD-APP (2841.4), 4059MB, 4059MB available, 2449 GFLOPS peak) 9 5/20/2019 10:22:37 AM OpenCL: AMD/ATI GPU 4: Radeon RX 560 Series (driver version 2841.4, device version OpenCL 1.2 AMD-APP (2841.4), 4059MB, 4059MB available, 2449 GFLOPS peak) 10 5/20/2019 10:22:37 AM [libc detection] gathered: 2.27, Ubuntu GLIBC 2.27-3ubuntu1 11 5/20/2019 10:22:37 AM Host name: rx560 12 5/20/2019 10:22:37 AM Processor: 2 GenuineIntel Intel(R) Celeron(R) CPU G1840 @ 2.80GHz [Family 6 Model 60 Stepping 3] 13 5/20/2019 10:22:37 AM Processor features: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmper 14 5/20/2019 10:22:37 AM OS: Linux Ubuntu: Ubuntu 18.04.2 LTS [4.18.0-20-generic|libc 2.27 (Ubuntu GLIBC 2.27-3ubuntu1)] |
Send message Joined: 21 May 16 Posts: 37 |
Among people experiencing this problem, does anybody have a Fedora/RHEL/CentOS distribution? I am going to produce a patch prototype to fix this problem |
Send message Joined: 21 May 16 Posts: 37 |
Keithsplace could you try this fix. As root add file /lib/udev/rules.d/01-boinc-gpu-plugged.rules with content ACTION=="add", SUBSYSTEM=="drm", RUN+=systemctl --no-block restart boinc-client.service then run # udevadm control --reload-rules and reboot. Can you still experience the problem? Thank you P.S. This is just a workaround because a final patch will be implemented by using libudev rather than udev rules. |
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.