nginx + thin or Apache + fcgi

Posted by okkez Mon, 15 Sep 2008 08:45:00 GMT

両方試した結果、しばらく後者で運用することにしました。

理由は以下。

  • サーバマシンのメモリが 256MB しかない
  • thin はプロセスごとの消費メモリが 50MB から 100MB 程度
  • Rails アプリを三つ動かしてるので thin のプロセスが多い (6プロセス)

そんな感じでメモリの消費が多くてスワップしまくりだったのが遅い原因でした。

Rails アプリで nginx + thin を使うときは thin のプロセス数 * 100MB を以上搭載するのが目安になりそうです。

Posted in | コメントはありません |

nginx + thin

Posted by okkez Mon, 01 Sep 2008 09:30:00 GMT

やってみた。

色々と試行錯誤した結果なんとか安定したのでその手順をメモしておく。

インストール

nginx からソースを落としてビルドする。

$ ./configure –prefix=/usr/local $ make $ sudo make install

Thin - yet another web server は RubyGems でインストールする。

$ sudo gem install thin eventmachine

設定

thin の設定はコマンドラインでサンプルファイルを生成して、 /etc/thin 以下へコピーするだけ。 サーバの数を増やしすぎると、パフォーマンスが悪くなるので程々にしておく。 うちの場合は Rails アプリが三つあるのでそれぞれに二つずつサーバを起動するようにした。

# 三つずつにした場合は極端にパフォーマンスが悪化した。

$ thin config -C thin.yml -s2 -S /tmp/thin-qa.sock -u www-data -g www-data $ vim thin.yml # 都合に合わせて編集する。 $ sudo cp thin.yml /etc/thin/ $ sudo thin install # /etc/init.d/thin を作成する

nginx の設定は Main - Nginx Wiki を参照して行う。

# 一部抜粋 # backend settings upstream thin-typo { server unix:/tmp/thin-typo.0.sock; server unix:/tmp/thin-typo.1.sock; } # virtual host settings # typo (blog) server { listen 80; server_name typo.okkez.net; access_log logs/typo.access.log main; root /home/kenji/ruby/typo/public; index index.html; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; # static files if (-f $request_filename){ break; } # rails caching if (-f $request_filename.html){ rewrite (.*) $1.html break; } # dynamic request if (!-f $request_filename){ proxy_pass http://thin-typo; break; } } }

移行

  • Apache の設定を変更 (Listen 8080 にする)
  • thin を起動
  • Apache を再起動
  • nginx を起動
  • 動作確認

以降の設定変更は気をつける。

  • thin -C 設定ファイル restart
  • kill -HUP nginx の pid (pid ファイルを参照) ** すぐには反映されないので注意する
  • Apache は普通に再起動する

はまったポイント

  • proxy の設定
  • rewrite の設定
  • 設定の再読み込みが出来ていなかったこと (kill -HUP pid)

疑問点

  • 特定のアプリで prototype.js の読み込みはすぐに終わるのにその後の動きが鈍い ** 読み込まなければ速い

Posted in , | コメントはありません |

sid の rtpproxy がヒドい件

Posted by okkez Thu, 17 Jul 2008 02:51:00 GMT

上記の通り grave なんですけど、削除すらできないってのはどういうことなんだろう? また、もう二週間も経つのに放置って。。。

コメントを読んだ限りでは「もう修正できてるけど、あと少し直したいところがあるからちょっと待って。忙しいからすぐには作業できないんだ」 ってかいてあるように読めるけど、二週間放置はちょっとやりすぎ。

自力でなんとかしようにもちょっと、自分には難しすぎるみたい。

Posted in | コメントはありません |

say Debian

Posted by okkez Mon, 26 May 2008 15:43:00 GMT

mac で say してる人が羨ましくて Debian で say ししてみた。

まずは、festival をインストール。

$ sudo aptitude install festival

うちの場合は、 何か勝手に入ってたので問題無し。

まずは Hallo World

$ festival festival> (SayText “Hello, World!”) festival> (quit)

こんだけで喋ってくれる。(コードが Scheme っぽい)

で、 say コマンドの実装。 今回は zsh script でやってみた。

function say() { echo “(SayText "$*")” | festival –pipe }

こんだけ。

$ say Hello World

it sounds so cool!

enjoy!

Posted in | 2 comments |

X が突然死する件

Posted by okkez Sun, 30 Mar 2008 15:00:00 GMT

sid に変えてから X が割と頻繁に突然死する。 液晶の表示が死ぬのでコンソールに落ちて作業する事もできないので、強制終了するしかない。

このままでは困るので、ログを晒して解決方法を探ってみたい。けど眠いので、ちょっと続きは後日。

