ubuntu17.10 系统死机

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu17.10 系统死机

#16

帖子 poloshiao » 2018-01-22 19:01

每天大约都在9:38分左右死机,系统启动10几分钟以后死机。
1. 注意 死機 的時間點 精準到 時:分:秒

2. 重開機 善用 -S, --since=, -U, --until= 參數
可以讓 journalctl 顯示出死機前 某個時間點 到 第二個時間點 的記錄
方便你聚焦在 該時間區間內的記錄 例如 使用 err 或 fail 等等跟錯誤有關的關鍵字 搜尋
2-1. 參見
2-1-1. http://manpages.ubuntu.com/manpages/art ... ctl.1.html
journalctl - Query the systemd journal
-S, --since=, -U, --until=
2-1-2. http://manpages.ubuntu.com/manpages/art ... ime.7.html
systemd.time - Time and date specifications
头像
widon1104
帖子: 839
注册时间: 2008-07-17 10:55

Re: ubuntu17.10 系统死机

#17

帖子 widon1104 » 2018-01-24 10:11

1月 24 09:58:12 widon-desktop /usr/lib/gdm3/gdm-x-session[4506]: 346,75,0,1,
1月 24 09:58:12 widon-desktop /usr/lib/gdm3/gdm-x-session[4506]: 346,75,0,1,
1月 24 09:58:39 widon-desktop Web Content[11503]: Unable to open /var/lib/snapd/desktop/dconf/profile/user: 权限不够
1月 24 10:01:33 widon-desktop sudo[11722]: widon : TTY=pts/0 ; PWD=/home/widon ; USER=root ; COMMAND=/usr/bin/apt update
1月 24 10:01:33 widon-desktop sudo[11722]: pam_unix(sudo:session): session opened for user root by (uid=0)
1月 24 10:01:42 widon-desktop gnome-software[5444]: running get-updates with refine-flags=require-update-details,require-update-severity with timeout=60 on plugin=systemd-updates took 2ms
1月 24 10:01:44 widon-desktop sudo[11722]: pam_unix(sudo:session): session closed for user root
1月 24 10:01:48 widon-desktop sudo[12132]: widon : TTY=pts/0 ; PWD=/home/widon ; USER=root ; COMMAND=/usr/bin/apt upgrade
1月 24 10:01:48 widon-desktop sudo[12132]: pam_unix(sudo:session): session opened for user root by (uid=0)
1月 24 10:01:57 widon-desktop NetworkManager[713]: <info> [1516759317.4297] manager: kernel firmware directory '/lib/firmware' changed
1月 24 10:02:01 widon-desktop NetworkManager[713]: <info> [1516759321.8478] manager: kernel firmware directory '/lib/firmware' changed
1月 24 10:02:07 widon-desktop systemd[1]: Started Run anacron jobs.
1月 24 10:02:07 widon-desktop anacron[13379]: Anacron 2.3 started on 2018-01-24
1月 24 10:02:07 widon-desktop anacron[13379]: Normal exit (0 jobs run)
1月 24 10:02:58 widon-desktop sudo[12132]: pam_unix(sudo:session): session closed for user root
1月 24 10:03:01 widon-desktop gnome-software[5444]: running get-updates with refine-flags=require-update-details,require-update-severity with timeout=60 on plugin=systemd-updates took 1ms


今天10:03分又死机了,但是10:03分只有一条log,journalctl -b -1根本看不出来死机原因是什么。
/var/log/kern.log里面,10:03分没有任何输出

我怎么才能知道,死机原因是什么啊?这样每天都死机,感觉很不开心
头像
widon1104
帖子: 839
注册时间: 2008-07-17 10:55

Re: ubuntu17.10 系统死机

#18

帖子 widon1104 » 2018-01-24 10:41

