XWindowが起動しない

   2014/02/09

スポンサーリンク

Linuxについての記事です。

CentOS6.2を使用しているとシステムのアップデートを促されたのでアップデートをしてCentOS6.3にバージョンアップしました。
アップデートをしてから気づいたのですが、アップデートをしたらX Window Systemが起動しなくなってしまいデスクトップ環境での作業ができなくなってしまいました。

原因が分からず直せるかわからなかったのでOSを再インストールでもしようかと考えていました。
再インストールをしてしまうと同じ状況になってしまったときに対処ができないと思うのでできれば手動で直せる策を考えていました。

ひとまずXを起動するとこんな事になります。

# startx

xauth:  creating new authority file /root/.serverauth.3049
xauth:  creating new authority file /root/.Xauthority
xauth:  creating new authority file /root/.Xauthority

X.Org X Server 1.10.6
Release Date: 2012-02-10
X Protocol Version 11, Revision 0
Build Operating System: c6b9 2.6.32-220.el6.x86_64
Current Operating System: Linux centos 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64
Kernel command line: ro root=UUID=b274cbee-7a2b-4094-a57c-ce03baed17fa nomodeset rd_NO_LUKS rd_NO_MD quiet rhgb crashkernel=129M@0M  KEYBOARDTYPE=pc KEYTABLE=jp106 LANG=ja_JP.UTF-8 rd_NO_LVM rd_NO_DM
Build Date: 22 June 2012  08:01:35PM
Build ID: xorg-x11-server 1.10.6-1.el6.centos
Current version of pixman: 0.18.4
	Before reporting problems, check https://www.redhat.com/apps/support/
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri Sep 28 19:51:33 2012
(==) Using config file: "/etc/X11/xorg.conf"
(EE) Failed to load module "extmod" (module does not exist, 0)
(EE) Failed to load module "dbe" (module does not exist, 0)
(EE) Failed to load module "glx" (module does not exist, 0)
(EE) Failed to load module "record" (module does not exist, 0)
(EE) Failed to load module "dri" (module does not exist, 0)
(EE) Failed to load module "dri2" (module does not exist, 0)
(EE) Failed to load module "nvidia" (module does not exist, 0)
(EE) No drivers available.

Fatal server error:
no screens found

Please consult the CentOS support
	 at https://www.redhat.com/apps/support/
 for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional information.

giving up.
xinit:  No such file or directory (errno 2):  unable to connect to X server
xinit:  No such process (errno 3):  Server error.

いろいろなモジュールエラーが返されてきた。
X Windowのログファイルを参照する。

vi /var/log/Xorg.0.log

[ 20339.653] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Oct  26 13:23:45 2012
[ 20339.653] (==) Using config file: "/etc/X11/xorg.conf"
[ 20339.653] (==) ServerLayout "Default Layout"
[ 20339.653] (**) |-->Screen "Default Screen" (0)
[ 20339.653] (**) |   |-->Monitor "Monitor0"
[ 20339.653] (**) |   |-->Device "Videocard0"
[ 20339.653] (**) |-->Input Device "Keyboard0"
[ 20339.653] (**) |-->Input Device "Mouse0"
[ 20339.653] (==) Automatically adding devices
[ 20339.653] (==) Automatically enabling devices
[ 20339.653] (==) FontPath set to:
        catalogue:/etc/X11/fontpath.d,
        built-ins