This is a pre-release version of the X server from The X.Org Foundation. It is not supported in any way. Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/. Select the "xorg" product for bugs you find in this release. Before reporting bugs in pre-release versions please check the latest version in the X.Org Foundation git repository. See http://wiki.x.org/wiki/GitPage for git access instructions. X.Org X Server 1.4.0.90 Release Date: 5 September 2007 X Protocol Version 11, Revision 0 Build Operating System: Linux Debian (xorg-server 2:1.4.1~git20080131-2) Current Operating System: Linux knote 2.6.24-1-686 #1 SMP Mon Feb 11 14:37:45 UTC 2008 i686 Build Date: 14 March 2008 03:20:12PM Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Module Loader present 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 Mar 21 19:26:25 2008 (==) Using config file: "/etc/X11/xorg.conf" (==) ServerLayout "Default Layout" (**) |-->Screen "Default Screen" (0) (**) | |-->Monitor "Configured Monitor" (==) No device specified for screen "Default Screen". Using the first device section listed. (**) | |-->Device "Configured Video Device" (**) |-->Input Device "Generic Keyboard" (**) |-->Input Device "Configured Mouse" (**) |-->Input Device "Synaptics Touchpad" (==) Automatically adding devices (==) Automatically enabling devices (==) No FontPath specified. Using compiled-in default. (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist. Entry deleted from font path. (==) FontPath set to: /usr/share/fonts/X11/misc, /usr/share/fonts/X11/100dpi/:unscaled, /usr/share/fonts/X11/75dpi/:unscaled, /usr/share/fonts/X11/Type1, /usr/share/fonts/X11/100dpi, /usr/share/fonts/X11/75dpi, /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType (==) RgbPath set to "/etc/X11/rgb" (==) ModulePath set to "/usr/lib/xorg/modules" (==) |-->Input Device "Configured Mouse" (==) |-->Input Device "Generic Keyboard" (==) The core pointer device wasn't specified explicitly in the layout. Using the first mouse device. (==) The core keyboard device wasn't specified explicitly in the layout. Using the first keyboard device. (II) Open ACPI successful (/var/run/acpid.socket) (II) Loader magic: 0x81d8d00 (II) Module ABI versions: X.Org ANSI C Emulation: 0.3 X.Org Video Driver: 2.0 X.Org XInput driver : 2.0 X.Org Server Extension : 0.3 X.Org Font Renderer : 0.5 (II) Loader running on linux (II) LoadModule: "pcidata" (II) Loading /usr/lib/xorg/modules//libpcidata.so (II) Module pcidata: vendor="X.Org Foundation" compiled for 1.4.0.90, module version = 1.0.0 ABI class: X.Org Video Driver, version 2.0 (++) using VT number 8 (II) PCI: PCI scan (all values are in hex) (II) PCI: 00:00:0: chip 8086,2590 card 10f7,8338 rev 03 class 06,00,00 hdr 00 (II) PCI: 00:02:0: chip 8086,2592 card 10f7,8338 rev 03 class 03,00,00 hdr 80 (II) PCI: 00:02:1: chip 8086,2792 card 10f7,8338 rev 03 class 03,80,00 hdr 80 (II) PCI: 00:1d:0: chip 8086,2658 card 10f7,8338 rev 04 class 0c,03,00 hdr 80 (II) PCI: 00:1d:1: chip 8086,2659 card 10f7,8338 rev 04 class 0c,03,00 hdr 00 (II) PCI: 00:1d:7: chip 8086,265c card 10f7,8338 rev 04 class 0c,03,20 hdr 00 (II) PCI: 00:1e:0: chip 8086,2448 card 0000,0000 rev d4 class 06,04,01 hdr 81 (II) PCI: 00:1e:2: chip 8086,266e card 10f7,834c rev 04 class 04,01,00 hdr 00 (II) PCI: 00:1f:0: chip 8086,2641 card 10f7,8338 rev 04 class 06,01,00 hdr 80 (II) PCI: 00:1f:1: chip 8086,266f card 10f7,8338 rev 04 class 01,01,8a hdr 00 (II) PCI: 00:1f:3: chip 8086,266a card 10f7,8338 rev 04 class 0c,05,00 hdr 00 (II) PCI: 06:01:0: chip 10ec,8139 card 10f7,8338 rev 10 class 02,00,00 hdr 00 (II) PCI: 06:04:0: chip 8086,4223 card 8086,1002 rev 05 class 02,80,00 hdr 00 (II) PCI: 06:05:0: chip 1180,0476 card 3400,0000 rev 8b class 06,07,00 hdr 82 (II) PCI: 06:05:1: chip 1180,0822 card 10f7,8338 rev 11 class 08,05,00 hdr 80 (II) PCI: End of PCI scan (II) Intel Bridge workaround enabled (II) Host-to-PCI bridge: (II) Bus 0: bridge is at (0:0:0), (0,0,7), BCTRL: 0x0008 (VGA_EN is set) (II) Bus 0 I/O range: [0] -1 0 0x00000000 - 0x0000ffff (0x10000) IX[B] (II) Bus 0 non-prefetchable memory range: [0] -1 0 0x00000000 - 0xffffffff (0x0) MX[B] (II) Bus 0 prefetchable memory range: [0] -1 0 0x00000000 - 0xffffffff (0x0) MX[B] (II) Subtractive PCI-to-PCI bridge: (II) Bus 6: bridge is at (0:30:0), (0,6,10), BCTRL: 0x0004 (VGA_EN is cleared) (II) Bus 6 I/O range: [0] -1 0 0x00003000 - 0x000030ff (0x100) IX[B] [1] -1 0 0x00003400 - 0x000034ff (0x100) IX[B] [2] -1 0 0x00003800 - 0x000038ff (0x100) IX[B] [3] -1 0 0x00003c00 - 0x00003cff (0x100) IX[B] (II) Bus 6 non-prefetchable memory range: [0] -1 0 0xb0100000 - 0xb01fffff (0x100000) MX[B] (II) PCI-to-ISA bridge: (II) Bus -1: bridge is at (0:31:0), (0,-1,-1), BCTRL: 0x0008 (VGA_EN is set) (II) PCI-to-CardBus bridge: (II) Bus 7: bridge is at (6:5:0), (6,7,10), BCTRL: 0x0580 (VGA_EN is cleared) (II) Bus 7 I/O range: [0] -1 0 0x00003400 - 0x000034ff (0x100) IX[B] [1] -1 0 0x00003800 - 0x000038ff (0x100) IX[B] (--) PCI:*(0:2:0) Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller rev 3, Mem @ 0xb0080000/19, 0xc0000000/28, 0xb0000000/18, I/O @ 0x1800/3 (--) PCI: (0:2:1) Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller rev 3, Mem @ 0x50000000/19 (II) Addressable bus resource ranges are [0] -1 0 0x00000000 - 0xffffffff (0x0) MX[B] [1] -1 0 0x00000000 - 0x0000ffff (0x10000) IX[B] (II) OS-reported resource ranges: [0] -1 0 0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B) [1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B] [2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B] [3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B] [4] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B] [5] -1 0 0x00000000 - 0x000000ff (0x100) IX[B] (II) Active PCI resource ranges: [0] -1 0 0xb0100400 - 0xb01004ff (0x100) MX[B] [1] -1 0 0xb0101000 - 0xb0101fff (0x1000) MX[B] [2] -1 0 0xb0100000 - 0xb01000ff (0x100) MX[B] [3] -1 0 0xb0040400 - 0xb00404ff (0x100) MX[B] [4] -1 0 0xb0040800 - 0xb00409ff (0x200) MX[B] [5] -1 0 0xb0040000 - 0xb00403ff (0x400) MX[B] [6] -1 0 0xb0000000 - 0xb003ffff (0x40000) MX[B](B) [7] -1 0 0xc0000000 - 0xcfffffff (0x10000000) MX[B](B) [8] -1 0 0xb0080000 - 0xb00fffff (0x80000) MX[B](B) [9] -1 0 0x00003000 - 0x000030ff (0x100) IX[B] [10] -1 0 0x000018a0 - 0x000018bf (0x20) IX[B] [11] -1 0 0x00001810 - 0x0000181f (0x10) IX[B] [12] -1 0 0x000001f0 - 0x000001f0 (0x1) IX[B] [13] -1 0 0x000001f0 - 0x000001f7 (0x8) IX[B] [14] -1 0 0x000001f0 - 0x000001f0 (0x1) IX[B] [15] -1 0 0x000001f0 - 0x000001f7 (0x8) IX[B] [16] -1 0 0x000018c0 - 0x000018ff (0x40) IX[B] [17] -1 0 0x00001c00 - 0x00001cff (0x100) IX[B] [18] -1 0 0x00001840 - 0x0000185f (0x20) IX[B] [19] -1 0 0x00001820 - 0x0000183f (0x20) IX[B] [20] -1 0 0x00001800 - 0x00001807 (0x8) IX[B](B) (II) Inactive PCI resource ranges: [0] -1 0 0x50000000 - 0x5007ffff (0x80000) MX[B](B) (II) Active PCI resource ranges after removing overlaps: [0] -1 0 0xb0100400 - 0xb01004ff (0x100) MX[B] [1] -1 0 0xb0101000 - 0xb0101fff (0x1000) MX[B] [2] -1 0 0xb0100000 - 0xb01000ff (0x100) MX[B] [3] -1 0 0xb0040400 - 0xb00404ff (0x100) MX[B] [4] -1 0 0xb0040800 - 0xb00409ff (0x200) MX[B] [5] -1 0 0xb0040000 - 0xb00403ff (0x400) MX[B] [6] -1 0 0xb0000000 - 0xb003ffff (0x40000) MX[B](B) [7] -1 0 0xc0000000 - 0xcfffffff (0x10000000) MX[B](B) [8] -1 0 0xb0080000 - 0xb00fffff (0x80000) MX[B](B) [9] -1 0 0x00003000 - 0x000030ff (0x100) IX[B] [10] -1 0 0x000018a0 - 0x000018bf (0x20) IX[B] [11] -1 0 0x00001810 - 0x0000181f (0x10) IX[B] [12] -1 0 0x000001f0 - 0x000001f0 (0x1) IX[B] [13] -1 0 0x000001f0 - 0x000001f7 (0x8) IX[B] [14] -1 0 0x000001f0 - 0x000001f0 (0x1) IX[B] [15] -1 0 0x000001f0 - 0x000001f7 (0x8) IX[B] [16] -1 0 0x000018c0 - 0x000018ff (0x40) IX[B] [17] -1 0 0x00001c00 - 0x00001cff (0x100) IX[B] [18] -1 0 0x00001840 - 0x0000185f (0x20) IX[B] [19] -1 0 0x00001820 - 0x0000183f (0x20) IX[B] [20] -1 0 0x00001800 - 0x00001807 (0x8) IX[B](B) (II) Inactive PCI resource ranges after removing overlaps: [0] -1 0 0x50000000 - 0x5007ffff (0x80000) MX[B](B) (II) OS-reported resource ranges after removing overlaps with PCI: [0] -1 0 0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B) [1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B] [2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B] [3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B] [4] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B] [5] -1 0 0x00000000 - 0x000000ff (0x100) IX[B] (II) All system resource ranges: [0] -1 0 0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B) [1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B] [2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B] [3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B] [4] -1 0 0xb0100400 - 0xb01004ff (0x100) MX[B] [5] -1 0 0xb0101000 - 0xb0101fff (0x1000) MX[B] [6] -1 0 0xb0100000 - 0xb01000ff (0x100) MX[B] [7] -1 0 0xb0040400 - 0xb00404ff (0x100) MX[B] [8] -1 0 0xb0040800 - 0xb00409ff (0x200) MX[B] [9] -1 0 0xb0040000 - 0xb00403ff (0x400) MX[B] [10] -1 0 0xb0000000 - 0xb003ffff (0x40000) MX[B](B) [11] -1 0 0xc0000000 - 0xcfffffff (0x10000000) MX[B](B) [12] -1 0 0xb0080000 - 0xb00fffff (0x80000) MX[B](B) [13] -1 0 0x50000000 - 0x5007ffff (0x80000) MX[B](B) [14] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B] [15] -1 0 0x00000000 - 0x000000ff (0x100) IX[B] [16] -1 0 0x00003000 - 0x000030ff (0x100) IX[B] [17] -1 0 0x000018a0 - 0x000018bf (0x20) IX[B] [18] -1 0 0x00001810 - 0x0000181f (0x10) IX[B] [19] -1 0 0x000001f0 - 0x000001f0 (0x1) IX[B] [20] -1 0 0x000001f0 - 0x000001f7 (0x8) IX[B] [21] -1 0 0x000001f0 - 0x000001f0 (0x1) IX[B] [22] -1 0 0x000001f0 - 0x000001f7 (0x8) IX[B] [23] -1 0 0x000018c0 - 0x000018ff (0x40) IX[B] [24] -1 0 0x00001c00 - 0x00001cff (0x100) IX[B] [25] -1 0 0x00001840 - 0x0000185f (0x20) IX[B] [26] -1 0 0x00001820 - 0x0000183f (0x20) IX[B] [27] -1 0 0x00001800 - 0x00001807 (0x8) IX[B](B) (II) LoadModule: "extmod" (II) Loading /usr/lib/xorg/modules/extensions//libextmod.so (II) Module extmod: vendor="X.Org Foundation" compiled for 1.4.0.90, module version = 1.0.0 Module class: X.Org Server Extension ABI class: X.Org Server Extension, version 0.3 (II) Loading extension SHAPE (II) Loading extension MIT-SUNDRY-NONSTANDARD (II) Loading extension BIG-REQUESTS (II) Loading extension SYNC (II) Loading extension MIT-SCREEN-SAVER (II) Loading extension XC-MISC (II) Loading extension XFree86-VidModeExtension (II) Loading extension XFree86-Misc (II) Loading extension XFree86-DGA (II) Loading extension DPMS (II) Loading extension TOG-CUP (II) Loading extension Extended-Visual-Information (II) Loading extension XVideo (II) Loading extension XVideo-MotionCompensation (II) Loading extension X-Resource (II) LoadModule: "dbe" (II) Loading /usr/lib/xorg/modules/extensions//libdbe.so (II) Module dbe: vendor="X.Org Foundation" compiled for 1.4.0.90, module version = 1.0.0 Module class: X.Org Server Extension ABI class: X.Org Server Extension, version 0.3 (II) Loading extension DOUBLE-BUFFER (II) LoadModule: "glx" (II) Loading /usr/lib/xorg/modules/extensions//libglx.so (II) Module glx: vendor="X.Org Foundation" compiled for 1.4.0.90, module version = 1.0.0 ABI class: X.Org Server Extension, version 0.3 (==) AIGLX enabled (II) Loading extension GLX (II) LoadModule: "freetype" (II) Loading /usr/lib/xorg/modules//fonts/libfreetype.so (II) Module freetype: vendor="X.Org Foundation & the After X-TT Project" compiled for 1.4.0.90, module version = 2.1.0 Module class: X.Org Font Renderer ABI class: X.Org Font Renderer, version 0.5 (II) Loading font FreeType (II) LoadModule: "record" (II) Loading /usr/lib/xorg/modules/extensions//librecord.so (II) Module record: vendor="X.Org Foundation" compiled for 1.4.0.90, module version = 1.13.0 Module class: X.Org Server Extension ABI class: X.Org Server Extension, version 0.3 (II) Loading extension RECORD (II) LoadModule: "dri" (II) Loading /usr/lib/xorg/modules/extensions//libdri.so (II) Module dri: vendor="X.Org Foundation" compiled for 1.4.0.90, module version = 1.0.0 ABI class: X.Org Server Extension, version 0.3 (II) Loading extension XFree86-DRI (II) Matched intel from file name intel.ids in autoconfig (==) Matched intel for the autoconfigured driver (==) Assigned the driver to the xf86ConfigLayout (II) LoadModule: "intel" (II) Loading /usr/lib/xorg/modules/drivers//intel_drv.so (II) Module intel: vendor="X.Org Foundation" compiled for 1.4.0.90, module version = 2.2.1 Module class: X.Org Video Driver ABI class: X.Org Video Driver, version 2.0 (II) LoadModule: "kbd" (II) Loading /usr/lib/xorg/modules/input//kbd_drv.so (II) Module kbd: vendor="X.Org Foundation" compiled for 1.4.0, module version = 1.2.2 Module class: X.Org XInput Driver ABI class: X.Org XInput driver, version 2.0 (II) LoadModule: "mouse" (II) Loading /usr/lib/xorg/modules/input//mouse_drv.so (II) Module mouse: vendor="X.Org Foundation" compiled for 1.4.0, module version = 1.2.3 Module class: X.Org XInput Driver ABI class: X.Org XInput driver, version 2.0 (II) LoadModule: "synaptics" (II) Loading /usr/lib/xorg/modules/input//synaptics_drv.so (II) Module synaptics: vendor="X.Org Foundation" compiled for 4.3.99.902, module version = 1.0.0 Module class: X.Org XInput Driver ABI class: X.Org XInput driver, version 2.0 (II) intel: Driver for Intel Integrated Graphics Chipsets: i810, i810-dc100, i810e, i815, i830M, 845G, 852GM/855GM, 865G, 915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33, Intel Integrated Graphics Device (II) Primary Device is: PCI 00:02:0 (--) Assigning device section with no busID to primary device (WW) intel: No matching Device section for instance (BusID PCI:0:2:1) found (--) Chipset 915GM found (II) resource ranges after xf86ClaimFixedResources() call: [0] -1 0 0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B) [1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B] [2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B] [3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B] [4] -1 0 0xb0100400 - 0xb01004ff (0x100) MX[B] [5] -1 0 0xb0101000 - 0xb0101fff (0x1000) MX[B] [6] -1 0 0xb0100000 - 0xb01000ff (0x100) MX[B] [7] -1 0 0xb0040400 - 0xb00404ff (0x100) MX[B] [8] -1 0 0xb0040800 - 0xb00409ff (0x200) MX[B] [9] -1 0 0xb0040000 - 0xb00403ff (0x400) MX[B] [10] -1 0 0xb0000000 - 0xb003ffff (0x40000) MX[B](B) [11] -1 0 0xc0000000 - 0xcfffffff (0x10000000) MX[B](B) [12] -1 0 0xb0080000 - 0xb00fffff (0x80000) MX[B](B) [13] -1 0 0x50000000 - 0x5007ffff (0x80000) MX[B](B) [14] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B] [15] -1 0 0x00000000 - 0x000000ff (0x100) IX[B] [16] -1 0 0x00003000 - 0x000030ff (0x100) IX[B] [17] -1 0 0x000018a0 - 0x000018bf (0x20) IX[B] [18] -1 0 0x00001810 - 0x0000181f (0x10) IX[B] [19] -1 0 0x000001f0 - 0x000001f0 (0x1) IX[B] [20] -1 0 0x000001f0 - 0x000001f7 (0x8) IX[B] [21] -1 0 0x000001f0 - 0x000001f0 (0x1) IX[B] [22] -1 0 0x000001f0 - 0x000001f7 (0x8) IX[B] [23] -1 0 0x000018c0 - 0x000018ff (0x40) IX[B] [24] -1 0 0x00001c00 - 0x00001cff (0x100) IX[B] [25] -1 0 0x00001840 - 0x0000185f (0x20) IX[B] [26] -1 0 0x00001820 - 0x0000183f (0x20) IX[B] [27] -1 0 0x00001800 - 0x00001807 (0x8) IX[B](B) (II) resource ranges after probing: [0] -1 0 0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B) [1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B] [2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B] [3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B] [4] -1 0 0xb0100400 - 0xb01004ff (0x100) MX[B] [5] -1 0 0xb0101000 - 0xb0101fff (0x1000) MX[B] [6] -1 0 0xb0100000 - 0xb01000ff (0x100) MX[B] [7] -1 0 0xb0040400 - 0xb00404ff (0x100) MX[B] [8] -1 0 0xb0040800 - 0xb00409ff (0x200) MX[B] [9] -1 0 0xb0040000 - 0xb00403ff (0x400) MX[B] [10] -1 0 0xb0000000 - 0xb003ffff (0x40000) MX[B](B) [11] -1 0 0xc0000000 - 0xcfffffff (0x10000000) MX[B](B) [12] -1 0 0xb0080000 - 0xb00fffff (0x80000) MX[B](B) [13] -1 0 0x50000000 - 0x5007ffff (0x80000) MX[B](B) [14] 0 0 0x000a0000 - 0x000affff (0x10000) MS[B] [15] 0 0 0x000b0000 - 0x000b7fff (0x8000) MS[B] [16] 0 0 0x000b8000 - 0x000bffff (0x8000) MS[B] [17] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B] [18] -1 0 0x00000000 - 0x000000ff (0x100) IX[B] [19] -1 0 0x00003000 - 0x000030ff (0x100) IX[B] [20] -1 0 0x000018a0 - 0x000018bf (0x20) IX[B] [21] -1 0 0x00001810 - 0x0000181f (0x10) IX[B] [22] -1 0 0x000001f0 - 0x000001f0 (0x1) IX[B] [23] -1 0 0x000001f0 - 0x000001f7 (0x8) IX[B] [24] -1 0 0x000001f0 - 0x000001f0 (0x1) IX[B] [25] -1 0 0x000001f0 - 0x000001f7 (0x8) IX[B] [26] -1 0 0x000018c0 - 0x000018ff (0x40) IX[B] [27] -1 0 0x00001c00 - 0x00001cff (0x100) IX[B] [28] -1 0 0x00001840 - 0x0000185f (0x20) IX[B] [29] -1 0 0x00001820 - 0x0000183f (0x20) IX[B] [30] -1 0 0x00001800 - 0x00001807 (0x8) IX[B](B) [31] 0 0 0x000003b0 - 0x000003bb (0xc) IS[B] [32] 0 0 0x000003c0 - 0x000003df (0x20) IS[B] (II) Setting vga for screen 0. (II) Loading sub module "int10" (II) LoadModule: "int10" (II) Loading /usr/lib/xorg/modules//libint10.so (II) Module int10: vendor="X.Org Foundation" compiled for 1.4.0.90, module version = 1.0.0 ABI class: X.Org Video Driver, version 2.0 (II) Loading sub module "vbe" (II) LoadModule: "vbe" (II) Loading /usr/lib/xorg/modules//libvbe.so (II) Module vbe: vendor="X.Org Foundation" compiled for 1.4.0.90, module version = 1.1.0 ABI class: X.Org Video Driver, version 2.0 (II) Loading sub module "vgahw" (II) LoadModule: "vgahw" (II) Loading /usr/lib/xorg/modules//libvgahw.so (II) Module vgahw: vendor="X.Org Foundation" compiled for 1.4.0.90, module version = 0.1.0 ABI class: X.Org Video Driver, version 2.0 (II) intel(0): Creating default Display subsection in Screen section "Default Screen" for depth/fbbpp 24/32 (==) intel(0): Depth 24, (==) framebuffer bpp 32 (==) intel(0): RGB weight 888 (==) intel(0): Default visual is TrueColor (II) intel(0): Integrated Graphics Chipset: Intel(R) 915GM (--) intel(0): Chipset: "915GM" (--) intel(0): Linear framebuffer at 0xC0000000 (--) intel(0): IO registers at addr 0xB0080000 (II) intel(0): 2 display pipes available. (==) intel(0): Using EXA for acceleration (II) Loading sub module "ddc" (II) LoadModule: "ddc"(II) Module "ddc" already built-in (II) Loading sub module "i2c" (II) LoadModule: "i2c"(II) Module "i2c" already built-in (II) intel(0): Output VGA using monitor section Configured Monitor (II) intel(0): I2C bus "CRTDDC_A" initialized. (II) intel(0): Output LVDS has no monitor section (II) intel(0): I2C bus "LVDSDDC_C" initialized. (II) intel(0): I2C device "LVDSDDC_C:ddc2" registered at address 0xA0. (II) intel(0): I2C device "LVDSDDC_C:ddc2" removed. (II) Loading sub module "int10" (II) LoadModule: "int10" (II) Reloading /usr/lib/xorg/modules//libint10.so (II) intel(0): initializing int10 (WW) intel(0): Bad V_BIOS checksum (II) intel(0): Primary V_BIOS segment is: 0xc000 (II) intel(0): VESA BIOS detected (II) intel(0): VESA VBE Version 3.0 (II) intel(0): VESA VBE Total Mem: 7872 kB (II) intel(0): VESA VBE OEM: Intel(r)915GM/910ML/915MS Graphics Chip Accelerated VGA BIOS (II) intel(0): VESA VBE OEM Software Rev: 1.0 (II) intel(0): VESA VBE OEM Vendor: Intel Corporation (II) intel(0): VESA VBE OEM Product: Intel(r)915GM/910ML/915MS Graphics Controller (II) intel(0): VESA VBE OEM Product Rev: Hardware Version 0.0 (II) intel(0): I2C bus "SDVOCTRL_E for SDVOB" initialized. (II) intel(0): I2C device "SDVOCTRL_E for SDVOB:SDVO Controller B" registered at address 0x70. (II) intel(0): No SDVO device found on SDVOB (II) intel(0): I2C device "SDVOCTRL_E for SDVOB:SDVO Controller B" removed. (II) intel(0): I2C bus "SDVOCTRL_E for SDVOB" removed. (II) intel(0): I2C bus "SDVOCTRL_E for SDVOC" initialized. (II) intel(0): I2C device "SDVOCTRL_E for SDVOC:SDVO Controller C" registered at address 0x72. (II) intel(0): No SDVO device found on SDVOC (II) intel(0): I2C device "SDVOCTRL_E for SDVOC:SDVO Controller C" removed. (II) intel(0): I2C bus "SDVOCTRL_E for SDVOC" removed. (II) intel(0): I2C device "LVDSDDC_C:ddc2" registered at address 0xA0. (II) intel(0): I2C device "LVDSDDC_C:ddc2" removed. (II) intel(0): Output VGA disconnected (II) intel(0): Output LVDS connected (II) intel(0): Output LVDS using initial mode 1400x1050 (II) intel(0): Monitoring connected displays enabled (II) intel(0): detected 256 kB GTT. (II) intel(0): detected 7932 kB stolen memory. (==) intel(0): video overlay key set to 0x101fe (==) intel(0): Will not try to enable page flipping (==) intel(0): Triple buffering disabled (==) intel(0): Using gamma correction (1.0, 1.0, 1.0) (==) intel(0): DPI set to (96, 96) (II) Loading sub module "fb" (II) LoadModule: "fb" (II) Loading /usr/lib/xorg/modules//libfb.so (II) Module fb: vendor="X.Org Foundation" compiled for 1.4.0.90, module version = 1.0.0 ABI class: X.Org ANSI C Emulation, version 0.3 (II) Loading sub module "exa" (II) LoadModule: "exa" (II) Loading /usr/lib/xorg/modules//libexa.so (II) Module exa: vendor="X.Org Foundation" compiled for 1.4.0.90, module version = 2.2.0 ABI class: X.Org Video Driver, version 2.0 (II) Loading sub module "ramdac" (II) LoadModule: "ramdac"(II) Module "ramdac" already built-in (II) intel(0): Comparing regs from server start up to After PreInit (WW) intel(0): Register 0x61200 (PP_STATUS) changed from 0xc0000008 to 0xd000000a (WW) intel(0): PP_STATUS before: on, ready, sequencing idle (WW) intel(0): PP_STATUS after: on, ready, sequencing on (WW) intel(0): Register 0x70024 (PIPEASTAT) changed from 0x00020000 to 0x00020203 (WW) intel(0): PIPEASTAT before: status: VBLANK_INT_ENABLE (WW) intel(0): PIPEASTAT after: status: VBLANK_INT_ENABLE VSYNC_INT_STATUS VBLANK_INT_STATUS OREG_UPDATE_STATUS (WW) intel(0): Register 0x71024 (PIPEBSTAT) changed from 0x00020202 to 0x80020242 (WW) intel(0): PIPEBSTAT before: status: VBLANK_INT_ENABLE VSYNC_INT_STATUS VBLANK_INT_STATUS (WW) intel(0): PIPEBSTAT after: status: FIFO_UNDERRUN VBLANK_INT_ENABLE VSYNC_INT_STATUS LBLC_EVENT_STATUS VBLANK_INT_STATUS (==) Depth 24 pixmap format is 32 bpp (II) do I need RAC? No, I don't. (II) resource ranges after preInit: [0] 0 0 0xb0000000 - 0xb003ffff (0x40000) MS[B] [1] 0 0 0xc0000000 - 0xcfffffff (0x10000000) MS[B] [2] 0 0 0xb0080000 - 0xb00fffff (0x80000) MS[B] [3] -1 0 0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B) [4] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B] [5] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B] [6] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B] [7] -1 0 0xb0100400 - 0xb01004ff (0x100) MX[B] [8] -1 0 0xb0101000 - 0xb0101fff (0x1000) MX[B] [9] -1 0 0xb0100000 - 0xb01000ff (0x100) MX[B] [10] -1 0 0xb0040400 - 0xb00404ff (0x100) MX[B] [11] -1 0 0xb0040800 - 0xb00409ff (0x200) MX[B] [12] -1 0 0xb0040000 - 0xb00403ff (0x400) MX[B] [13] -1 0 0xb0000000 - 0xb003ffff (0x40000) MX[B](B) [14] -1 0 0xc0000000 - 0xcfffffff (0x10000000) MX[B](B) [15] -1 0 0xb0080000 - 0xb00fffff (0x80000) MX[B](B) [16] -1 0 0x50000000 - 0x5007ffff (0x80000) MX[B](B) [17] 0 0 0x000a0000 - 0x000affff (0x10000) MS[B](OprD) [18] 0 0 0x000b0000 - 0x000b7fff (0x8000) MS[B](OprD) [19] 0 0 0x000b8000 - 0x000bffff (0x8000) MS[B](OprD) [20] 0 0 0x00001800 - 0x00001807 (0x8) IS[B] [21] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B] [22] -1 0 0x00000000 - 0x000000ff (0x100) IX[B] [23] -1 0 0x00003000 - 0x000030ff (0x100) IX[B] [24] -1 0 0x000018a0 - 0x000018bf (0x20) IX[B] [25] -1 0 0x00001810 - 0x0000181f (0x10) IX[B] [26] -1 0 0x000001f0 - 0x000001f0 (0x1) IX[B] [27] -1 0 0x000001f0 - 0x000001f7 (0x8) IX[B] [28] -1 0 0x000001f0 - 0x000001f0 (0x1) IX[B] [29] -1 0 0x000001f0 - 0x000001f7 (0x8) IX[B] [30] -1 0 0x000018c0 - 0x000018ff (0x40) IX[B] [31] -1 0 0x00001c00 - 0x00001cff (0x100) IX[B] [32] -1 0 0x00001840 - 0x0000185f (0x20) IX[B] [33] -1 0 0x00001820 - 0x0000183f (0x20) IX[B] [34] -1 0 0x00001800 - 0x00001807 (0x8) IX[B](B) [35] 0 0 0x000003b0 - 0x000003bb (0xc) IS[B](OprU) [36] 0 0 0x000003c0 - 0x000003df (0x20) IS[B](OprU) (II) intel(0): Kernel reported 238592 total, 1 used (II) intel(0): I830CheckAvailableMemory: 954364 kB available drmOpenDevice: node name is /dev/dri/card0 drmOpenDevice: open result is 9, (OK) drmOpenDevice: node name is /dev/dri/card0 drmOpenDevice: open result is 9, (OK) drmOpenByBusid: Searching for BusID pci:0000:00:02.0 drmOpenDevice: node name is /dev/dri/card0 drmOpenDevice: open result is 9, (OK) drmOpenByBusid: drmOpenMinor returns 9 drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0 (II) [drm] DRM interface version 1.3 (II) [drm] DRM open master succeeded. (II) intel(0): [drm] Using the DRM lock SAREA also for drawables. (II) intel(0): [drm] framebuffer mapped by ddx driver (II) intel(0): [drm] added 1 reserved context for kernel (II) intel(0): X context handle = 0x1 (II) intel(0): [drm] installed DRM signal handler (==) intel(0): VideoRam: 262144 KB (**) intel(0): Framebuffer compression enabled (**) intel(0): Tiling enabled (II) intel(0): Attempting memory allocation with tiled buffers. (II) intel(0): Success. (II) intel(0): Increasing the scanline pitch to allow tiling mode (1408 -> 2048). (II) intel(0): [drm] Registers = 0xb0080000 (II) intel(0): [drm] ring buffer = 0xc0000000 (II) intel(0): [drm] mapped front buffer at 0xc1000000, handle = 0xc1000000 (II) intel(0): [drm] mapped back buffer at 0xc5000000, handle = 0xc5000000 (II) intel(0): [drm] mapped depth buffer at 0xc6000000, handle = 0xc6000000 (II) intel(0): [drm] mapped classic textures at 0xc7000000, handle = 0xc7000000 (II) intel(0): [drm] Initialized kernel agp heap manager, 33554432 (II) intel(0): [dri] visual configs initialized (II) intel(0): Page Flipping disabled (==) intel(0): Write-combining range (0xc0000000,0x10000000) (II) intel(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is 0x0000 (II) EXA(0): Offscreen pixmap area of 34406400 bytes (II) EXA(0): Driver registered support for the following operations: (II) Solid (II) Copy (II) Composite (RENDER acceleration) (==) intel(0): Backing store disabled (==) intel(0): Silken mouse enabled (II) intel(0): Initializing HW Cursor (II) intel(0): [DRI] installation complete (II) intel(0): xf86BindGARTMemory: bind key 0 at 0x01000000 (pgoffset 4096) (II) intel(0): xf86BindGARTMemory: bind key 1 at 0x02000000 (pgoffset 8192) (II) intel(0): xf86BindGARTMemory: bind key 2 at 0x05000000 (pgoffset 20480) (II) intel(0): xf86BindGARTMemory: bind key 3 at 0x06000000 (pgoffset 24576) (II) intel(0): xf86BindGARTMemory: bind key 4 at 0x07000000 (pgoffset 28672) (II) intel(0): Fixed memory allocation layout: (II) intel(0): 0x00000000-0x0001ffff: ring buffer (128 kB) (II) intel(0): 0x00020000-0x0061ffff: compressed frame buffer (6144 kB, 0x000000003f820000 physical ) (II) intel(0): 0x00620000-0x00620fff: compressed ll buffer (4 kB, 0x000000003fe20000 physical ) (II) intel(0): 0x00621000-0x0062afff: HW cursors (40 kB, 0x000000003fe21000 physical ) (II) intel(0): 0x0062b000-0x00632fff: logical 3D context (32 kB) (II) intel(0): 0x00633000-0x00633fff: overlay registers (4 kB, 0x000000003fe33000 physical ) (II) intel(0): 0x007bf000: end of stolen memory (II) intel(0): 0x01000000-0x01ffffff: front buffer (11200 kB) X tiled (II) intel(0): 0x02000000-0x040cffff: exa offscreen (33600 kB) (II) intel(0): 0x05000000-0x05ffffff: back buffer (11264 kB) X tiled (II) intel(0): 0x06000000-0x06ffffff: depth buffer (11264 kB) X tiled (II) intel(0): 0x07000000-0x08ffffff: classic textures (32768 kB) (II) intel(0): 0x10000000: end of aperture (WW) intel(0): PRB0_CTL (0x0001f001) indicates ring buffer enabled (WW) intel(0): PRB0_HEAD (0xad60e9bc) and PRB0_TAIL (0x0000eb10) indicate ring buffer not flushed (WW) intel(0): Existing errors found in hardware state.

