gnome - ubuntu Desktop 20.04从GUI无法关机

分享于 

2分钟阅读

ubuntu

  繁體

问题:

当我使用右键菜单,并单击关机时,什么也没发生。当我在终端输入

 
sudo shutdown now



sudo nano /etc/systemd/system/wol.service


[Unit]


Description=Configure Wake On LAN



[Service]


Type=oneshot


ExecStart=/sbin/ethtool -s enp12s0 wol g



[Install]


WantedBy=basic.target




sudo systemctl daemon-reload


sudo systemctl enable wol.service


sudo systemctl start wol.service



我还尝试从编辑/etc/default/grub:


RUB_CMDLINE_LINUX_DEFAULT="quiet splash"



到:


GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force"



 
sudo update-grub



重新启动后,问题仍然存在。

当我尝试:

 
shutdown -h now



出现以下错误消息:

Failed to power off system via logind : there's already a shutdown or sleep operation in progress

日志:

usr1@ubuntu-nb:~$ journalctl -a -p err -b
-- Logs begin at Mon 2020-07-13 15:42:03 CEST, end at Wed 2020-07-29 21:07:46 CEST. --
Jul 29 20:52:01 ubuntu-nb kernel: Bluetooth: hci0: unexpected event for opcode 0x0000 Jul 29 20:53:35 ubuntu-nb gdm-password][1695]: gkr-pam: unable to locate daemon control file
Jul 29 20:59:06 ubuntu-nb gdm-password][3270]: gkr-pam: unable to locate daemon control file
Jul 29 21:02:13 ubuntu-nb gdm-password][4508]: gkr-pam: unable to locate daemon control file

答案1:

尝试通过执行shutdown -c取消关闭操作

然后试着关掉机器。


答案2:

确保在BIOS/UEFI中启用了Wake on Lan ...(如果您的bios/UEFI中还有其他与WOL相关的设置,请对其进行测试。)



DES  gui  Ubuntu  桌面  Gnome  关机