「Uvesafb」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(Pkg/AUR テンプレートの更新)
(他言語へのリンクを修正)
 
(3人の利用者による、間の12版が非表示)
2行目: 2行目:
 
[[Category:視覚効果]]
 
[[Category:視覚効果]]
 
[[en:Uvesafb]]
 
[[en:Uvesafb]]
[[it:Uvesafb]]
 
 
[[zh-hans:Uvesafb]]
 
[[zh-hans:Uvesafb]]
 
{{Related articles start}}
 
{{Related articles start}}
11行目: 10行目:
 
他のフレームバッファドライバーと違って、uvesafb は v86d と呼ばれるユーザースペースの仮想化デーモンを必要とします。x86 の上で x86 のコードをエミュレートするのは馬鹿げているようにも見えますが、他のアーキテクチャでフレームバッファコードを使用したいという場合に大事になります (特に x86 以外のアーキテクチャ)。カーネル 2.6.24 では新しいフレームバッファドライバーが追加されました。標準の vesafb よりも多くの機能が存在します:
 
他のフレームバッファドライバーと違って、uvesafb は v86d と呼ばれるユーザースペースの仮想化デーモンを必要とします。x86 の上で x86 のコードをエミュレートするのは馬鹿げているようにも見えますが、他のアーキテクチャでフレームバッファコードを使用したいという場合に大事になります (特に x86 以外のアーキテクチャ)。カーネル 2.6.24 では新しいフレームバッファドライバーが追加されました。標準の vesafb よりも多くの機能が存在します:
 
# 遅延時間後の正しいブランクとハードウェアの復帰
 
# 遅延時間後の正しいブランクとハードウェアの復帰
# システム BIOS のようにカスタム解像度をサポート
+
# システム BIOS のようにカスタム解像度をサポート
 
vesafb と同じ数だけのハードウェアをサポートします。
 
vesafb と同じ数だけのハードウェアをサポートします。
   
 
== インストール ==
 
== インストール ==
   
[[AUR]] から {{aur|v86d}} を[[インストール]]してください。
+
[[AUR]] から {{aur|uvesafb-dkms}} パッケージ [[インストール]] してください。
   
== システムの準備 ==
+
== 設定 ==
   
 
フレームバッファ関連のカーネルブートパラメータは全てブートローダーの設定から削除して vesafb フレームバッファがロードされないようにしてください。
 
フレームバッファ関連のカーネルブートパラメータは全てブートローダーの設定から削除して vesafb フレームバッファがロードされないようにしてください。
27行目: 26行目:
 
上記のコマンドで何も返ってこないようにする必要があります。{{ic|1=vga=}} オプションを記述している場合は、削除してください。
 
上記のコマンドで何も返ってこないようにする必要があります。{{ic|1=vga=}} オプションを記述している場合は、削除してください。
   
=== GRUB ===
+
=== ブートマネージャー ===
{{note|This might not work.}}
 
まず {{ic|/etc/default/grub}} を編集して {{ic|1=GRUB_GFXPAYLOAD_LINUX=keep}} 行をコメントアウトしてください。
 
   
  +
==== GRUB ====
そして標準のスクリプトを使って {{ic|grub.cfg}} を再生成します:
 
   
  +
まず {{ic|/etc/default/grub}} を編集して {{ic|1=GRUB_GFXPAYLOAD_LINUX=keep}} 行をコメントアウトし
# grub-mkconfig -o /boot/grub/grub.cfg
 
   
  +
