Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

execution of ffmpeg is taking more time in gentoo than other

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
32 posts
  • 1
  • 2
  • Next
Author
Message
rupeshforu3
n00b
n00b
Posts: 73
Joined: Mon Aug 19, 2024 11:02 am

execution of ffmpeg is taking more time in gentoo than other

  • Quote

Post by rupeshforu3 » Thu Oct 24, 2024 2:57 pm

Hi I am Rupesh from India and I brought a new PC with AMD Ryzen zen3 5500GT and Asus prime 450 MK2 motherboard. I installed four Linux Operating Systems including gentoo linux and one Windows 11 Operating System. I installed ffmpeg tool along with libaom. Everything is working fine except there is something wrong with ffmpeg execution in Gentoo Linux.

I love working with Linux and Unix Operating Systems and I have lot of disk space and so I have installed four Linux Operating Systems and they are

1) Debian Linux testing Trixie
2) Fedora 40
3) Arch Linux
4) Gentoo Linux with systemd and desktop stage 3

At first I have installed Zen kernel through genkernel utility passing the parameter all.

After installation I have compiled the same ffmpeg source code which is cloned from git and with the same options which includes the following

--enable opencl
--enable opengl
--enable libaom
--enable AMF
--enable gnutils
Etc.,

I have some h264 mp4 files and I want to convert them into aom codec through ffmpeg and libaom.

I tested to convert those same files into aom codec using the same ffmpeg script but ffmpeg in gentoo Linux is taking too much time compared to ffmpeg in remaining Linux Operating Systems.

During the compilation of ffmpeg in gentoo linux I have installed packages related to amdgpu and rocm but unfortunately rocm-opencl-headers failed in installation.

After that I installed clinfo and ran it and it is showing message as Full profile, platform AMD etc.,.

Ffmpeg in other distributions is taking 45 minutes to convert 110 MB h264 mp4 to aom codec mp4 but unfortunately ffmpeg in Gentoo Linux is taking more than 100 minutes.

I can't understand what's wrong with ffmpeg in Gentoo Linux.

Even I have installed amdgpu_top_gui and opened it and it is showing a lot of information about my APU.

If I have not installed anything which is required for ffmpeg to run properly it must fall in compilation but it compiled successfully but it is not working fine.

Kindly try to suggest how to make ffmpeg to work properly and I am ready to provide any diagnostic information of the commands provided by you.

Regards,
Rupesh.
Regards,
Rupesh.
Top
stefantalpalaru
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Sun Jan 11, 2009 10:35 pm
Location: Italy
Contact:
Contact stefantalpalaru
Website

  • Quote

Post by stefantalpalaru » Thu Oct 24, 2024 5:16 pm

Make sure you have this set up: https://wiki.gentoo.org/wiki/CPU_FLAGS_*

Since you manually built ffmpeg from source, instead of using an ebuild, I'm going to assume you're a beginner and tell you to also make sure you have sane CFLAGS and CXXFLAGS (like "-O3 -march=native").
Top
molletts
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 137
Joined: Sat Feb 16, 2013 12:08 pm

  • Quote

Post by molletts » Thu Oct 24, 2024 6:09 pm

Hi Rupesh,

From the magnitude of the difference, I doubt it's related to compiler flags unless you've built the system with "-O0"!

What CPU frequency governor are you using on Gentoo?

To check, use:

Code: Select all

# cpupower -c all frequency-info
(If you get "command not found", you will need to install cpupower with 'emerge sys-power/cpupower'.) This will return a lot of information about your CPU clock frequency, including its current value, which driver is controlling it, which frequency governors are available and which one is in use.

I suspect you may be using the "powersave" governor, which locks the CPU at its slowest speed.

If so, you will need to switch to a different one. If "schedutil" is available, that generally works quite well:

Code: Select all

# cpupower -c all frequency-set -g schedutil
As it's a Zen system, however, there is an AMD-specific cpufreq driver available; I don't know whether this may take over the function of the governor too as the intel_pstate driver does. I don't have access to modern AMD hardware to test it so someone else may have to advise you on how to configure it if this is in use.

Let us know what you find.

Hope this helps,
Stephen
Top
rupeshforu3
n00b
n00b
Posts: 73
Joined: Mon Aug 19, 2024 11:02 am

  • Quote

Post by rupeshforu3 » Fri Oct 25, 2024 11:07 am

