Ubuntu关机等待时间解决方案

关于GDM问题(a stop job is running for session c1 of user root 1 min 30 s)

注意了,这个不是系统的问题,是配置的问题。鼓捣了老久才找出来这个问题的解决方案。

因为每次关机都要经历这个,而且恰好到90s才开始关机,就觉得肯定是配置的问题了。

hcking@kali:~$ sudo vim /etc/systemd/system.conf
[sudo] hcking 的密码:


终端命令如上,使用VIM打开配置文件。在最后新增一行,将以下内容复制下去,重启后配置即可生效。
DefaultTimeoutStartSec=10s
DefaultTimeoutStopSec=10s


有一点要注意,请检查自己的配置文件是否所有配置前都有"#"号,如果有,按刚才的操作,如果没有,Kali2017.3 Rolling版本找到DefaultTimeoutStartSec= 和DefaultTimeOutStopSec,如果前面没有"#",将后面的数值全部改为10s即可,如果有该符号,去掉该符号后修改为10s即可。


附上我的整个配置文件:


# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See systemd-system.conf(5) for details.

[Manager]
#LogLevel=info
#LogTarget=journal-or-kmsg
#LogColor=yes
#LogLocation=no
#DumpCore=yes
#ShowStatus=yes
#CrashChangeVT=no
#CrashShell=no
#CrashReboot=no
#CtrlAltDelBurstAction=reboot-force
#CPUAffinity=1 2
#JoinControllers=cpu,cpuacct net_cls,net_prio
#RuntimeWatchdogSec=0
#ShutdownWatchdogSec=10min
#CapabilityBoundingSet=
#SystemCallArchitectures=
#TimerSlackNSec=
#DefaultTimerAccuracySec=1min
#DefaultStandardOutput=journal
#DefaultStandardError=inherit
#DefaultTimeoutStartSec=90s
#DefaultTimeoutStopSec=90s
DefaultTimeoutStartSec=10s
DefaultTimeoutStopSec=10s
#DefaultRestartSec=100ms
#DefaultStartLimitIntervalSec=10s
#DefaultStartLimitBurst=5
#DefaultEnvironment=
#DefaultCPUAccounting=no
#DefaultIOAccounting=no
#DefaultIPAccounting=no
#DefaultBlockIOAccounting=no
#DefaultMemoryAccounting=no
#DefaultTasksAccounting=yes
#DefaultTasksMax=
#DefaultLimitCPU=
#DefaultLimitFSIZE=
#DefaultLimitDATA=
#DefaultLimitSTACK=
#DefaultLimitCORE=
#DefaultLimitRSS=
#DefaultLimitNOFILE=
#DefaultLimitAS=
#DefaultLimitNPROC=
#DefaultLimitMEMLOCK=
#DefaultLimitLOCKS=
#DefaultLimitSIGPENDING=
#DefaultLimitMSGQUEUE=
#DefaultLimitNICE=
#DefaultLimitRTPRIO=
#DefaultLimitRTTIME=
#IPAddressAllow=
#IPAddressDeny=

————————————————
版权声明:本文为CSDN博主「竹寒 天竺」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/m0_37217636/article/details/78935941

posted @ 2019-09-28 15:35  _L先生  阅读(1416)  评论(0编辑  收藏  举报