Nothin' but Slackware

バイクとLinuxに戯れる日々

ソフトウェア

NVIDIA-Prime

NVIDIA社最新のLinux用ドライバには NVIDIA-Prime機能があり
常時NVIDIA GPUを使用するような使い方ができる。
bumblebeeのような面倒な導入の必要がない代りに、Intel VGAの機能は使うことができなくなる。
導入の方法は、普通に
# sh NVIDIA-Linux-・・・.run
を実行してドライバを導入して、下記のxorg.confを /etc/X11/xorg.conf として保存。
(内容はそれぞれのPC仕様により変わるはず)

----- >8 ------ >8 ----- >8 ------ >8
Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
        VendorName     "NVIDIA Corporation"
        BoardName      "GeForce 940MX"
    BusID "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection
----- >8 ------ >8 ----- >8 ------ >8

LinuxでGPUベンチマーク

bunblebeeを導入したslackware64-currentで、IntelとNVIDIAそれぞれの性能を
ベンチマークアプリケーション(Unigine-Heaven)で比較した。

<結果>
Intel VGA  : score=84
NVIDIA-GPU : score=156

NVIDIAはIntelのほぼ倍のスコア。NVIDIAの圧勝。

Linux でも NVIDIAのOptimusを使いたい

とりあえず msi GL-62 (6QC)に slackware64-current はインストールできた。
このPCは Intelの-VGAのボードにNVIDIAのGPUが乗っかっている。
LinuxでもIntelとNVIDIAのグラフィック機能を場面によって意使い分けたい。
そのためのアプリケーションが bumblebee です。

下記URLのスクリプトを使って関連パッケージをインストールし、現在、IntelとNVIDIAの
機能両方を使い分けできている。

PC仕様(参考)
# lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
00:14.0 USB controller: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation 100 Series/C230 Series Chipset Family Thermal Subsystem (rev 31)
00:16.0 Communication controller: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 (rev 31)
00:17.0 SATA controller: Intel Corporation HM170/QM170 Chipset SATA Controller [AHCI Mode] (rev 31)
00:1c.0 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #1 (rev f1)
00:1c.3 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #4 (rev f1)
00:1f.0 ISA bridge: Intel Corporation HM170 Chipset LPC/eSPI Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller (rev 31)
00:1f.3 Audio device: Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller (rev 31)
00:1f.4 SMBus: Intel Corporation 100 Series/C230 Series Chipset Family SMBus (rev 31)
01:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940MX] (rev a2)
02:00.0 Network controller: Intel Corporation Wireless 3165 (rev 81)
03:00.0 Ethernet controller: Qualcomm Atheros QCA8171 Gigabit Ethernet (rev 10)

# inxi -Fxxz
System:    Host: jw-slack.jw-slack.org Kernel: 4.19.47 x86_64 bits: 64 compiler: gcc v: 9.1.0 Desktop: Xfce 4.12.4
           tk: Gtk 2.24.32 wm: xfwm4 dm: startx Distro: Slackware 14.2
Machine:   Type: Laptop System: Micro-Star product: GL62 6QC v: REV:1.0 serial: <filter> Chassis: type: 10 serial: N/A
           Mobo: Micro-Star model: MS-16J6 v: REV:1.0 serial: <filter> UEFI: American Megatrends v: E16J6IMS.108
           date: 03/16/2017
Battery:   ID-1: BAT1 charge: 39.7 Wh condition: 42.4/43.2 Wh (98%) volts: 12.1/10.8 model: MSI Corp. MS-16J6 serial: N/A
           status: Unknown
CPU:       Topology: Quad Core model: Intel Core i5-6300HQ bits: 64 type: MCP arch: Skylake-S rev: 3 L1 cache: 256 KiB
           L2 cache: 6144 KiB L3 cache: 6144 KiB
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 18432
           Speed: 2804 MHz min/max: 800/3200 MHz Core speeds (MHz): 1: 2800 2: 2829 3: 2801 4: 2803
Graphics:  Device-1: Intel HD Graphics 530 vendor: Micro-Star MSI driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:191b
           Device-2: NVIDIA GM108M [GeForce 940MX] vendor: Micro-Star MSI driver: nvidia v: 430.14 bus ID: 01:00.0
           chip ID: 10de:134d
           Display: server: X.Org 1.20.5 driver: intel,modesetting,nouveau,nv unloaded: vesa alternate: fbdev
           resolution: 1920x1080~60Hz
           OpenGL: renderer: Mesa DRI Intel HD Graphics 530 (Skylake GT2) v: 4.5 Mesa 19.0.5 compat-v: 3.0 direct render: Yes