1月 24 10:36:11 widon-desktop /usr/lib/gdm3/gdm-x-session[1822]: open file /usr/share/fcitx-sogoupinyin/SogouInput/sgim_tip.bin failed.
1月 24 10:36:11 widon-desktop /usr/lib/gdm3/gdm-x-session[1822]: open file /usr/share/fcitx-sogoupinyin/SogouInput/sgim_urlGuide.bin failed.
1月 24 10:36:11 widon-desktop /usr/lib/gdm3/gdm-x-session[1822]: open file /usr/share/fcitx-sogoupinyin/SogouInput/sgim_tip.bin failed.
1月 24 10:36:11 widon-desktop /usr/lib/gdm3/gdm-x-session[1822]: open file /usr/share/fcitx-sogoupinyin/SogouInput/sgim_urlGuide.bin failed.
1月 24 10:36:11 widon-desktop /usr/lib/gdm3/gdm-x-session[1822]: open file /usr/share/fcitx-sogoupinyin/SogouInput/sgim_tip.bin failed.

10:37分又死机了,这次journalctl在10:37分没有任何输出。
头像
widon1104
帖子: 839
注册时间: 2008-07-17 10:55

Re: ubuntu17.10 系统死机

#19

帖子 widon1104 » 2018-01-24 12:58

1月 24 12:51:40 widon-desktop /usr/lib/gdm3/gdm-x-session[1870]: 751,479,1,1,
1月 24 12:51:40 widon-desktop /usr/lib/gdm3/gdm-x-session[1870]: 752,480,1,1,
1月 24 12:51:56 widon-desktop Web Content[10387]: Unable to open /var/lib/snapd/desktop/dconf/profile/user: 权限不够
1月 24 12:52:46 widon-desktop firefox.desktop[8483]: ATTENTION: default value of option force_s3tc_enable overridden by environment.
1月 24 12:54:26 widon-desktop firefox.desktop[8483]: ATTENTION: default value of option force_s3tc_enable overridden by environment.

12:55分死机,同样没有任何输出
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu17.10 系统死机

#20

帖子 poloshiao » 2018-01-24 14:54

1月 24 09:58:39 widon-desktop Web Content[11503]: Unable to open /var/lib/snapd/desktop/dconf/profile/user: 权限不够
1月 24 10:01:33 widon-desktop sudo[11722]: widon : TTY=pts/0 ; PWD=/home/widon ; USER=root ; COMMAND=/usr/bin/apt update
1月 24 10:01:33 widon-desktop sudo[11722]: pam_unix(sudo:session): session opened for user root by (uid=0)
...
1月 24 10:36:11 widon-desktop /usr/lib/gdm3/gdm-x-session[1822]: open file /usr/share/fcitx-sogoupinyin/SogouInput/sgim_tip.bin failed.
...
1月 24 12:51:56 widon-desktop Web Content[10387]: Unable to open /var/lib/snapd/desktop/dconf/profile/user: 权限不够
...
1月 24 10:02:07 widon-desktop systemd[1]: Started Run anacron jobs.
1月 24 10:02:07 widon-desktop anacron[13379]: Anacron 2.3 started on 2018-01-24
1月 24 10:02:07 widon-desktop anacron[13379]: Normal exit (0 jobs run)
1月 24 10:02:58 widon-desktop sudo[12132]: pam_unix(sudo:session): session closed for user root
...
1. 把下面指令 複製 貼進終端機 執行
1-1. whoami
1-2. pwd
1-3. sudo cat /etc/group | grep sudo
1-4. sudo ls -al /var/lib/snapd/desktop/dconf/profile | grep user
把結果全部直接 選取/複製/貼上來
不要摘錄 以免遺漏重要訊息
不要擷圖 方便回文直接引用你貼上來的資料 方便你閱讀
1-5. 參見
https://bugzilla.redhat.com/show_bug.cgi?id=921689
reports CRITICAL errors and complains dconf will not work properly.
/usr/lib/gdm3/gdm-x-session[1822]: open file /usr/share/fcitx-sogoupinyin/SogouInput/sgim_tip.bin failed.
...
2. 參見
2-1. https://github.com/FZUG/repo/issues/191
2-2. https://github.com/FZUG/repo/issues/192
2-3. 建議
換其它簡體中文輸入法 看看
1月 24 12:52:46 widon-desktop firefox.desktop[8483]: ATTENTION: default value of option force_s3tc_enable overridden by environment.
...
3. 可以暫時不理會
https://github.com/nwjs/nw.js/issues/53 ... -328825692
this warning, not an error,
today we've got the open source implementation libtxc-dxtn, so with open source graphic drivers this option is usually not needed anymore.

