Bitcoin Forum
May 12, 2024, 06:26:29 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Linux: Reboot after Failed GPU's  (Read 577 times)
moonmaths (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
February 20, 2017, 12:04:36 PM
 #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. 
1715495189
Hero Member
*
Offline Offline

Posts: 1715495189

View Profile Personal Message (Offline)

Ignore
1715495189
Reply with quote  #2

1715495189
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715495189
Hero Member
*
Offline Offline

Posts: 1715495189

View Profile Personal Message (Offline)

Ignore
1715495189
Reply with quote  #2

1715495189
Report to moderator
1715495189
Hero Member
*
Offline Offline

Posts: 1715495189

View Profile Personal Message (Offline)

Ignore
1715495189
Reply with quote  #2

1715495189
Report to moderator
1715495189
Hero Member
*
Offline Offline

Posts: 1715495189

View Profile Personal Message (Offline)

Ignore
1715495189
Reply with quote  #2

1715495189
Report to moderator
jk_14
Legendary
*
Offline Offline

Activity: 1292
Merit: 1000


View Profile
February 21, 2017, 03:12:06 AM
 #2


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


run sgminer as root? Smiley
galaxy5user
Newbie
*
Offline Offline

Activity: 55
Merit: 0


View Profile
March 14, 2017, 12:35:11 PM
 #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.
skyvacrypto
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
February 02, 2018, 06:23:05 AM
 #4

ever figure this out? im trying to write something that restarts them automatically...but im running into this problem.
moonmaths (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
February 19, 2018, 08: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. 
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!