Hi I am providing the outputs of the commands specified by you below

Code: Select all

build@localhost ~ $ sudo cpupower -c all frequency-info
Password: 
analyzing CPU 0:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.46 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 4.46 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 4.44 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  1700MHz
    Pstate-P2:  1400MHz
analyzing CPU 1:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.46 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 4.46 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 4.44 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  1700MHz
    Pstate-P2:  1400MHz
analyzing CPU 2:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 2
  CPUs which need to have their frequency coordinated by software: 2
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.46 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 4.46 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 4.44 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  1700MHz
    Pstate-P2:  1400MHz
analyzing CPU 3:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 3
  CPUs which need to have their frequency coordinated by software: 3
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.46 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 4.46 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 4.44 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  1700MHz
    Pstate-P2:  1400MHz
analyzing CPU 4:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 4
  CPUs which need to have their frequency coordinated by software: 4
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.46 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 4.46 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 4.43 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  1700MHz
    Pstate-P2:  1400MHz
analyzing CPU 5:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 5
  CPUs which need to have their frequency coordinated by software: 5
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.46 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 4.46 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 4.44 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  1700MHz
    Pstate-P2:  1400MHz
analyzing CPU 6:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 6
  CPUs which need to have their frequency coordinated by software: 6
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.46 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 4.46 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 4.44 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  1700MHz
    Pstate-P2:  1400MHz
analyzing CPU 7:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 7
  CPUs which need to have their frequency coordinated by software: 7
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.46 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 4.46 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 4.44 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  1700MHz
    Pstate-P2:  1400MHz
analyzing CPU 8:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 8
  CPUs which need to have their frequency coordinated by software: 8
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.46 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 4.46 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 4.44 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  1700MHz
    Pstate-P2:  1400MHz
analyzing CPU 9:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 9
  CPUs which need to have their frequency coordinated by software: 9
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.46 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 4.46 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 4.44 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  1700MHz
    Pstate-P2:  1400MHz
analyzing CPU 10:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 10
  CPUs which need to have their frequency coordinated by software: 10
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.46 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 4.46 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 4.44 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  1700MHz
    Pstate-P2:  1400MHz
analyzing CPU 11:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 11
  CPUs which need to have their frequency coordinated by software: 11
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.46 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 4.46 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 4.44 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  1700MHz
    Pstate-P2:  1400MHz

Code: Select all

build@localhost ~ $ sudo cpupower -c all frequency-set -g schedutil
Setting cpu: 0
Error setting new values. Common errors:
- Do you have proper administration rights? (super-user?)
- Is the governor you requested available and modprobed?
- Trying to set an invalid policy?
- Trying to set a specific frequency, but userspace governor is not available,
   for example because of hardware which cannot be set to a specific frequency
   or because the userspace governor isn't loaded?
build@localhost ~ $ 
Regards,
Rupesh.
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2404
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Fri Oct 25, 2024 11:21 am

molletts wrote:...
From the magnitude of the difference, I doubt it's related to compiler flags unless you've built the system with "-O0"!
...
ffmpeg is particularly sensitive to cpu flags, as there are lots of hardware instructions tailored for the sort of vector processing involved (SSE4.2, and host of other flags).
It's almost certainly worth (a) getting good CFLAGS suitable for the hardware and use-case (a whole discussion in itself, visible all over the forums), and (b) using the output of cpuid2cpuflags to tailor make.conf, as ffmpeg is dependent on them too.
Greybeard
Top
Ralphred
l33t
l33t
Posts: 822
Joined: Tue Dec 31, 2013 11:52 am

  • Quote

Post by Ralphred » Fri Oct 25, 2024 12:40 pm

molletts wrote:As it's a Zen system, however, there is an AMD-specific cpufreq driver available; I don't know whether this may take over the function of the governor too as the intel_pstate driver does. I don't have access to modern AMD hardware to test it so someone else may have to advise you on how to configure it if this is in use.
For zen3 and later, when using the amd p-state driver you'll get the best results using the powersave governor.
It's worth enabling perfcore on the kernel command line too<< I don't know how many of the p-state features were backported to the 6.6 series of kernels, so I stick to >=6.9.1.
Do not enable any bios overclock of the CPU it gimps the drivers boost function, it will dynamically overclock each core to it's individual capabilities itself. The time boost frequencies can be applied is related to individual core temperature, so a well (thermally) connected cooler that can quickly remove thermal gradients becomes a performance factor (read: don't use the stock cooler for best results).
Top
rupeshforu3
n00b
n00b
Posts: 73
Joined: Mon Aug 19, 2024 11:02 am

  • Quote