4. 猜測
你的系統 混淆了 使用者權限
4-1. 權限 詳細參閱
http://linux.vbird.org/linux_basic/0210 ... ission.php
Linux 的檔案權限與目錄配置
4-2. 從別的 Linux 發行版的使用者 初使用 Ubuntu 時 需要微調權限習慣 :
4-2-1. Ubuntu 預設關閉 root 登入
4-2-2. 對於權限還不熟悉時 儘量避免使用 root 登入 或 切換成 root 身份 執行指令
4-2-3. 儘量使用 安裝 Ubuntu 時創設的帳號登入
需要 root 權限時
sudo + console-command
gksudo + graphical-command
第一次使用 gksudo 需要先安裝 gksu 套件
在 gnome-shell 桌面環境 需要先按下 alt + F2 再輸入 gksudo + graphical-command
4-2-4. 特別是 圖形指令 或說 user-space 指令
亂用 root 權限 會 混淆權限 (包含 亂加 sudo 或 gksudo)
4-2-5. 參閱
4-2-5-1. https://help.ubuntu.com/community/FilePermissions
FilePermissions
4-2-5-2. https://help.ubuntu.com/community/RootSudo
RootSudo
4-2-5-3. https://help.ubuntu.com/community/Sudoers
Sudoers
头像
widon1104
帖子: 839
注册时间: 2008-07-17 10:55

Re: ubuntu17.10 系统死机

#21

帖子 widon1104 » 2018-01-24 15:45

widon@widon-desktop:~$ whoami
widon
widon@widon-desktop:~$ pwd
/home/widon
widon@widon-desktop:~$ sudo cat /etc/group | grep sudo
[sudo] widon 的密码:
sudo:x:27:widon
widon@widon-desktop:~$ sudo ls -al /var/lib/snapd/desktop/dconf/profile | grep user
ls: 无法访问'/var/lib/snapd/desktop/dconf/profile': 没有那个文件或目录
widon@widon-desktop:~$ ls /var/lib/s
snapd/ snmp/ sudo/ systemd/
widon@widon-desktop:~$ ls /var/lib/snapd/
apparmor/ auto-import/ desktop/ environment/ lib/ state.json
assertions/ cookie/ device/ firstboot/ snaps/ void/
widon@widon-desktop:~$ ls /var/lib/snapd/desktop/
widon@widon-desktop:~$

我的电脑账户只有一个啊,就是安装时设的账户
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu17.10 系统死机

#22

帖子 poloshiao » 2018-01-24 16:13

1月 24 09:58:39 widon-desktop Web Content[11503]: Unable to open /var/lib/snapd/desktop/dconf/profile/user: 权限不够
sudo ls -al /var/lib/snapd/desktop/dconf/profile | grep user
ls: 无法访问'/var/lib/snapd/desktop/dconf/profile': 没有那个文件或目录
1. 追蹤這個新的 Bug Report 看看 相同的路徑 相同的权限不够
https://bugs.launchpad.net/ubuntu/+sour ... ug/1743559
(apport-gtk:3962): Gtk-WARNING **: Theme parsing error: gtk.css:27:35: Junk at end of value
...
(/usr/lib/firefox/firefox:4437): dconf-WARNING **: Unable to open /var/lib/snapd/desktop/dconf/profile/user: Permission denied

2. 你曾經安裝 snap 或 snapd 後 又移除嗎 ?
2-1. 參閱
https://bugs.launchpad.net/ubuntu/+sour ... ug/1573767
apt-get purge snapd does not clear /var/lib/snapd
头像
widon1104
帖子: 839
注册时间: 2008-07-17 10:55

Re: ubuntu17.10 系统死机

#23

帖子 widon1104 » 2018-01-24 16:37