Audio:     Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: Micro-Star MSI Sunrise Point-H driver: snd_hda_intel
           v: kernel bus ID: 00:1f.3 chip ID: 8086:a170
           Sound Server: ALSA v: k4.19.47
Network:   Device-1: Intel Wireless 3165 driver: iwlwifi v: kernel port: e000 bus ID: 02:00.0 chip ID: 8086:3165
           IF: wlan0 state: up mac: <filter>
           Device-2: Qualcomm Atheros QCA8171 Gigabit Ethernet vendor: Micro-Star MSI driver: alx v: kernel port: d000
           bus ID: 03:00.0 chip ID: 1969:10a1
           IF: eth0 state: down mac: <filter>
Drives:    Local Storage: total: 938.73 GiB used: 51.34 GiB (5.5%)
           ID-1: /dev/sda vendor: HGST (Hitachi) model: HTS721010A9E630 size: 931.51 GiB speed: 6.0 Gb/s serial: <filter>
           ID-2: /dev/sdb type: USB model: ELECOM MF-SU2B size: 7.22 GiB serial: <filter>
Partition: ID-1: / size: 118.71 GiB used: 40.10 GiB (33.8%) fs: ext4 dev: /dev/sda5
           ID-2: swap-1 size: 2.15 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda6
Sensors:   System Temperatures: cpu: 58.0 C mobo: N/A
           Fan Speeds (RPM): N/A
Info:      Processes: 220 Uptime: 2h 36m Memory: 15.57 GiB used: 1.21 GiB (7.8%) Init: SysVinit v: 2.94 runlevel: 3 default: 3
           Compilers: gcc: 9.1.0 alt: 9.1.0 clang: 8.0.0 Shell: bash v: 5.0.7 running in: xfce4-terminal inxi: 3.0.34

Slackware64 on msi note-PC GL-62 6QC

Slackware64-current on msi gaming notebook (GL62 6QC)

メモ代りに久々に書き込む。
Step-1) インストール用のHDD空きスペースを作成。
    Gparted-CDで起動して gpartedツールでWindows10領域を縮小して
   Linux用空き容量を確保。今回は120GBを確保し、ext4でフォーマット。

Step-2) Slackware64-currentのDVDで起動し、slackwareをインストールする。
    インストール自体は得に問題なかったような記憶。(曖昧)
   slackwareはデフォルトではブートローダーとしてLILOをインストールしようと
   するが、PC本体にLILOをインストールしてWindowsが起動出来なくなるのが
   いやなのでHDDのMBRへのLILOの導入はしないでslackware64を
   インストールしたHDDの先頭にLILOをインストールする。

Srep-3) もしくは。インストーラーを終了せずに、インストーラーのコンソールに戻り、
   # chroot /mnt /bin/bash
            してインストールした」slackware-currentにchroot でrootとして入って、
   grub-install /dev/[デバイス名] してインストールしたHDDの 先頭セクタに
   grub をインストールする。その後、 grub-mkconfig -o /boot/grub/grub.cfg
   しておく。

Step-4) 今度は supergrub2 CDでインストールしたslackwareを起動する。
    起動はするが、コンソールに数字の羅列が表示されて数分でフリーズしてしまう。
   ネットで調べてみると、起動時のカーネルオプションとして下記を追加して
   起動すると良いことが(なんとなく)わかった。(下記赤字部分が追加した
   オプション)
   vmlinuz pci=noaer libata.force=noncq intel_idle.max_cstate=1 nvidia-drm.modeset=1
   (全部必要かどうかは不明だが、これで問題なく動作しているので良しとした)

Step-5) マルチブート用の boot-USBを作成する。
    USBメモリを挿して( /dev/sdb1 とする)ロートコンソールで以下を入力。
# mount -t vfat /dev/sdb1 /boot/efi/
# modprobe dm-mod
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --recheck --debug
# grub-mkconfig -o /boot/grub/grub.cfg
    grub.cfg作成語は 前述のカーネルオプションを追加しておくことを忘れずに。

Step-6) BIOS設定
    PCをシャットダウンし、再起動にmsiロゴが出ているときに Deleteキーを押して
   BIOS設定画面に移行し、BOOT順番を
   1. 光学ドライブ 2.USB 3.HDD とする。