Post by rupeshforu3 » Fri Oct 25, 2024 1:38 pm

Hi I am providing the contents of /etc/portage/make.conf below

Code: Select all

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.

CHOST="x86_64-pc-linux-gnu"

COMMON_FLAGS="-march=znver3 -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

MAKEOPTS="--jobs 10 --load-average 9"

VIDEO_CARDS="amdgpu radeonsi"
LICENSE_ACCEPT="*"

# NOTE: This stage was built with the bindist USE flag enabled

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C.utf8

GENTOO_MIRRORS="https://mirrors.nxtgen.com/gentoo-mirror/gentoo-source/ \
    http://mirrors.nxtgen.com/gentoo-mirror/gentoo-source/ \
    rsync://ftp.iij.ad.jp/pub/linux/gentoo/ \
    http://ftp.iij.ad.jp/pub/linux/gentoo/"


USE="X systemd elogind udev extras classic upower gtk qt contrib vaapi"
Upto now I have not used cpuid2cpuflags but now I installed it and I am providing its output below

Code: Select all

build@localhost ~ $ cpuid2cpuflags
CPU_FLAGS_X86: aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 vpclmulqdq
build@localhost ~ $ 
For your reference I am providing the output of commands entered in Fedora 40 below so that you may find the reason. Ffmpeg is working properly in this Linux.

Code: Select all

work@fedora:~$ sudo cpupower -c all frequency-info
analyzing CPU 0:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 3.60 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 3.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.57 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: no
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz.
    AMD PSTATE Nominal Performance: 134. Nominal Frequency: 3.60 GHz.
    AMD PSTATE Lowest Non-linear Performance: 88. Lowest Non-linear Frequency: 2.36 GHz.
    AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.
analyzing CPU 1:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 3.60 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 3.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.57 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: no
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz.
    AMD PSTATE Nominal Performance: 134. Nominal Frequency: 3.60 GHz.
    AMD PSTATE Lowest Non-linear Performance: 88. Lowest Non-linear Frequency: 2.36 GHz.
    AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.
analyzing CPU 2:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 2
  CPUs which need to have their frequency coordinated by software: 2
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 3.60 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 3.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.57 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: no
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz.
    AMD PSTATE Nominal Performance: 134. Nominal Frequency: 3.60 GHz.
    AMD PSTATE Lowest Non-linear Performance: 88. Lowest Non-linear Frequency: 2.36 GHz.
    AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.
analyzing CPU 3:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 3
  CPUs which need to have their frequency coordinated by software: 3
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 3.60 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 3.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.57 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: no
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz.
    AMD PSTATE Nominal Performance: 134. Nominal Frequency: 3.60 GHz.
    AMD PSTATE Lowest Non-linear Performance: 88. Lowest Non-linear Frequency: 2.36 GHz.
    AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.
analyzing CPU 4:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 4
  CPUs which need to have their frequency coordinated by software: 4
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 3.60 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 3.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.56 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: no
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz.
    AMD PSTATE Nominal Performance: 134. Nominal Frequency: 3.60 GHz.
    AMD PSTATE Lowest Non-linear Performance: 88. Lowest Non-linear Frequency: 2.36 GHz.
    AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.
analyzing CPU 5:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 5
  CPUs which need to have their frequency coordinated by software: 5
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 3.60 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 3.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.57 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: no
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz.
    AMD PSTATE Nominal Performance: 134. Nominal Frequency: 3.60 GHz.
    AMD PSTATE Lowest Non-linear Performance: 88. Lowest Non-linear Frequency: 2.36 GHz.
    AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.
analyzing CPU 6:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 6
  CPUs which need to have their frequency coordinated by software: 6
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 3.60 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 3.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.57 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: no
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz.
    AMD PSTATE Nominal Performance: 134. Nominal Frequency: 3.60 GHz.
    AMD PSTATE Lowest Non-linear Performance: 88. Lowest Non-linear Frequency: 2.36 GHz.
    AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.
