Pagina 2 di 2
Re: Driver nvidia: sfruttare al meglio la GPU
Inviato: ven 16 giu 2017, 18:32
da joe
Codice: Seleziona tutto
NOTE:
- the binary file to download is 1,4 Gb;
- the temporary package file will need 3,5 Gb;
- the final package will be around 1 Gb (2,2 Gb when installed).
Be sure to have enough free space before building this.
Cudatoolkit è un bel malloppo di roba.
Ponce, tu hai una scheda nvidia che gira con drivers proprietari?
Comunque ora provo.
PS.
Potreste fare la prova di seguito?
Codice: Seleziona tutto
# ffmpeg -hwaccels
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.3.0 (GCC)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/doc/ffmpeg-3.2.4/html --mandir=/usr/man --disable-debug --enable-shared --disable-static --enable-gpl --enable-version3 --enable-avresample --arch=x86_64 --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-libcaca --enable-libcdio --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libmp3lame --enable-opengl --enable-libopenjpeg --enable-libpulse --enable-libsmbclient --enable-libwavpack --enable-x11grab
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Hardware acceleration methods:
vdpau
vaapi
Vedete?
Nel mio caso adesso ffmpeg non comprende altri "acceleratori harware" che vdpau e vaapi. Da quel poco che ho letto lì dovrebbe comparire anche "cudavid" se cuda è presente (non so se deve essere presente al compile di ffmpeg o anche dopo.
Re: Driver nvidia: sfruttare al meglio la GPU
Inviato: ven 16 giu 2017, 18:57
da ponce
joe ha scritto:Codice: Seleziona tutto
NOTE:
- the binary file to download is 1,4 Gb;
- the temporary package file will need 3,5 Gb;
- the final package will be around 1 Gb (2,2 Gb when installed).
Be sure to have enough free space before building this.
Cudatoolkit è un bel malloppo di roba.
lo so, l'ho scritta io quella nota
Ponce, tu hai una scheda nvidia che gira con drivers proprietari?
si, una GeForce GT 525M di un portatile ormai vecchiotto, ci uso i driver nvidia 381.22.
io ricompilo ffmpeg con questa riga di comando
Codice: Seleziona tutto
ASS=yes CELT=yes DC1394=yes AAC=yes DECKLINK=yes FDK_AAC=yes FLITE=yes FREI0R=yes GME=yes GSM=yes IEC61883=yes ILBC=yes LADSPA=yes MODPLUG=yes NETCDF=yes OPENAL=yes OPENCORE=yes OPENCV=yes OPENSSL=yes OPUS=yes RTMP=yes RUBBERBAND=yes SCHROEDINGER=yes SNAPPY=yes SPEEX=yes TESSERACT=yes TWOLAME=yes VIDSTAB=yes WEBP=yes XVID=yes X264=yes X265=yes ZVBI=yes BUILD=1ponce ./ffmpeg.SlackBuild
come scrivevo quando lo ricompilo cudatoolkit non e' installato (la compilazione avviene su una macchina virtuale).
il comando qui restituisce questo (sono su slackware64-current)
Codice: Seleziona tutto
$ ffmpeg -hwaccels
ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/doc/ffmpeg-3.3.2/html --mandir=/usr/man --disable-debug --enable-shared --disable-static --enable-gpl --enable-version3 --enable-avresample --arch=x86_64 --enable-nonfree --enable-decklink --enable-libschroedinger --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcaca --enable-libcdio --enable-libcelt --enable-libdc1394 --enable-libflite --enable-frei0r --enable-libgme --enable-libgsm --enable-libiec61883 --enable-libilbc --enable-libmodplug --enable-openal --enable-libopencv --enable-libopus --enable-librtmp --enable-libsnappy --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi --enable-libmp3lame --enable-netcdf --enable-opencl --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-opengl --enable-libopenjpeg --enable-libpulse --enable-librubberband --enable-libsmbclient --enable-openssl --enable-libtesseract --enable-libwavpack
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
Hardware acceleration methods:
vdpau
vaapi
cuvid
come vedi nella sua linea di configure non c'e' --enable-cuvid, pero' lo riconosce lo stesso.
Re: Driver nvidia: sfruttare al meglio la GPU
Inviato: ven 16 giu 2017, 19:40
da joe
Ho installato cudatoolkit.
Dopodichè ho ricompilato MPV e facendo caso al configure risulta:
Da come dici, questo non dovrebbe dipendere dal fatto che ffmpeg era già lì installato prima dei drivers proprietari, nè dovrebbe avere a che fare con la presenza/assenza di cudatoolkit.
Sto comunque facendo un tentativo di ricompilazione di ffmpeg... E vediamo se esce "cuvid" tra gli acceleratori hardware.
Se non esce a sto punto direi che è colpa della mia scheda video che non supporta quella funzionalità. Non vi pare?
Re: Driver nvidia: sfruttare al meglio la GPU
Inviato: ven 16 giu 2017, 19:42
da ponce
puo' darsi, non saprei che dirti: prova a sentire gli sviluppatori di mpv.
ci sta che sia anche dovuto al fatto che usi i driver legacy e che quelli non supportino cuda, non so se hai tempo da dedicare per indagare in tal senso...
Re: Driver nvidia: sfruttare al meglio la GPU
Inviato: sab 17 giu 2017, 14:47
da brg
Non tutte le GPU supportano CUDA. Tra quelle mobili dalla 410m in su e tra quelle da scrivania dalla 430 in su.
Re: Driver nvidia: sfruttare al meglio la GPU
Inviato: sab 17 giu 2017, 17:25
da joe
http://www.geforce.com/hardware/desktop ... ifications
https://developer.nvidia.com/cuda-legacy-gpus
Codice: Seleziona tutto
GPU Compute Capability
GeForce 210* 1.2
(*) OEM-only products
Però ieri avevo letto una pagina incui si specificava qualcoa a proposito proprio del driver legacy cui si riferiva Ponce. Ora non riesco a ritrovarla...
Può anche essere che il driver in questione non supporti la versione attuale di cuda toolkit...
Vedrò di informarmi.
Re: Driver nvidia: sfruttare al meglio la GPU
Inviato: mer 2 ago 2017, 17:31
da Trotto@81
Ho cambiato la mia vecchia GPU con una NVIDIA 1050, ma nel file di configurazione che ottengo con i pacchetti di SBo mi ritrovo la sezione "Outputclass" che mi impedisce di aggiungere una "Option" per abilitare il triplebuffer ed eliminare il tearing. Ho commentato tutto e aggiunto la sezione "Device" per evitare di creare conflitti fra le due. Secondo voi ho fatto una fesseria? Avrei potuto far convivere in qualche modo le due sezioni?
Codice: Seleziona tutto
#Section "OutputClass"
# Identifier "nvidia"
# MatchDriver "nvidia-drm"
# Driver "nvidia"
#EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "Nvidia Corporation"
BoardName ""
Option "TripleBuffer" "True"
EndSection
Re: Driver nvidia: sfruttare al meglio la GPU
Inviato: mer 2 ago 2017, 19:17
da ponce
io faccio cosi': lo SlackBuild mi crea questo file
Codice: Seleziona tutto
$ cat /usr/share/X11/xorg.conf.d/10-nvidia.conf
# This xorg.conf.d configuration snippet configures the X server to
# automatically load the nvidia X driver when it detects a device driven by the
# nvidia-drm.ko kernel module. Please note that this only works on Linux kernels
# version 3.9 or higher with CONFIG_DRM enabled, and only if the nvidia-drm.ko
# kernel module is loaded before the X server is started.
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
EndSection
io poi ne creo un altro (metto il mio solo ad esempio) dove metto in aggiunta tutte le mie cose, che rimane li' dov'e' e non viene sovrascritto quando aggiorno il driver nvidia da pacchetto
Codice: Seleziona tutto
$ cat /etc/X11/xorg.conf.d/10-nvidia.conf
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection
Section "Files"
FontPath "/usr/share/fonts/misc/:unscaled"
FontPath "/usr/share/fonts/100dpi/:unscaled"
FontPath "/usr/share/fonts/75dpi/:unscaled"
FontPath "/usr/share/fonts/misc/"
FontPath "/usr/share/fonts/Type1/"
FontPath "/usr/share/fonts/Speedo/"
FontPath "/usr/share/fonts/100dpi/"
FontPath "/usr/share/fonts/75dpi/"
FontPath "/usr/share/fonts/cyrillic/"
FontPath "/usr/share/fonts/TTF/"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0"
VendorName "Unknown"
ModelName "LGD LP156WH2-TLAA"
HorizSync 30.0 - 75.0
VertRefresh 60.0
Option "DPMS"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor1"
VendorName "Unknown"
ModelName "SONY TV"
HorizSync 14.0 - 70.0
VertRefresh 48.0 - 62.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GT 525M"
BusID "PCI:1:0:0"
Option "NoLogo" "true"
Option "CoolBits" "1"
Option "DigitalVibrance" "20"
Screen 0
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GT 525M"
BusID "PCI:1:0:0"
Option "NoLogo" "true"
Option "CoolBits" "1"
Option "DigitalVibrance" "20"
Screen 1
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
# DefaultDepth 16
Option "TwinView" "0"
Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
SubSection "Display"
Depth 16
EndSubSection
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
Option "TwinView" "0"
Option "metamodes" "DFP-1: nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Re: Driver nvidia: sfruttare al meglio la GPU
Inviato: mer 2 ago 2017, 19:19
da rik70
Trotto@81 ha scritto:Avrei potuto far convivere in qualche modo le due sezioni?
Prova in "Device" a omettere/commentare la parte
Se il driver "lo prende" da quanto specificato in "Ouputclass", l'opzione "TripleBuffer" dovrebbe prenderla dalla sezione "Device".
Insomma, una cosa del genere:
Codice: Seleziona tutto
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
EndSection
Section "Device"
Identifier "Device0"
# Driver "nvidia"
VendorName "Nvidia Corporation"
BoardName ""
Option "TripleBuffer" "True"
EndSection
Poi butta un occhio nel di Xorg e vedi che dice.
P.s.
Noto che usi "Device0" come "Identifier". Immagino che da qualche parte hai anche una sezione "Screen".
Diversamente, metti "card0".
Re: Driver nvidia: sfruttare al meglio la GPU
Inviato: mer 2 ago 2017, 20:38
da Trotto@81
Ho usato entrambi i vostri suggerimenti, grazie.
