看板 Linux 關於我們 聯絡資訊
最近把主機板和CPU換了, 換成i3-12100 遇到一些問題, google 後, 把我的 Ubuntu 20.04 裝了5.16 kernel 解決大部份的問題, 但播影片時都不能硬解, mpv/vlc 都是軟解 i3-12100夠力, 軟解沒問題, 但我還是希望能用到硬解 google 到一些標[solved]的討論, 但我看不太懂,亂試也不行, 有版友試過什麼可以用的嗎? -------------- 3/20 update --------------- Ubuntu22.04 (3/19 Daily Build) 用 mpv 直接就是硬解, 什麼都不用設~~ ------------------------------------------ -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.228.69.206 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1647389529.A.065.html ※ 編輯: in09 (125.228.69.206 臺灣), 03/16/2022 08:13:24
brli7848: 找了哪些文章,設定了什麼? 03/16 09:41
install linux-oem-20.04b :好像有好一點 加 i915.conf, 在 grub 加 i915 option : 都沒用 給 i915 上 patch , 這我搞不懂, 試了很多, 不知道到底 patch 了沒, 都沒作用就是了
hizuki: intel 硬解請用intel media driver而不是老的那個 03/16 11:03
google "intel media driver" 之後, 我試著裝 intel-media-va-driver -> 已是最新 再 google, 裝 intel-media-va-driver-non-free, 還是一樣 vainfo output: libva info: VA-API version 1.7.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_7 libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed libva info: va_openDriver() returns 1 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_1_6 libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed libva info: va_openDriver() returns -1 vaInitialize failed with error code -1 (unknown libva error),exit
idisnothing: mpv加上--log-file這個參數 然後檢查log檔看問題在哪 03/16 20:16
加這個 option 之後沒有生出 log file, 但在用mpv時有這些error gfx12 and newer are not supported on i965 libGL error: failed to create dri screen libGL error: failed to load driver: i965 [vo/gpu/opengl] Suspected software renderer or indirect context. Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory [vo/vdpau] Error when calling vdp_device_create_x11: 1 感謝各位的回應 ※ 編輯: in09 (125.228.69.206 臺灣), 03/16/2022 20:57:11
brli7848: 你直接在環境變數加上LIBVA_DRIVER_NAME=iHD吧 03/16 23:08
這個設了以後, vainfo的output 少i965 那部份 iHD 還是 init fail
OrzOGC: 古早i5都能硬解了...你這只是設定錯了 03/16 23:13
我原來的 G4600 也能硬解啊, 都不用設定什麼, 換新的 i3 才不行的
Bencrie: 你那顆是今年的 CPU 耶,換 kernel 以外還要換 mesa 03/17 00:34
Bencrie: 最好 libva 也要升到新的 03/17 00:34
Bencrie: 總之先把 es2_info vainfo 弄到能正常吐東西吧 03/17 00:38
google "Ubuntu mesa" 之後, 我加 repository ppa:kisak/kisak-mesa, upgrade, 看起來有裝一堆 lib, libva 相關的我試著 install, 都是最新的了 vainfo 還是 iHD init fail
ys35078657: 建議跟隨最新的ubuntu版本 03/17 00:42
我有裝一版 Ubuntu 22.04 daily build (2/27版), 也是不行, 等正式release 出來我會再試
idisnothing: --log-file要加上路徑 ex: --log-file=/tmp/mpv.log 03/17 01:16
idisnothing: B大正解 更新mesa 弄到至少vainfo能正常吐出東西 03/17 01:17
idisnothing: 或是換個package比較新的distro可能會比較容易些 03/17 01:18
idisnothing: 但是像這麼新的iGPU 據個人經驗 就算能硬解了 也會有 03/17 01:37
idisnothing: 一些小問題 都要過一陣子才會比較穩定 03/17 01:38
有沒有建議試試哪個 distro? mpv log 很長, 我看不太出來哪裏有 fail , 好像 fail 都寫在 stdout 了 ※ 編輯: in09 (125.228.69.206 臺灣), 03/17/2022 08:28:03
Bencrie: 你要不要先 dmesg |grep i915 看看 03/17 09:22
Bencrie: 另外就是新硬體還會需要新的 linux-firmware 03/17 09:26
感謝, 根據 dmesg 的內容, 我去抓了 tgl_guc_62.0.0.bin google 之後做 "update-initramfs -u" -> 少更多bin, 再去抓, OK 之後 reboot, tgl_guc_62.0.0.bin 可load , 但變成submission:disabled 再 google, 找到一個 bug report, 上個月的, 我想我得等等吧? ※ 編輯: in09 (125.228.69.206 臺灣), 03/17/2022 12:56:16
hizuki: mpv都先不用試了, mesa不正常就是gpu不work 03/17 13:20
hizuki: lspci -vv貼一下,我確認為何最新ubuntu不工作 03/17 13:21
lspci -vv 內容很長, 我猜是要看 VGA 這部份? VGA compatible controller: Intel Corporation Device 4692 (rev 0c) (prog-if 00 [VGA controller]) DeviceName: Onboard - Video Subsystem: ASUSTeK Computer Inc. Device 8694 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0, Cache Line Size: 64 bytes Interrupt: pin A routed to IRQ 146 Region 0: Memory at 6002000000 (64-bit, non-prefetchable) [size=16M] Region 2: Memory at 4000000000 (64-bit, prefetchable) [size=256M] Region 4: I/O ports at 5000 [size=64] Expansion ROM at 000c0000 [virtual] [disabled] [size=128K] Capabilities: <access denied> Kernel driver in use: i915 Kernel modules: i915
Bencrie: linux-firmare 拜託從 git 上抓整包更新 03/17 13:35
哈, 原來有一包 tar.gz 可以下載~~ 不過, 一整包都上了之後, dmesg 一樣是 submission:disabled, vainfo 也還是 init fail [ 0.624099] i915 0000:00:02.0: [drm] VT-d active for gfx access [ 0.624105] fb0: switching to i915 from EFI VGA [ 0.624142] i915 0000:00:02.0: vgaarb: deactivate vga console [ 0.624166] i915 0000:00:02.0: [drm] Transparent Hugepage mode 'huge=within_size' [ 0.624727] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem [ 0.625217] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/adls_dmc_ver2_01.bin (v2.1) [ 0.756280] i915 0000:00:02.0: [drm] GuC firmware i915/tgl_guc_62.0.0.bin version 62.0 submission:disabled [ 0.756286] i915 0000:00:02.0: [drm] GuC SLPC: disabled [ 0.756287] i915 0000:00:02.0: [drm] HuC firmware i915/tgl_huc_7.9.3.bin version 7.9 authenticated:yes [ 0.810475] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0 [ 0.929012] fbcon: i915drmfb (fb0) is primary device [ 0.929020] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device [ 2.906263] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915]) [ 3.040978] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915]) ※ 編輯: in09 (125.228.69.206 臺灣), 03/17/2022 17:28:19
thtsao: 要不要改用arch-based distro試試至少都是新版的 03/17 17:59
Arch Linux boot 之後居然是command line, 手動安裝 ? 我等 Ubuntu 22.10 好了 ^_^
Bencrie: mesa 升 22.0.0? 03/17 19:22
※ 編輯: in09 (125.228.69.206 臺灣), 03/18/2022 12:04:34
Bencrie: es2_info | grep RENDERER 03/18 19:26
gfx12 and newer are not supported on i965 libEGL warning: DRI2: failed to create dri screen GL_RENDERER: llvmpipe (LLVM 12.0.0, 256 bits)
Bencrie: glxinfo | grep Device 03/18 19:27
gfx12 and newer are not supported on i965 libGL error: failed to create dri screen libGL error: failed to load driver: i965 Device: llvmpipe (LLVM 12.0.0, 256 bits) (0xffffffff) 非常感謝 ※ 編輯: in09 (125.228.69.206 臺灣), 03/18/2022 19:48:28
thtsao: manjaro有圖形安裝界面,另外opensuse 風滾草也都是滾動 03/18 20:31
thtsao: 更新的 03/18 20:31
opensuse 裝好了, 我用vlc播放時, 它也是有 iHD/i965 drv init fail 播放時CPU用量和Ubuntu差不多, 我猜也是軟解
brli7848: 你還是在用i965欸… 03/18 20:33
對, 我也很疑惑, i915/i965 是怎麼回事, google 出來的解釋看不懂
Bencrie: 不是,他根本沒硬體加速 ... 他在用 llvmpipe 03/19 01:18
Bencrie: 而且你說有開 ppa,但是 libva 卻還是 1.7.0 ? 03/19 02:38
Bencrie: kisak 上面是放 libva-2.14.0 03/19 02:39
Bencrie: llvm 應該是 13.0.0 03/19 02:39
你寫的我看不太懂, 努力解釋一下我目前的狀況 mpv --hwdec=auto 理論上會用硬解才對吧, 我一直都是這麼設, 之前用舊CPU時會顯示 "Using hardware decoding (vaapi)" 換 CPU 之後沒有這個, 反而多了很多 error, 所以我才來問 用 dpkg -l | grep libva 看, 我的 libva 是 2.7.0-2 kisak 是指 mesa 吧? 我裝過, 但還是軟解, 然後mpv的error還多了別的 error, 所以我就移除了
Bellkna: 裝arch滾到最新可能比較省事 03/19 07:01
Bellkna: 至於mpv開軟解也還好 再加上線上影片用硬解有時會有問題 03/19 07:02
Bellkna: 之前用mpv看多台yt常常開久會沒聲音 關了硬解就沒問題 03/19 07:03
我之前也覺得 mpv youtube 時怪怪的, 原來是硬解的問題嗎? 目前主要是在看4K影片時, CPU 用量快50% 並不是什麼大問題, 只是覺得新 GPU 沒用到很可惜 再次謝謝各位的回應 ※ 編輯: in09 (125.228.69.206 臺灣), 03/19/2022 10:37:54
Bencrie: 你的機器現在是連 OpenGL/GLES 都沒硬體加速耶 03/19 12:22
Bencrie: dpkg -l | grep libva 有列不等於有裝 03/19 12:23
Bencrie: 耶 ... 不對我在說啥 上面那句無視它 03/19 12:40
※ 編輯: in09 (125.228.69.206 臺灣), 03/20/2022 11:03:43 ※ 編輯: in09 (125.228.69.206 臺灣), 03/20/2022 11:07:00