analyzing CPU 7:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 7
  CPUs which need to have their frequency coordinated by software: 7
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 3.60 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 3.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.57 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: no
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz.
    AMD PSTATE Nominal Performance: 134. Nominal Frequency: 3.60 GHz.
    AMD PSTATE Lowest Non-linear Performance: 88. Lowest Non-linear Frequency: 2.36 GHz.
    AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.
analyzing CPU 8:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 8
  CPUs which need to have their frequency coordinated by software: 8
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 3.60 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 3.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.57 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: no
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz.
    AMD PSTATE Nominal Performance: 134. Nominal Frequency: 3.60 GHz.
    AMD PSTATE Lowest Non-linear Performance: 88. Lowest Non-linear Frequency: 2.36 GHz.
    AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.
analyzing CPU 9:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 9
  CPUs which need to have their frequency coordinated by software: 9
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 3.60 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 3.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.57 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: no
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz.
    AMD PSTATE Nominal Performance: 134. Nominal Frequency: 3.60 GHz.
    AMD PSTATE Lowest Non-linear Performance: 88. Lowest Non-linear Frequency: 2.36 GHz.
    AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.
analyzing CPU 10:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 10
  CPUs which need to have their frequency coordinated by software: 10
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 3.60 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 3.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.57 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: no
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz.
    AMD PSTATE Nominal Performance: 134. Nominal Frequency: 3.60 GHz.
    AMD PSTATE Lowest Non-linear Performance: 88. Lowest Non-linear Frequency: 2.36 GHz.
    AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.
analyzing CPU 11:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 11
  CPUs which need to have their frequency coordinated by software: 11
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 3.60 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 3.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.57 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: no
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz.
    AMD PSTATE Nominal Performance: 134. Nominal Frequency: 3.60 GHz.
    AMD PSTATE Lowest Non-linear Performance: 88. Lowest Non-linear Frequency: 2.36 GHz.
    AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.
work@fedora:~$ 

Code: Select all

work@fedora:~$ sudo cpupower -c all frequency-set -g schedutil
Setting cpu: 0
Error setting new values. Common errors:
- Do you have proper administration rights? (super-user?)
- Is the governor you requested available and modprobed?
- Trying to set an invalid policy?
- Trying to set a specific frequency, but userspace governor is not available,
   for example because of hardware which cannot be set to a specific frequency
   or because the userspace governor isn't loaded?
work@fedora:~$ 
Kindly try to suggest how to make ffmpeg properly work in Gentoo.
Regards,
Rupesh.
Top
pietinger
Administrator
Administrator
Posts: 6639
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Fri Oct 25, 2024 2:45 pm

rupeshforu3 wrote:Kindly try to suggest how to make ffmpeg properly work in Gentoo.
If an application in your Gentoo Linux has performance problems, this can have two possible causes: The application itself has been “badly” compiled, or your Linux system / kernel is “unfavorably” configured. For example, you have a setting that is impossible (because the two use flags are mutually exclusive = you can only activate one of them):

Code: Select all

USE="... systemd elogind ..."
We need a lot more information to be able to check your configuration comprehensively:

1. Give us all 3 files mentioned here:
https://wiki.gentoo.org/wiki/User:Pieti ... nformation
(note the reference to wgetpaste for your "dmesg"-output)

2. If you have configured the kernel yourself manually, we need its .config (also with wgetpaste)

3. The output of (also with wgetpaste):

Code: Select all

# grep -r --exclude-dir=savedconfig "" /etc/portage
https://wiki.gentoo.org/wiki/User:Pietinger --> New at Gentoo
Top
sam_
Developer
Developer
User avatar
Posts: 2817
Joined: Fri Aug 14, 2020 12:33 am

  • Quote

Post by sam_ » Fri Oct 25, 2024 2:50 pm

To elaborate on what others have said, this essentially can't be Gentoo "specific" other than kernel configuration if you're building manually from source and not using the ebuilds.
Top
stefantalpalaru
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Sun Jan 11, 2009 10:35 pm
Location: Italy
Contact:
Contact stefantalpalaru
Website

  • Quote

Post by stefantalpalaru » Fri Oct 25, 2024 2:51 pm

Ralphred wrote:For zen3 and later, when using the amd p-state driver you'll get the best results using the powersave governor.
You are, obviously, wrong. The best governor for performance is... "performance". Maybe you are confusing "powersave" with "schedutil". Anyway, we have benchmarks:

