mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Do a complete cgminer restart if the ATI Display Library fails, as it does on windows after running for some time, when fanspeed reporting fails.
This commit is contained in:
parent
7c6090fbaf
commit
dc70fe9ce0
10
adl.c
10
adl.c
@ -679,6 +679,16 @@ int gpu_fanpercent(int gpu)
|
|||||||
lock_adl();
|
lock_adl();
|
||||||
ret = __gpu_fanpercent(ga);
|
ret = __gpu_fanpercent(ga);
|
||||||
unlock_adl();
|
unlock_adl();
|
||||||
|
if (unlikely(ga->has_fanspeed && ret == -1)) {
|
||||||
|
applog(LOG_WARNING, "GPU %d stopped reporting fanspeed due to driver corruption", gpu);
|
||||||
|
if (opt_restart) {
|
||||||
|
applog(LOG_WARNING, "Restart enabled, will restart cgminer");
|
||||||
|
applog(LOG_WARNING, "You can disable this with the --no-restart option");
|
||||||
|
app_restart();
|
||||||
|
}
|
||||||
|
applog(LOG_WARNING, "Disabling fanspeed monitoring on this device");
|
||||||
|
ga->has_fanspeed = false;
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
miner.h
1
miner.h
@ -657,5 +657,6 @@ extern void tq_freeze(struct thread_q *tq);
|
|||||||
extern void tq_thaw(struct thread_q *tq);
|
extern void tq_thaw(struct thread_q *tq);
|
||||||
extern bool successful_connect;
|
extern bool successful_connect;
|
||||||
extern void adl(void);
|
extern void adl(void);
|
||||||
|
extern void app_restart(void);
|
||||||
|
|
||||||
#endif /* __MINER_H__ */
|
#endif /* __MINER_H__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user