我记得以前是会清屏然后再提示我输入帐号,
现在是 login: 直接显示跟在启动信息后面, 请问这是什么原因?
估计就是16楼那边说的原因了
把radeon弄到 mkinitcpio.conf 重新打包内核提前加载,解决了
最近编辑记录 atmouse (2015-03-26 18:47:05)
离线
getty@tty1.service 里默认的 TTYVTDisallocate=yes 没了?被覆盖了?
systemctl cat getty@tty1.service 看看。
离线
这是完整的tty service
那个disallocate=yes有在
atmouse@ArchCC ~ % systemctl cat getty@tty1.service
# /usr/lib/systemd/system/getty@.service
# 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.
[Unit]
Description=Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
Documentation=http://0pointer.de/blog/projects/serial-console.html
After=systemd-user-sessions.service plymouth-quit-wait.service
# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes
# On systems without virtual consoles, don't start any getty. Note
# that serial gettys are covered by serial-getty@.service, not this
# unit.
ConditionPathExists=/dev/tty0
[Service]
# the VT is cleared by TTYVTDisallocate
ExecStart=-/sbin/agetty --noclear %I $TERM
Type=idle
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes
# Unset locale for the console getty since the console has problems
# displaying some internationalized messages.
Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
[Install]
WantedBy=getty.target
DefaultInstance=tty1
最近编辑记录 atmouse (2015-03-07 20:57:25)
离线
补充:
有时候却会清理屏幕,然后在上面显示login。 有时候不会。
那个TTYVTDisallocate=yes有设置后,清理屏幕还有什么条件么?
还有那个。。。/sbin/agetty --noclear
这个就是不清屏么。。。
这个service我没改,为啥有noclear参数?
最近编辑记录 atmouse (2015-03-07 21:05:11)
离线
这是完整的tty service
那个disallocate=yes有在
cat 改成 show 呢?
离线
因为 systemd 负责清屏,所以不让 getty 清了。
有时会有时不会的话就比较麻烦了。试试看能不能在 LXC 里复现?
离线
show
Type=idle
Restart=always
NotifyAccess=none
RestartUSec=0
TimeoutStartUSec=1min 30s
TimeoutStopUSec=1min 30s
WatchdogUSec=0
WatchdogTimestamp=Sat 2015-03-07 19:35:59 CST
WatchdogTimestampMonotonic=3448171
StartLimitInterval=10000000
StartLimitBurst=5
StartLimitAction=none
FailureAction=none
PermissionsStartOnly=no
RootDirectoryStartOnly=no
RemainAfterExit=no
GuessMainPID=yes
MainPID=363
ControlPID=0
StatusErrno=0
Result=success
ExecMainStartTimestamp=Sat 2015-03-07 19:35:59 CST
ExecMainStartTimestampMonotonic=3448145
ExecMainExitTimestampMonotonic=0
ExecMainPID=363
ExecMainCode=0
ExecMainStatus=0
ExecStart={ path=/sbin/agetty ; argv[]=/sbin/agetty --noclear %I $TERM ; ignore_errors=yes ; start_time=[Sat 2015-03-07 19:35:59 CST] ; stop_time=[n/a] ; pid=363 ; code=(null) ; status=0/0 }
Slice=system-getty.slice
ControlGroup=/system.slice/system-getty.slice/getty@tty1.service
Delegate=no
CPUAccounting=no
CPUShares=18446744073709551615
StartupCPUShares=18446744073709551615
CPUQuotaPerSecUSec=infinity
BlockIOAccounting=no
BlockIOWeight=18446744073709551615
StartupBlockIOWeight=18446744073709551615
MemoryAccounting=no
MemoryLimit=18446744073709551615
DevicePolicy=auto
Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
UMask=0022
LimitCPU=18446744073709551615
LimitFSIZE=18446744073709551615
LimitDATA=18446744073709551615
LimitSTACK=18446744073709551615
LimitCORE=18446744073709551615
LimitRSS=18446744073709551615
LimitNOFILE=4096
LimitAS=18446744073709551615
LimitNPROC=62701
LimitMEMLOCK=65536
LimitLOCKS=18446744073709551615
LimitSIGPENDING=62701
LimitMSGQUEUE=819200
LimitNICE=0
LimitRTPRIO=0
LimitRTTIME=18446744073709551615
OOMScoreAdjust=0
Nice=0
IOScheduling=0
CPUSchedulingPolicy=0
CPUSchedulingPriority=0
TimerSlackNSec=50000
CPUSchedulingResetOnFork=no
NonBlocking=no
StandardInput=null
StandardOutput=journal
StandardError=inherit
TTYPath=/dev/tty1
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
SyslogPriority=30
SyslogLevelPrefix=yes
SecureBits=0
CapabilityBoundingSet=18446744073709551615
MountFlags=0
PrivateTmp=no
PrivateNetwork=no
PrivateDevices=no
ProtectHome=no
ProtectSystem=no
SameProcessGroup=no
UtmpIdentifier=tty1
IgnoreSIGPIPE=no
NoNewPrivileges=no
SystemCallErrorNumber=0
RuntimeDirectoryMode=0755
KillMode=process
KillSignal=15
SendSIGKILL=yes
SendSIGHUP=yes
Id=getty@tty1.service
Names=getty@tty1.service
Requires=basic.target
Wants=system-getty.slice
WantedBy=getty.target
Conflicts=shutdown.target
Before=shutdown.target getty.target
After=plymouth-quit-wait.service systemd-user-sessions.service systemd-journald.socket system-getty.slice basic.target
Documentation=man:agetty(8) man:systemd-getty-generator(8) http://0pointer.de/blog/projects/serial-console.html
Description=Getty on tty1
LoadState=loaded
ActiveState=active
SubState=running
FragmentPath=/usr/lib/systemd/system/getty@.service
UnitFileState=enabled
UnitFilePreset=enabled
InactiveExitTimestamp=Sat 2015-03-07 19:35:59 CST
InactiveExitTimestampMonotonic=3448187
ActiveEnterTimestamp=Sat 2015-03-07 19:35:59 CST
ActiveEnterTimestampMonotonic=3448187
ActiveExitTimestampMonotonic=0
InactiveEnterTimestampMonotonic=0
CanStart=yes
CanStop=yes
CanReload=no
CanIsolate=no
StopWhenUnneeded=no
RefuseManualStart=no
RefuseManualStop=no
AllowIsolate=no
DefaultDependencies=yes
OnFailureJobMode=replace
IgnoreOnIsolate=yes
IgnoreOnSnapshot=no
NeedDaemonReload=no
JobTimeoutUSec=0
JobTimeoutAction=none
ConditionResult=yes
AssertResult=yes
ConditionTimestamp=Sat 2015-03-07 19:35:59 CST
ConditionTimestampMonotonic=3447628
AssertTimestamp=Sat 2015-03-07 19:35:59 CST
AssertTimestampMonotonic=3447632
Transient=no
离线
我可能没有描述清楚,就是说,正常情况下我开机,启动到tty1的时候
有一大堆启动信息下来,
然后光标停在最后一行,login提示没有显示出来,也没有清屏。
这时候我按一下enter,login提示就出来了,跟在最下面,但没有清屏。
我说的有时候会清屏,意思就是一堆启动信息刷下来后,自动就清屏了,然后显示login提示。
最近编辑记录 atmouse (2015-03-07 21:45:02)
离线
lxc我没有弄,再设置的话就变麻烦了。。
离线
我感觉是你的 getty@tty1 启动得太早了呢。你用 systemd-analyze plot 看看启动顺序?
离线
离线
启动得太早是什么意思? 启动得太早导致什么么?
离线
好快的启动速度……
会导致如下序列的发生:
systemd 开始启动任务 -> getty@tty1 开始启动 -> 清屏、打出 login -> systemd 写日志到 tty1
正常情况下的顺序应该是:
systemd 开始启动任务 -> systemd 写日志到 tty1 -> getty@tty1 开始启动 -> 清屏、打出 login
离线
额,你这么一说。。可能跟radeonfb驱动初始化有关
在启动的时候,systemd在刷启动信息的时候,radeon会重置分辨率,我dmesg看到从efifb切换到radeondrmfb,这时候屏幕是黑的
大概过1秒恢复后 systemd的启动信息又继续刷下来。
我猜在这1秒内,getty@tty1其实已经启动并清屏打login了。 1秒过后显示的东西我估计是因为radeon自己的内部硬件异步打出的。
最近编辑记录 atmouse (2015-03-08 00:35:39)
离线
嗯有可能。
离线