https://www.phoronix.com/review/amd-linux511-perfgov

https://www.phoronix.com/review/linux59 ... -cpufreq/5
Top
Ralphred
l33t
l33t
Posts: 822
Joined: Tue Dec 31, 2013 11:52 am

  • Quote

Post by Ralphred » Fri Oct 25, 2024 3:08 pm

stefantalpalaru wrote:You are, obviously, wrong.
You obviously haven't read the kernel docs on the amd p-state driver.
stefantalpalaru wrote:Linking articles about kernels before the driver was implemented
Yes, excellent.
Top
stefantalpalaru
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Sun Jan 11, 2009 10:35 pm
Location: Italy
Contact:
Contact stefantalpalaru
Website

  • Quote

Post by stefantalpalaru » Fri Oct 25, 2024 3:32 pm

Ralphred wrote:Do not enable any bios overclock of the CPU it gimps the drivers boost function, it will dynamically overclock each core to it's individual capabilities itself.
You need to stop trolling that poor guy who doesn't understand USE flags yet. This is not 4chan.
Top
rupeshforu3
n00b
n00b
Posts: 73
Joined: Mon Aug 19, 2024 11:02 am

  • Quote

Post by rupeshforu3 » Fri Oct 25, 2024 3:45 pm

I haven't compiled kernel source code manually.

After extraction of stage 3 tarball I installed kernel sources bin package and installed other packages like iwd, dhcpcd etc ,.

After that I booted successfully into my system and in non root account

1) I installed Zen kernel package and genkernel utility.
2) I made a symbolic link as linux-->zen sources under /usr/src directory.
3) I issued the command sudo genkernel all
4) Finally the above utility compiled and installed Zen kernel 6.10
But at that time it shown error as something went wrong but I neglected.
Regards,
Rupesh.
Top
rupeshforu3
n00b
n00b
Posts: 73
Joined: Mon Aug 19, 2024 11:02 am

  • Quote

Post by rupeshforu3 » Fri Oct 25, 2024 3:55 pm

output of commands through wgetpaste

build@localhost ~ $ wgetpaste --command 'emerge --info'
Your paste can be seen here: https://bpa.st/LJPA
build@localhost ~ $ wgetpaste --command 'dmesg'
Your paste can be seen here: https://bpa.st/2BRA
build@localhost ~ $ wgetpaste --command 'lspci -nnk'
Your paste can be seen here: https://bpa.st/LF7A
build@localhost ~ $
Regards,
Rupesh.
Top
stefantalpalaru
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Sun Jan 11, 2009 10:35 pm
Location: Italy
Contact:
Contact stefantalpalaru
Website

  • Quote

Post by stefantalpalaru » Fri Oct 25, 2024 4:01 pm

rupeshforu3 wrote:Kindly try to suggest how to make ffmpeg properly work in Gentoo.
Add the output of "cpuid2cpuflags" to "/etc/portage/make.conf", then rebuild all affected packages with "emerge -uDUav @world".
Top
rupeshforu3
n00b
n00b
Posts: 73
Joined: Mon Aug 19, 2024 11:02 am

  • Quote

Post by rupeshforu3 » Fri Oct 25, 2024 4:36 pm

Is there any need to install gentoo linux from the beginning and if so please give correct use flags.

I want to install all the available desktop environments and so how to add use flags which will not conflict in future.
Regards,
Rupesh.
Top
stefantalpalaru
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Sun Jan 11, 2009 10:35 pm
Location: Italy
Contact:
Contact stefantalpalaru
Website

  • Quote

Post by stefantalpalaru » Fri Oct 25, 2024 4:44 pm

rupeshforu3 wrote:Is there any need to install gentoo linux from the beginning
No. Only a need to carefully read the available documentation. Gentoo Linux is an advanced distribution, better suited for advanced users who pay attention to details.

You can't just copy-paste some commands and call it a day. You need to understand all the intricate details of what makes it tick, in order to have full control over it. This is why Gentoo is your last Linux distro, not your first.
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2404
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Fri Oct 25, 2024 6:08 pm

stefantalpalaru wrote:Add the output of "cpuid2cpuflags" to "/etc/portage/make.conf", then rebuild all affected packages with "emerge -uDUav @world".
Yes, that's what I meant to say when I mentioned cpuid2cpuflags some way ago. Actually, for this particular issue, just rebuilding ffmpeg will suffice:

