We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f216dd5 commit b722e1dCopy full SHA for b722e1d
hush/hardware/nvidia.py
@@ -24,7 +24,9 @@ async def get_temp(self):
24
raise e
25
26
async def set_speed(self, speed):
27
- await self.ssh.shell(f'export DISPLAY=:0 && nvidia-settings -c $DISPLAY -a "GPUFanControlState=1" -a "GPUTargetFanSpeed={speed}"')
+ result = await self.ssh.execute(f'export DISPLAY=:0 && nvidia-settings -c $DISPLAY -a "GPUFanControlState=1" -a "GPUTargetFanSpeed={speed}"')
28
+ if result.stdout.count("assigned value") != 2:
29
+ raise SystemError
30
31
async def close(self):
- await self.ssh.shell('export DISPLAY=:0 && nvidia-settings -c $DISPLAY -a "GPUFanControlState=0"')
32
+ await self.ssh.execute('export DISPLAY=:0 && nvidia-settings -c $DISPLAY -a "GPUFanControlState=0"')
0 commit comments