poloshiao 写了:
1月 24 09:58:39 widon-desktop Web Content[11503]: Unable to open /var/lib/snapd/desktop/dconf/profile/user: 权限不够
sudo ls -al /var/lib/snapd/desktop/dconf/profile | grep user
ls: 无法访问'/var/lib/snapd/desktop/dconf/profile': 没有那个文件或目录
1. 追蹤這個新的 Bug Report 看看 相同的路徑 相同的权限不够
https://bugs.launchpad.net/ubuntu/+sour ... ug/1743559
(apport-gtk:3962): Gtk-WARNING **: Theme parsing error: gtk.css:27:35: Junk at end of value
...
(/usr/lib/firefox/firefox:4437): dconf-WARNING **: Unable to open /var/lib/snapd/desktop/dconf/profile/user: Permission denied

2. 你曾經安裝 snap 或 snapd 後 又移除嗎 ?
2-1. 參閱
https://bugs.launchpad.net/ubuntu/+sour ... ug/1573767
apt-get purge snapd does not clear /var/lib/snapd
这些bug不会导致死机吧,老火的是死机啊,几乎每天都死机。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu17.10 系统死机

#24

帖子 poloshiao » 2018-01-24 18:49

这些bug不会导致死机吧,
這要看 死機 的定義
有很多种情況

發生死機時
按下 alt + F2
看看 能否出現 輸入框
如果可以 輸入 r
然後等一下 看看 能否復活過來
這樣 就不必重新開機

補充
這是重新啟用 gnome-shell
只適用於 Ubuntu 17.10 及以後版本
头像
widon1104
帖子: 839
注册时间: 2008-07-17 10:55

Re: ubuntu17.10 系统死机

#25

帖子 widon1104 » 2018-01-24 20:47

poloshiao 写了:
这些bug不会导致死机吧,
這要看 死機 的定義
有很多种情況

發生死機時
按下 alt + F2
看看 能否出現 輸入框
如果可以 輸入 r
然後等一下 看看 能否復活過來
這樣 就不必重新開機

補充
這是重新啟用 gnome-shell
只適用於 Ubuntu 17.10 及以後版本
我的死机是完全死了,按什么都没有反应啊。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu17.10 系统死机

#26

帖子 poloshiao » 2018-01-24 20:53

按什么都没有反应啊。
左手按住 Alt 不放
右手 依序 按下 (中間稍微間隔 1 ~ 3 秒鐘)
SysRq 鍵 (即 Print Screen 鍵)
r
e
i
s
u
b
會不會 有所反應

參閱
https://en.wikipedia.org/wiki/Magic_SysRq_key#Uses
Magic SysRq key
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu17.10 系统死机

#27

帖子 poloshiao » 2018-01-24 21:31

1. 把下面指令 複製 貼進終端機 執行
1-1. sudo lshw -numeric -class video
1-2. echo $DESKTOP_SESSION
1-3. echo $XDG_SESSION_TYPE
1-4. sudo cat /etc/gdm3/custom.conf | grep WaylandEnable
把結果直接複製貼上來

目的 要了解你的 顯卡硬件/驅動 是否 充分支援 你所登入的 圖形環境
头像
widon1104
帖子: 839
注册时间: 2008-07-17 10:55

Re: ubuntu17.10 系统死机

#28

帖子 widon1104 » 2018-01-25 9:30

poloshiao 写了:1. 把下面指令 複製 貼進終端機 執行
1-1. sudo lshw -numeric -class video
1-2. echo $DESKTOP_SESSION
1-3. echo $XDG_SESSION_TYPE
1-4. sudo cat /etc/gdm3/custom.conf | grep WaylandEnable
把結果直接複製貼上來

目的 要了解你的 顯卡硬件/驅動 是否 充分支援 你所登入的 圖形環境
widon@widon-desktop:~$ sudo lshw -numeric -class video
[sudo] widon 的密码:
*-display
description: VGA compatible controller
product: RS880 [Radeon HD 4250] [1002:9715]
vendor: Advanced Micro Devices, Inc. [AMD/ATI] [1002]
physical id: 5
bus info: pci@0000:01:05.0
version: 00
width: 32 bits
clock: 33MHz
capabilities: pm msi vga_controller bus_master cap_list rom
configuration: driver=radeon latency=0
resources: irq:18 memory:d0000000-dfffffff ioport:d000(size=256) memory:feaf0000-feafffff memory:fe900000-fe9fffff memory:c0000-dffff
widon@widon-desktop:~$ echo $DESKTOP_SESSION
ubuntu-xorg
widon@widon-desktop:~$ echo $XDG_SESSION_TYPE
x11
widon@widon-desktop:~$ sudo cat /etc/gdm3/custom.conf | grep WaylandEnable
#WaylandEnable=false
头像
widon1104
帖子: 839
注册时间: 2008-07-17 10:55