Code: Select all

emerge -1 ffmpeg
(Specifically, the ffmpeg build is sensitive to avx2, fma3/4, xop, avz, sse2/3/4_1/4_2, mmext, 3dnow/ext on x86 archictures. Without those specified in CPU_FLAGS_X86 in make.conf, ffmpeg will be severely limited.)
Greybeard
Top
pietinger
Administrator
Administrator
Posts: 6639
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Fri Oct 25, 2024 6:13 pm

rupeshforu3,

I asked for

Code: Select all

# grep -r --exclude-dir=savedconfig "" /etc/portage
and it is really important, because exactly there is a problem:

Code: Select all

--- Invalid atom in /etc/portage/package.use/00cpu-flags: aes
We need to set this portage information correctly and then recompile ffmpeg. See also:
https://wiki.gentoo.org/wiki/Handbook:A ... _FLAGS_.2A
If not already done, do at first:

Code: Select all

# emerge -1 cpuid2cpuflags
# cpuid2cpuflags
and compare this with your file /etc/portage/package.use/00cpu-flags
Later you have to re-emerge ffmpeg .

Moderator note: I do not tolerate jokes in a pure support thread. Help purposefully or keep your fingers still.
https://wiki.gentoo.org/wiki/User:Pietinger --> New at Gentoo
Top
stefantalpalaru
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Sun Jan 11, 2009 10:35 pm
Location: Italy
Contact:
Contact stefantalpalaru
Website

  • Quote

Post by stefantalpalaru » Fri Oct 25, 2024 6:16 pm

Goverp wrote:Actually, for this particular issue, just rebuilding ffmpeg will suffice
He uses libaom, for which ffmpeg acts like a simple wrapper, so he needs to rebuild libaom with those CPU-specific USE flags in order to get some serious SIMD speed-ups during AV1 encoding.

Much easier for a beginner to just rebuild everything affected by new USE flags, instead of having to understand all that.
Top
Ralphred
l33t
l33t
Posts: 822
Joined: Tue Dec 31, 2013 11:52 am

  • Quote

Post by Ralphred » Fri Oct 25, 2024 9:12 pm

pietinger wrote:and it is really important, because exactly there is a problem:

Code: Select all

--- Invalid atom in /etc/portage/package.use/00cpu-flags: aes
Indeed, the */* is missing; re-run the command from the handbook

Code: Select all

echo "*/* $(cpuid2cpuflags)" > /etc/portage/package.use/00cpu-flags
then

Code: Select all

emerge -uDNav world
rupeshforu3 wrote:I want to install all the available desktop environments and so how to add use flags which will not conflict in future.
Seeing as you seem to have enough going on with new kernels and rebuilding with CPU_FLAGS set, I did the legwork on this, but will tag where everything comes from. Default use flags are set by your profile, from your first post
4) Gentoo Linux with systemd and desktop stage 3
To add use flags for both gnome and plasma the easiest way is to look through the profiles for default/linux/amd64/23.0/desktop/gnome/systemd and default/linux/amd64/23.0/desktop/plasma/systemd and make all these "default changes" yourself so any conflicts are manageable.
For gnome this looks like

Code: Select all

#from /var/db/repos/gentoo/profiles/targets/desktop/gnome/make.defaults
*/* colord eds evo gnome gnome-keyring gnome-online-accounts gnome-shell gstreamer introspection keyring nautilus networkmanager pulseaudio sysprof tracker

#from /var/db/repos/gentoo/profiles/targets/desktop/gnome/package.use
net-misc/spice-gtk vala
dev-libs/libical vala
dev-libs/libgdata vala
app-emulation/fuse -pulseaudio
dev-libs/efl sound
media-libs/gegl raw
app-crypt/gcr vala
>=gnome-extra/evolution-data-server-3.8 vala
>=media-libs/gst-plugins-base-1.0 theora
dev-lang/python sqlite
app-accessibility/speech-dispatcher python
media-libs/grilo playlist
media-libs/libmediaart gtk -qt5
net-misc/spice-gtk gtk3

#from /var/db/repos/gentoo/profiles/targets/desktop/gnome/systemd/package.use
gnome-base/gnome-extra-apps share
www-servers/apache apache2_modules_dav apache2_modules_dav_fs apache2_modules_authn_file apache2_modules_auth_digest apache2_modules_authz_groupfile
for KDE/plasma

Code: Select all

#from /var/db/repos/gentoo/profiles/targets/desktop/plasma/make.defaults
*/* activities declarative dri kde kwallet networkmanager pipewire plasma policykit pulseaudio screencast semantic-desktop widgets