[ 20339.653] (**) ModulePath set to "/usr/lib/xorg/modules/extensions/nvidia,/usr/lib/xorg/modueles"
[ 20339.653] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[ 20339.653] (WW) Disabling Keyboard0
[ 20339.653] (WW) Disabling Mouse0
[ 20339.653] (II) Loader magic: 0x7d51a0
[ 20339.653] (II) Module ABI versions:
[ 20339.653]    X.Org ANSI C Emulation: 0.4
[ 20339.653]    X.Org Video Driver: 10.0
[ 20339.653]    X.Org XInput driver : 12.2
[ 20339.653]    X.Org Server Extension : 5.0
[ 12172.942] (--) PCI:*(0:1:0:0) 10de:029e:10de:032c rev 161, Mem @ 0xd1000000/16777216, 0xc0000000/268435456, 0xd0000000/16777216, I/O @ 0x00004000/128, BIOS @ 0x????????/131072
[ 20339.659] (II) LoadModule: "extmod"
[ 20339.659] (WW) Warning, couldn't open module extmod
[ 20339.659] (II) UnloadModule: "extmod"
[ 20339.659] (II) Unloading extmod
[ 20339.659] (EE) Failed to load module "extmod" (module does not exist, 0)
[ 20339.659] (II) LoadModule: "dbe"
[ 20339.659] (WW) Warning, couldn't open module dbe
[ 20339.659] (II) UnloadModule: "dbe"
[ 20339.659] (II) Unloading dbe
[ 20339.659] (EE) Failed to load module "dbe" (module does not exist, 0)
[ 20339.659] (II) LoadModule: "glx"
[ 20339.659] (WW) Warning, couldn't open module glx
[ 20339.659] (II) UnloadModule: "glx"
[ 20339.659] (II) Unloading glx
[ 20339.659] (EE) Failed to load module "glx" (module does not exist, 0)
[ 20339.659] (II) LoadModule: "record"
[ 20339.659] (WW) Warning, couldn't open module record
[ 20339.659] (II) UnloadModule: "record"
[ 20339.659] (II) Unloading record
[ 20339.659] (EE) Failed to load module "record" (module does not exist, 0)
[ 20339.659] (II) LoadModule: "dri"
[ 20339.659] (WW) Warning, couldn't open module dri
[ 20339.659] (II) UnloadModule: "dri"
[ 20339.659] (II) Unloading dri
[ 20339.659] (EE) Failed to load module "dri" (module does not exist, 0)
[ 20339.659] (II) LoadModule: "dri2"
[ 20339.659] (WW) Warning, couldn't open module dri2
[ 20339.659] (II) UnloadModule: "dri2"
[ 20339.659] (II) Unloading dri2
[ 20339.659] (EE) Failed to load module "dri2" (module does not exist, 0)
[ 20339.659] (II) LoadModule: "nvidia"
[ 20339.659] (WW) Warning, couldn't open module nvidia
[ 20339.659] (II) UnloadModule: "nvidia"
[ 20339.659] (II) Unloading nvidia
[ 20339.659] (EE) Failed to load module "nvidia" (module does not exist, 0)
[ 20339.659] (EE) No drivers available.
[ 20339.659]
Fatal server error:
[ 20339.659] no screens found
[ 20339.659]
Please consult the CentOS support
         at https://www.redhat.com/apps/support/
 for help.
[ 20339.659] Please also check the log file at "/var/log/Xorg.0.log" for additional information.

config fileが /etc/X11/xorg.confにあるから設定を見直して下さいと言われる。
/etc/X11/xorg.confにあるX Window Systemの設定ファイルを確認する。

# vi /etc/X11/xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 295.20  (buildmeister@swio-display-x86-rhel47-05.nvidia.com)  Mon Feb  6 21:14:40 PST 2012

Section "ServerLayout"
    Identifier     "Default Layout"
    Screen         "Default Screen" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    ModulePath      "/usr/lib/xorg/modules/extensions/nvidia"
    ModulePath      "/usr/lib/xorg/modules"
EndSection

Section "InputDevice"

    # generated from data in "/etc/sysconfig/keyboard"
    Identifier     "Keyboard0"
    Driver         "keyboard"
    Option         "XkbLayout" "jp"
"/etc/X11/xorg.conf" 59L, 1544C

Section “Files”の項目でモジュールのパスがModulePath “/usr/lib/xorg/modules/extensions/nvidia”とModulePath “/usr/lib/xorg/modules”と指定されているのですが、そこにモジュールがあるのかを確認。

# ls /usr/lib/xorg/modules
ls: cannot access /usr/lib/xorg/modules: そのようなファイルやディレクトリはありません
# ls /usr/lib/xorg
ls: cannot access /usr/lib/xorg/: そのようなファイルやディレクトリはありません

どうやらモジュールもxorgのディレクトリも存在しないようでした。
/usr/lib/xorgが存在していなかったのでモジュールの位置を検索。
検索してみると/usr/lib64/xorgにある事がわかったので/etc/X11/xorg.confの設定を変更する。