Posted in | 2 comments |

Dual Monitor on Let's note CF-Y4

Posted by okkez Sun, 10 Feb 2008 06:06:00 GMT

この前、自分のノートPCを Debian/sid にしたので以下のサイトを参考にデュアルディスプレイに挑戦してみた。

  1. Lets's note T4 でデュアルディスプレイ - まぁ (´_`。)
  2. Xorg RandR 1.2 - ThinkWiki

うちで使用するモニタの解像度は以下のとおり。

  • Let's Note -> 1400 x 1050
  • 外部ディスプレイ -> 1280 x 1024

こんな感じだったので xorg.conf に以下のような記述をしてみた。

Section "Screen" Identifier "Default Screen" Device "Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controlle r" Monitor "Generic Monitor" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1400x1050" "1280x1024" "1024x768" "800x600" "640x480" Virtual 2680 1050 EndSubSection EndSection

この設定では X が起動しなくなった。ログを確認してみると「frame buffer の width は 2048 より大きくできません」みたいな雰囲気のメッセージだった。

# 正確なログが残ってなかったので記憶を頼りに。

そこで色々調べて 2番のサイトを見つけるにいたったわけですが、そこには 「Intel のチップセットの場合は 2048x2048 より大きい Virtual は指定できません」みたいなことが書いてあった。

# なんか条件があるみたいだったけど、よく読んでない

それならば、ということで Virtual に 2048x2048 を指定して再起動したらちゃんと X が起動しました。

xrandr で確認したら以下のような感じだった

Screen 0: minimum 320 x 200, current 1400 x 1050, maximum 2048 x 2048 VGA connected (normal left inverted right x axis y axis) 1280x1024 60.0 + 59.9 1024x768 70.1 60.0 832x624 74.6 800x600 72.2 75.0 60.3 56.2 640x480 75.0 72.8 66.7 60.0 720x400 70.1 LVDS connected 1400x1050+0+0 (normal left inverted right x axis y axis) 0mm x 0mm 1400x1050 59.9*+ 85.3 74.8 70.0 60.0 1280x1024 85.0 75.0 60.0 1280x960 85.0 60.0 1280x800 60.0 1152x864 85.1 75.0 1280x768 60.0 1152x768 54.8 1024x768 85.0 75.0 70.1 60.0 832x624 74.6 800x600 85.1 72.2 75.0 60.3 56.2 640x480 85.0 72.8 75.0 59.9 720x400 85.0 640x400 85.1 640x350 85.1

LVDSが Let's Note の液晶で、 VGA が外部ディスプレイ。

以下のようなコマンドで色々できる。