#from /var/db/repos/gentoo/profiles/targets/desktop/plasma/package.use
app-emulation/fuse -pulseaudio
dev-libs/libjcat gpg pkcs7
dev-python/PyQt6 webchannel
dev-python/pyside6 webchannel
dev-util/ostree curl
dev-qt/qtscript:5 scripttools
dev-qt/qtbase:6 mysql
kde-apps/yakuake absolute-position
media-libs/gd fontconfig
media-libs/mlt ffmpeg frei0r rubberband
media-libs/opencv contrib contribdnn
net-firewall/nftables json python xtables
sys-libs/zlib minizip
kde-apps/kio-extras phonon
kde-apps/marble phonon
kde-plasma/kwin lock
media-video/pipewire sound-server

#from /var/db/repos/gentoo/profiles/targets/desktop/plasma/use.force
*/* policykit
If at some stage you decide you like having "all the desktop environments around" I'd suggest you set the default/linux/amd64/23.0/desktop/plasma/systemd profile (because of the use.force), symlink the /var/db/repos/gentoo/profiles/targets/desktop/gnome/{systemd/}package.use files to /etc/portage/package.use, and stick the contents of the gnome/make.defaults in your make.conf, apart from the gnome/make.defaults your settings will keep up with profile changes that way. If you do get conflicts portage will flag them and the forum users here will help translate portage's output to "human readable" for you if needed.

A note about ffmpeg: An ebuild for the git version of ffmpeg is in the portage tree (as media-video/ffmpeg-9999), I appreciate you might not be using the same git repo, but I strongly suggest you install it so portage (or you) has a chance to pull in all the deps with the correct use flags set. It's also behind a ** keyword and package.mask, so it'll be a nice learning exercise.
stefantalpalaru wrote:He uses libaom
~20000 packages in the portage tree, only ~200 support specific cpu_flags_x86_ use flags, Rupesh has >=2 of them on a fresh system, can't help but feel a little sorry for the guy...
Top
rupeshforu3
n00b
n00b
Posts: 73
Joined: Mon Aug 19, 2024 11:02 am

  • Quote

Post by rupeshforu3 » Sat Oct 26, 2024 1:14 am

When I issue the following command I am getting error as permission denied.


echo "*/* $(cpuid2cpuflags)" > /etc/portage/package.use/00cpu-flags
Regards,
Rupesh.
Top
Ralphred
l33t
l33t
Posts: 822
Joined: Tue Dec 31, 2013 11:52 am

  • Quote

Post by Ralphred » Sat Oct 26, 2024 1:38 am

You need to be root to work on portages system files*, if you've set-up sudo, use

Code: Select all

echo "*/* $(cpuid2cpuflags)"|sudo tee /etc/portage/package.use/00cpu-flags
, if not just use su in a terminal beforehand and enter the root password, then the command will run.

*If you are letting normal users run portage then chowning /etc/portage to :portage with g+w perms can make sense, but that's for another thread.
Top
rupeshforu3
n00b
n00b
Posts: 73
Joined: Mon Aug 19, 2024 11:02 am

  • Quote

Post by rupeshforu3 » Sun Oct 27, 2024 5:16 am

Package media-video/ffmpeg-9999 not found.

I think it is in eapi 8.

At present I am not using eapi 8 and so can you suggest how to use eapi 8.
Regards,
Rupesh.
Top
Banana
Administrator
Administrator
User avatar
Posts: 2397
Joined: Fri May 21, 2004 12:02 pm
Location: Germany
Contact:
Contact Banana
Website

  • Quote

Post by Banana » Sun Oct 27, 2024 8:09 am

rupeshforu3 wrote:Package media-video/ffmpeg-9999 not found.

I think it is in eapi 8.

At present I am not using eapi 8 and so can you suggest how to use eapi 8.
this does not make sense (as far as I followed the thread here). ffmpeg does alredy use eapi8 in all its available packages: https://packages.gentoo.org/packages/media-video/ffmpeg
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Top
Post Reply

32 posts
  • 1
  • 2
  • Next

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic