Author

Topic: Linux: Reboot after Failed GPU's (Read 601 times)

newbie
Activity: 26
Merit: 0
February 19, 2018, 03:55:32 PM
#5
I don't have that rig anymore, sorry. 
But if I remember correctly, I was using screen on the rig, and using a root user for screen (and thus sgminer), I sstopped the annoying errors, and it would reboot.  It probably wasn't the kosher way, but it got the job done. 
newbie
Activity: 3
Merit: 0
February 02, 2018, 01:23:05 AM
#4
ever figure this out? im trying to write something that restarts them automatically...but im running into this problem.
newbie
Activity: 55
Merit: 0
March 14, 2017, 07:35:11 AM
#3
Is there any progress? How you been able to run sgminer in daemon mode? For me it starts only when stdin is bound to the terminal.
legendary
Activity: 1292
Merit: 1000
February 20, 2017, 10:12:06 PM
#2

but since I'm not running sgminer as sudo, the program spits out a permissions error. 


run sgminer as root? Smiley
newbie
Activity: 26
Merit: 0
February 20, 2017, 07:04:36 AM
#1
Hoping some linux or screen guru can help here with rebooting when a GPU is sick/dead. 

I've got the options configured correctly for sgminer-gm to attempt the reboot after gpu-failure, but since I'm not running sgminer as sudo, the program spits out a permissions error. 
I'm using screen to create a new session, start the miner at every boot.  I only run into a problem when a GPU flunks out on me, and I'm new to linux, so still learning systemd.  Does anyone know the proper way to let sgminer reboot when it attempts to? 

I'm on Ubuntu 16.04 kernel 4.8.3-040803-generic amdgpu-pro-16.50

Here's the error (from within the miner)..

Thread 0 still exists, killing it off
Failed to set wall message, ignoring: Interactive authentication required.
Failed to reboot system via logind: Interactive authentication required.
Failed to start reboot.target: Interactive authentication required.
See system logs and 'systemctl status reboot.target' for details.
Failed to open /dev/initctl: Permission denied
Failed to talk to init daemon.

GPU0: Not responded for more than 10 minutes, declaring DEAD!
running shutdown -r now
Failed to set wall message, ignoring: Interactive authentication required.
Failed to reboot system via logind: Interactive authentication required.
Failed to start reboot.target: Interactive authentication required.
See system logs and 'systemctl status reboot.target' for details.
Failed to open /dev/initctl: Permission denied
Failed to talk to init daemon.


"systemctl status reboot.target" shows..
Code:
● reboot.target - Reboot
   Loaded: loaded (/lib/systemd/system/reboot.target; enabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:systemd.special(7)

My systemd service to start up the miner (which works fine afaik) is the following:
Code:

[Unit]
Description=Monero GPU miner
After=network.target multi-user.target

[Service]
Type=forking
User=miner
Environment="DISPLAY=:0"
Environment="GPU_MAX_ALLOC_PERCENT=100"
Environment="GPU_USE_SYNC_OBJECTS=1"
WorkingDirectory=/home/kaminer/sgminer-gm/
ExecStart=/usr/bin/screen -d -m -S sgminer /usr/local/bin/sgminer
ExecStop=/usr/bin/killall -w -s 2 sgminer
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

I'm thinking I should be able to elevate priveleges for certain screen sessions or maybe make an alias for the reboot command within that session (so that I am only changing the priveleges within that single command w/in that single session) but am having a hard time figuring out how. 
Jump to: