我买了一个KSTAR 600 USB线互动UPS与USB。它可以正常工作,但是我想在停电的时候关掉蜂鸣声。
当我将USB电缆插入我的笔记本(运行Ubuntu18.04)时,它似乎是syslog中的一个MEC0003设备:
Jun 16 11:48:50 smurfenaar kernel: [103981.169542] usb 1-3: Product: MEC0003我需要什么软件和配置来关闭蜂鸣声?
发布于 2020-06-16 11:11:59
我让它使用网络UPS工具(NUT)
配置NUT
$ sudo apt install nut nut-cgiSudo编辑的/etc/nut/ups.conf包含:
# Set maxretry to 3 by default, this should mitigate race with slow devices:
maxretry = 3
[kstar]
driver = nutdrv_qx
port = auto
desc = "Description of this UPS"以及编辑/etc/nut/upsd.users
[admin]
password = youradminpassword
actions = SET
instcmds = ALL最后,sudo编辑/etc/nut/nut.conf并确保MODE设置为standalone:
MODE=standalone启动ups驱动程序和NUT deamon:
$ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic Q* USB/Serial driver 0.28 (2.7.4)
USB communication driver 0.33
Using protocol: Q1 0.07
Can't autodetect number of battery packs [-1/13.70]
Battery runtime will not be calculated (runtimecal not set)
$ sudo systemctl start nut-server若要查看当前的beep状态,请使用upsc命令:
$ upsc kstar
Init SSL without certificate database
battery.voltage: 13.70
device.type: ups
driver.name: nutdrv_qx
...
ups.beeper.status: enabled
...使用upscmd命令和在/etc/nut/upsd.users中配置的用户名和密码:
$ upscmd -u admin -p admin kstar beeper.toggle 我们看到蜂鸣声现在被禁用了
$ upscmd -u admin -p admin kstar beeper.toggle
OK
$ upsc kstar | grep beep
Init SSL without certificate database
ups.beeper.status: disabledupsc可能需要1秒钟或5秒钟才能反映状态变化。你看,空调坏了以后不要再嗡嗡叫了。
https://askubuntu.com/questions/1250840
复制相似问题