Step-7) 補足(slackwareとwin10 の箇所の grub.cfg記述。参考)
menuentry 'Slackware64-15.0RC GNU/Linux on /dev/sda5 - bumblebee' --class slackware64-14.2 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4cdb8885-eb85-4c1f-8caf-cf96e9213be7' {
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  4cdb8885-eb85-4c1f-8caf-cf96e9213be7
        else
          search --no-floppy --fs-uuid --set=root 4cdb8885-eb85-4c1f-8caf-cf96e9213be7
        fi
        echo    'Slackware64-15.0 booting.............'
        linux   /boot/vmlinuz pci=noaer libata.force=noncq intel_idle.max_cstate=1 nvidia-drm.modeset=1 root=/dev/sda5 vga=795
}
・・・中略

menuentry "Windows 10 (BCD-UEFI configuration on system drive /dev/sda1)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    insmod search_fs_uuid
    insmod chain

    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 C0AC-8030
    else
      search --no-floppy --fs-uuid --set=root C0AC-8030
    fi

    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

各種アップデート

以下をアップデート(順不同)

・ Linux kernel 2.6.29.1 --- Tuz ペンギンロゴは好みじゃなかったので Slackwareロゴに置き換え
・ NVIDIA driver 180.44
・ xine-lib 1.1.16.3
・ MPlayer 20090404 snapshot --- ALSA関連エラーメッセージがうざいので gmplayer -msglebel all=-1 で起動
・ AdobeReader 9.1.0 --- 日本語印刷OKも確認

Adobe Reader 8.1.3 他

いろいろアップデート
* Adobe Reader 8.1.3
* firefox-3.0.4

Slackwareとは関係ないが Pioneer DVR-S16J と DVR-S12J の最新ファームウェアが
出ていたので MCSE を介して RPC-1ファームウェアに変換してアップデートしておいた。

(参考)DVRFlash -v による出力

DVRFlash v2.5.1: Pioneer DVR firmware flasher
by Agent Smith, et al., March 2008

Commandline:
./DVRFlash -v

Device parameter was not given, detecting all DVR drives:

Device : /dev/scd0
Vendor : PIONEER
Model : DVD-RW DVR-216L
Revision : 1.09

Status : RPC-1 (region free)


Device : /dev/scd1
Vendor : PIONEER
Model : DVD-RW DVR-212L
Revision : 1.28

Status : RPC-1 (region free)

カーネル 2.6.27.6

カーネル 2.6.27.6 にアップデート。
そして、ついでに alsa-driver-1.0.18a にアップデート。(ice1724 のパッチは不要になった)

ice1724.c in alsa-driver-1.0.18

ALSA開発チームの Iwaiさんが alsa-devel-ML に投稿していた。
http://mailman.alsa-project.org/pipermail/alsa-devel/2008-November/012118.html

パッチ適用して動作する(素の alsa-driver-1.0.18 で発生していた問題が直った)ことを確認した。
ドライバの修正版がリリースされるかもしれないな。

カーネル 2.6.27.4 他

カーネル 2.6.27.4 にアップデートついでに ALSA 1.0.18 にしてみた。

・・・が、 alsa-driver-1.0.18 の(おそらく) ice1724.c ソースに加えられた修正のせいで
ONKYO SE200-PCI の動作がおかしい。
ice1724.c ソースを 1.0.18rc3 のものに戻したら直った。

というわけで、ALSA関連のバージョンは以下の状態で運用することにした。
alsa-lib-1.0.18
alsa-utils-1.0.18
alsa-osslib-1.0.17
alsa-driver-1.0.18 + ice1724.c_revert.patch

Build svgalib_helper under kernel-2.6.27.2

カーネル 2.6.27.x 環境でコンパイルできなかった svgalib_helper 1.9.25 モジュールが
Gentoo パッチのおかげでうまくいくようになった。 Gentoo Linux に感謝。
ギャラリー
  • deepl-clip.sh で簡単翻訳 [更新:2025-04-29]
  • Avidemux 2.8.2_20250323_7cf15b3
  • Avidemux 2.8.2_20250323_7cf15b3
  • Avidemux 2.8.x with Qt6 GUI
  • Avidemux 2.8.x with Qt6 GUI
  • MEGAcmd-2.0.0_Linux
  • gcolor3 with Japanese menu and LC_MESSAGES
  • avidemux2 TEST package from the latest git source (on jul.23.2024)
  • fcitx5-mozc-2.29.5135.102.1 (15jw) -- Added "merge-ut-dictionaries"