# vi /etc/X11/xorg.conf

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 295.20  (buildmeister@swio-display-x86-rhel47-05.nvidia.com)  Mon Feb  6 22:13:40 PST 2012

Section "ServerLayout"
    Identifier     "Default Layout"
    Screen         "Default Screen" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    ModulePath      "/usr/lib64/xorg/modules/extensions/nvidia"
    ModulePath      "/usr/lib64/xorg/modules"
EndSection

Section "InputDevice"

    # generated from data in "/etc/sysconfig/keyboard"
    Identifier     "Keyboard0"
    Driver         "keyboard"
    Option         "XkbLayout" "jp"
"/etc/X11/xorg.conf" 59L, 1544C

/etc/X11/xorg.confをエディタで開きます。

Section “Files”
ModulePath “/usr/lib/xorg/modules/extensions/nvidia”
ModulePath “/usr/lib/xorg/modules”

の項目を以下に変更します。

Section “Files”
ModulePath “/usr/lib64/xorg/modules/extensions/nvidia”
ModulePath “/usr/lib64/xorg/modules”

システムを再起動させます。

再起動後にX Window Systemを起動させてみます。

# startx
xauth:  creating new authority file /root/.serverauth.3173

X.Org X Server 1.10.6
Release Date: 2012-02-10
X Protocol Version 11, Revision 0
Build Operating System: c6b9 2.6.32-220.el6.x86_64
Current Operating System: Linux centos 2.6.32-279.11.1.el6.x86_64 #1 SMP Tue Oct 16 15:57:10 UTC 2012 x86_64
Kernel command line: ro root=UUID=b274cbee-7a2b-4094-a57c-ce03baed17fa nomodeset rd_NO_LUKS rd_NO_MD quiet rhgb crashkernel=129M@0M  KEYBOARDTYPE=pc KEYTABLE=jp106 LANG=ja_JP.UTF-8 rd_NO_LVM rd_NO_DM
Build Date: 22 June 2012  08:01:35PM
Build ID: xorg-x11-server 1.10.6-1.el6.centos
Current version of pixman: 0.18.4
	Before reporting problems, check https://www.redhat.com/apps/support/
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri Oct 26 19:32:06 2012
(==) Using config file: "/etc/X11/xorg.conf"
FATAL: Module nvidia not found.
(EE) NVIDIA: Failed to load the NVIDIA kernel module. Please check your
(EE) NVIDIA:     system's kernel log for additional error messages.
(EE) Failed to load module "nvidia" (module-specific error, 0)
(EE) No drivers available.

Fatal server error:
no screens found

Please consult the CentOS support
	 at https://www.redhat.com/apps/support/
 for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional information.
スポンサーリンク

エラーの内容が先ほどとは変わったのでどうやらモジュールのパスがアップデートによって変更されてしまったようでした。
でもまだ解決できていない状態で今度はnvidiaのカーネルモジュールのエラーが表示されました。
原因はわからないですがとりあえず今使っているマシンにあるNvidia Quadro 1500FXのグラフィックドライバーを再インストールしたいと思います。

グラフィックドライバーのインストールをする為にランレベルを3にしてシステムを起動させます。

ランレベルを3に設定する。

# /sbin/init 3

再起動した後にドライバのインストールを実行。


# sh NVIDIA-Linux-x86_64-304.60.run

ERROR: You appear to be running an X server; please exit X before
installing. For further details, please see the section INSTALLING
THE NVIDIA DRIVER in the README available on the Linux driver
download page at www.nvidia.com.

ランレベルを3にしたのにXを停止するようにというようなエラーが返されてしまいました。
この時は盲点だったのですが、VNCサーバーを起動させて使っていたのでそれが原因かなと推測して試しにVNCデーモンを停止しました。
それからもう一度# sh NVIDIA-Linux-x86_64-304.60.runを実行したらドライバのインストールに成功してX Window Systemが起動できました。

また問題があったときの覚え書きとして残しておこうと思います。



  • このエントリーをはてなブックマークに追加
  • Pocket
  • follow us in feedly

この記事へのコメントはこちら

メールアドレスは公開されませんのでご安心ください。
また、* が付いている欄は必須項目となりますので、必ずご記入をお願いします。

*

内容に問題なければ、下記の「コメント送信」ボタンを押してください。