[[GRUB#メイン設定ファイルの生成|メイン設定のファイルを再生成します。]]
=== GRUB legacy ===
 
  +
  +
==== GRUB legacy ====
   
 
uvesafb が正しく動作するように {{ic|/boot/grub/menu.lst}} の kernel 行から {{ic|vga<nowiki>=</nowiki>xxx}} という記述を全て削除してください。
 
uvesafb が正しく動作するように {{ic|/boot/grub/menu.lst}} の kernel 行から {{ic|vga<nowiki>=</nowiki>xxx}} という記述を全て削除してください。
   
=== Systemd ===
+
=== mkinitcpio フック ===
   
systemd を使っている場合、v86d フックを {{ic|/etc/mkinitcpio.conf}} の HOOKS に追加します。これ uvesafb が起動時に動くようになります。
+
v86d フックを {{ic|/etc/mkinitcpio.conf}} の HOOKS に追加します。これにより、ブート時に uvesafb が引き継ぐことができます。
 
 
 
HOOKS="base udev v86d ..."
 
HOOKS="base udev v86d ..."
 
== uvesafb の設定 ==
 
   
 
=== 解像度の定義 ===
 
=== 解像度の定義 ===
51行目: 48行目:
 
uvesafb の設定は {{ic|/usr/lib/modprobe.d/uvesafb.conf}} で定義します:
 
uvesafb の設定は {{ic|/usr/lib/modprobe.d/uvesafb.conf}} で定義します:
   
  +
{{ic|mode_option}} のドキュメントは [https://docs.kernel.org/fb/modedb.html] にあります。
# This file sets the parameters for uvesafb module.
 
# The following format should be used:
 
# options uvesafb mode_option=<xres>x<yres>[-<bpp>][@<refresh>] scroll=<ywrap|ypan|redraw> ...
 
#
 
# For more details see:
 
# https://www.kernel.org/doc/Documentation/fb/uvesafb.txt
 
#
 
options uvesafb mode_option=1280x800-32 scroll=ywrap
 
 
{{ic|mode_option}} のドキュメントは [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/fb/modedb.txt linux.git/tree/Documentation/fb/modedb.txt] にあります。
 
   
 
パッケージが更新されたときにカスタマイズした設定が上書きされないように、ファイルを {{ic|/etc/modprobe.d/uvesafb.conf}} にコピーしてください:
 
パッケージが更新されたときにカスタマイズした設定が上書きされないように、ファイルを {{ic|/etc/modprobe.d/uvesafb.conf}} にコピーしてください:
70行目: 58行目:
 
FILES="/etc/modprobe.d/uvesafb.conf"
 
FILES="/etc/modprobe.d/uvesafb.conf"
   
変更を適用するにはカーネルの ''initramfs'' イメージ再生成する必要があります。
+
変更を有効にするにはinitramfs を[[mkinitcpio#イメージ作成とアクティベーション|再生成]] し、システムを再起動します。
 
# mkinitcpio -p linux
 
 
システムを再起動して変更が適用されたか確認してください。
 
   
 
=== 解像度の最適化 ===
 
=== 解像度の最適化 ===
92行目: 76行目:
 
$ cat /sys/class/graphics/fb0/virtual_size
 
$ cat /sys/class/graphics/fb0/virtual_size
   
== Uvesafb をカーネルに組み込む ==
+
== カーネルモジュールパラメータ ==
   
分でカーネルをコンパイルする場合、カーネルに uvesafb を組み込ん {{ic|/etc/rc.local}} などから v86d を実行することできます。この場合、オプションは {{ic|1=video=uvesafb:<options>}} という形式で[[カーネルパラメータ]]として指定しま。下で書かれているように uvesafb と 915resolution を組み合わせるときはこの方法を使うことできないので注意してください
+
カーネルをコンパイルする場合uvesafb をカーネルにコンパイルし、後で v86d を実行することできます。この場合、オプションは {{ic|1=video=uvesafb:''options''}} 形式で [[カーネルパラメータ]] としてすことできます
 
== Uvesafb と 915resolution ==
 
 
In the following, we address a more complex scenario. Many intel video chipsets for widescreen laptops are known to have a buggy BIOS, which does not support the main, native resolution of the wide screen! For this reason, 915resolution was created to patch the BIOS at boot time and allow the X server to use the widescreen resolution.
 
Nowadays, the X server is able to do this without the help of 915resolution. However, 915resolution can be combined with uvesafb in order to obtain a widescreen framebuffer, without any need to launch X at all. In this case, we need to load uvesafb after having run 915resolution, so that uvesafb can resort to the proper resolution.
 
 
=== 915resolution-static ===
 
 
In this scenario, 915resolution needs to be compiled statically (since it is going to be in an initramfs, it can not be linked to external libraries). Thus you CAN NOT use the 915resolution package in the [community] repo. Look instead for {{AUR|915resolution-static}}{{Broken package link|{{aur-mirror|915resolution-static}}}} in the AUR. It compiles 915 resolution statically and provides a 915 resolution hook, so you can run 915resolution before loading uvesafb and get the patched resolution. So install 915resolution-static via makepkg and [[pacman]].
 
 
=== 解像度 ===
 
 
You need to edit the 915resolution hook in order to define the BIOS mode you want to replace and and the resolution you want to get. You can get information about all the options for 915resolution with:
 
 
$ 915resolution -h
 
 
Edit {{ic|/lib/initcpio/hooks/915resolution}} and modify the options for 915resolution:
 
 
run_hook ()
 
{
 
msg -n ":: Patching the VBIOS..."
 
/usr/sbin/915resolution 5c 1280 800
 
msg "done."
 
}
 
 
As default 5c is the code of the BIOS mode to replace. You can get a list of the available BIOS video modes with the command {{ic|915resolution -l}}.
 
{{Note|You want to choose the code of a mode that you ''DO NOT'' need (neither in the framebuffer nor in X), because 915resolution will replace it with a new user-defined mode. In the above example, {{ic|1280 800}} is the new desired resolution.}}
 
 
=== HOOKS ===
 
 
Add the 915resolution hook and, after it, the v86d hook to HOOKS in {{ic|/etc/mkinitcpio.conf}}. Put them before the hooks for the keymap, the resume from suspension and the filesystems.
 
HOOKS="base udev 915resolution v86d ..."
 
 
Then you need to regenerate your initramfs with mkinitcpio (adjust the following command to your setup):
 
 
mkinitcpio -p linux
 
   
 
== トラブルシューティング ==
 
== トラブルシューティング ==
138行目: 86行目:
 
{{Ic|vga<nowiki>=</nowiki>xxx}} カーネルパラメータを削除するのを忘れてないか確認してください -- この設定が残っていると UVESA フレームバッファが標準の VESA フレームバッファで上書きされてしまいます。
 
{{Ic|vga<nowiki>=</nowiki>xxx}} カーネルパラメータを削除するのを忘れてないか確認してください -- この設定が残っていると UVESA フレームバッファが標準の VESA フレームバッファで上書きされてしまいます。
   
もしくは {{ic|1=video=vesa:off vga=normal}} をカーネルコマンドラインに追加してください。
+
もしくは {{ic|1=video=vesa:off vga=normal}} を [[カーネルコマンドライン]] に追加してみてください。
 
=== Error: "pci_root PNP0A08:00 address space collision + Uvesafb cannot reserve memory" ===
 
 
This occurs on the Acer Aspire One 751h with the 2.6.34-ARCH kernel; whether it also occurs on other systems is unknown. Even without another framebuffer interfering with the uvesafb setup, uvesafb cannot reserve the necessary memory region.
 
 
You can fix this issue by adding the following to the kernel parameters in your bootloader's configuration.
 
 
pci=nocrs
 
   
 
== 参照 ==
 
== 参照 ==

2023年10月28日 (土) 01:52時点における最新版

関連記事

他のフレームバッファドライバーと違って、uvesafb は v86d と呼ばれるユーザースペースの仮想化デーモンを必要とします。x86 の上で x86 のコードをエミュレートするのは馬鹿げているようにも見えますが、他のアーキテクチャでフレームバッファコードを使用したいという場合に大事になります (特に x86 以外のアーキテクチャ)。カーネル 2.6.24 では新しいフレームバッファドライバーが追加されました。標準の vesafb よりも多くの機能が存在します:

  1. 遅延時間後の正しいブランクとハードウェアの復帰
  2. システム BIOS のようにカスタム解像度をサポート

vesafb と同じ数だけのハードウェアをサポートします。

インストール

AUR から uvesafb-dkmsAUR パッケージを インストール してください。

設定

フレームバッファ関連のカーネルブートパラメータは全てブートローダーの設定から削除して vesafb フレームバッファがロードされないようにしてください。

$ grep vga /proc/cmdline
$ grep -ir vga /etc/modprobe.d/

上記のコマンドで何も返ってこないようにする必要があります。vga= オプションを記述している場合は、削除してください。

ブートマネージャー

GRUB

まず /etc/default/grub を編集して GRUB_GFXPAYLOAD_LINUX=keep 行をコメントアウトし

メイン設定のファイルを再生成します。

GRUB legacy

uvesafb が正しく動作するように /boot/grub/menu.lst の kernel 行から vga=xxx という記述を全て削除してください。

mkinitcpio フック

v86d フックを /etc/mkinitcpio.conf の HOOKS に追加します。これにより、ブート時に uvesafb が引き継ぐことができます。

HOOKS="base udev v86d ..."

解像度の定義

uvesafb の設定は /usr/lib/modprobe.d/uvesafb.conf で定義します:

mode_option のドキュメントは [1] にあります。

パッケージが更新されたときにカスタマイズした設定が上書きされないように、ファイルを /etc/modprobe.d/uvesafb.conf にコピーしてください:

# cp /usr/lib/modprobe.d/uvesafb.conf /etc/modprobe.d/uvesafb.conf

そして /etc/mkinitcpio.conf の FILES セクションのエントリに設定ファイルを追加します:

FILES="/etc/modprobe.d/uvesafb.conf"

変更を有効にするには、initramfs を再生成 し、システムを再起動します。

解像度の最適化

次のコマンドを使うことで使用できる解像度を全てリストアップできます:

$ cat /sys/bus/platform/drivers/uvesafb/uvesafb.0/vbe_modes

返ってきたエントリを使って /usr/lib/modprobe.d/uvesafb.conf を修正しましょう。

現在の解像度のチェック

以下のコマンドを使うことで現在のフレームバッファの解像度を表示できます。設定が反映されているかどうか確認するのに使ってください:

$ cat /sys/devices/virtual/graphics/fbcon/subsystem/fb0/virtual_size
$ cat /sys/class/graphics/fb0/virtual_size

カーネルモジュールパラメータ

独自のカーネルをコンパイルする場合は、uvesafb をカーネルにコンパイルし、後で v86d を実行することもできます。この場合、オプションは video=uvesafb:options の形式で カーネルパラメータ として渡すことができます。

トラブルシューティング

Uvesafb cannot reserve memory

vga=xxx カーネルパラメータを削除するのを忘れてないか確認してください -- この設定が残っていると UVESA フレームバッファが標準の VESA フレームバッファで上書きされてしまいます。

もしくは video=vesa:off vga=normalカーネルコマンドライン に追加してみてください。

参照