# 外部ディスプレイに内蔵ディスプレイと同じ内容を出力 xrandr --output LVDS --auto --output VGA --auto --same-as LVDS # 縦にずらしたデュアルディスプレイ。Virtualのサイズが不足しているので中途半端 xrandr --output LVDS --pos 0x0 --output VGA --mode 1280x1024 --pos 0x1000 # 解像度も調節した xrandr --output LVDS --pos 0x0 --output VGA --mode 1024x768 --pos 0x1050 # 外部ディスプレイOFF xrandr --output VGA --off

やりたかったけどできなかったこと

  • 異なる解像度で内蔵ディスプレイと外部ディスプレイに同じ画面を出力
  • いわゆるデュアルディスプレイ。
    • Virtual がちゃんと指定できれば可能というのはわかった

まとめ

一応、プレゼンはできそうなのでヨシとする。今日確認してなかったら危ないところだった。

Posted in | コメントはありません |

openwengo on Debian GNU/Linux etch

Posted by okkez Fri, 17 Aug 2007 03:45:00 GMT

openwengo を試したみたので書いておきます。

この情報は 2007-08-17 時点のものです。

openwengo のインストール

Debian 用のパッケージが存在するのでそれを使用します。DebianUbuntuPackages - OpenWengo - Trac

/etc/apt/source.list に以下を追記します。

deb http://pkg-voip.buildserver.net/debian etch main

以下のコマンドを実行すると警告メッセージが表示されます。

$ sudo aptitude update
W: GPG error: http://pkg-voip.buildserver.net etch Release: 公開鍵を利用できないため、以下の署名は検証できま せんでした: NO_PUBKEY 2A5E3A5A52ABFCB1 W: これらの問題を解決するためには apt-get update を実行する必要があるかもしれません

なので AptGet - Debian GNU/Linux スレッドテンプレ を参考に鍵情報を登録します。

# sudo でやると何故かうまくいかなかった

# gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 2A5E3A5A52ABFCB1 # gpg --armor --export 2A5E3A5A52ABFCB1 | apt-key add -

これで鍵情報を登録することができたので、openwengo をインストールします。

$ sudo aptitude update $ sudo aptitude install wengophone

インストールできたら、wengophone を起動してアカウントを作成すればよいです。

web カメラの設定

手元に web カメラ QVP-61HSRD があったので QuickCam を参考に使えるようにしてみる。

まずはデバイスを確認。

$ lsusb |grep Logitech Bus 001 Device 004: ID 046d:08d9 Logitech, Inc.

046d がベンダーID で 08d9 がプロダクトIDらしいので、spca5xx でページ内検索して確認します。

サポートされているようなのでドライバをインストールします。

$ sudo aptitude install spca5xx-source $ sudo module-assistant prepare $ sudo module-assistant auto-install spca5xx

上記コマンドで必要なもの一式インストールしてくれるはずです。途中でエラーメッセージがでたら、なんか足りてないので調べてインストールしましょう。

動作確認は ekiga でもできるし wengophone でもできます。

Posted in | コメントはありません |