Re: ubuntu17.10 系统死机

#29

帖子 widon1104 » 2018-01-25 10:23

Jan 25 10:20:45 widon-desktop kernel: [ 3.820318] fbcon: radeondrmfb (fb0) is primary device
Jan 25 10:20:45 widon-desktop kernel: [ 3.844219] Console: switching to colour frame buffer device 240x67
Jan 25 10:20:45 widon-desktop kernel: [ 3.861328] radeon 0000:01:05.0: fb0: radeondrmfb frame buffer device
Jan 25 10:20:45 widon-desktop kernel: [ 3.876160] kfd kfd: DID 9715 is missing in supported_devices
Jan 25 10:20:45 widon-desktop kernel: [ 3.876162] kfd kfd: kgd2kfd_probe failed
Jan 25 10:20:45 widon-desktop kernel: [ 3.876232] [drm] Initialized radeon 2.50.0 20080528 for 0000:01:05.0 on minor 0
Jan 25 10:20:45 widon-desktop kernel: [ 3.978722] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
Jan 25 10:20:45 widon-desktop kernel: [ 4.284157] clocksource: Switched to clocksource tsc
Jan 25 10:20:45 widon-desktop kernel: [ 5.148007] ip_tables: (C) 2000-2006 Netfilter Core Team
Jan 25 10:20:45 widon-desktop kernel: [ 6.475505] random: crng init done
Jan 25 10:20:45 widon-desktop kernel: [ 7.397628] lp: driver loaded but no devices found
Jan 25 10:20:45 widon-desktop kernel: [ 7.454258] ppdev: user-space parallel port driver
Jan 25 10:20:45 widon-desktop kernel: [ 8.223466] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
Jan 25 10:20:45 widon-desktop kernel: [ 8.835063] ACPI Warning: SystemIO range 0x0000000000000B00-0x0000000000000B08 conflicts with OpRegion 0x0000000000000B00-0x0000000000000B0F (\SOR1) (20170728/utaddress-247)
Jan 25 10:20:45 widon-desktop kernel: [ 8.835070] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
Jan 25 10:20:45 widon-desktop kernel: [ 8.944004] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4

我用最新版的内核,内核启动的时候报了2个错误
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu17.10 系统死机

#30

帖子 poloshiao » 2018-01-25 11:01

sudo lshw -numeric -class video
product: RS880 [Radeon HD 4250] [1002:9715]
configuration: driver=radeon latency=0
1. RS880 [Radeon HD 4250]
在 Xorg 受到充分支援
1-1. https://help.ubuntu.com/community/Radeo ... _supported
Fully supported
RS780/RS880 : Radeon HD .../4200/...

2. http://forum.ubuntu.com.cn/viewtopic.ph ... 5#p3197565
如果你的顯卡/驅動還不支援 Ubuntu (on Wayland)
登入畫面 可能沒有 Ubuntu (on Wayland) 選項
此時 只能登入 Ubuntu on Xorg (所以 不會出現選項)
echo $DESKTOP_SESSION
ubuntu-xorg
echo $XDG_SESSION_TYPE
x11
2-1. 如果你安裝完 Ubuntu 17.10 登入的就是 ubuntu-xorg
猜測 Wayland 對於你的 RS880 [Radeon HD 4250] 支援度 可能還不夠好
sudo cat /etc/gdm3/custom.conf | grep WaylandEnable
#WaylandEnable=false
3. Wayland 跟 Xorg 可能無法相容在同一個登入的 session
既然 你已登入 Xorg
建議 徹底把 Wayland 設定為 disabled
3-1. 試試 打開
/etc/gdm3/custom.conf

#WaylandEnable=false
改為
WaylandEnable=false
然後 重開機 看看
回复