public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Playing video and CPU usage
@ 2019-01-12  5:00 Dale
  2019-01-12  6:21 ` Andrew Udvare
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Dale @ 2019-01-12  5:00 UTC (permalink / raw
  To: gentoo-user

Howdy,

As some know, I recently bought a video card.  While not the most modern
thing, it is a lot faster than my old one.  I have a question tho.  When
I'm watching TV and playing a video with Smplayer, high resolution or a
medium resolution, it seems to use a good bit of CPU power.  I notice in
gkrellm, htop etc that it is using about 20 to sometimes 40 or 50% of
CPU power.  Yes, I still have the 8 core CPU in here.  In Smplayer, I
have video driver set to "gl(fast)" but have tried other settings as
well.  Obviously, some just plain don't work at all.  It causes Smplayer
to crash.  I did some googling, I think this is the best driver setting
for my card.  It is nvidia based.  Question, how do I know it is using
the video card to process as much of the video as it is supposed to be
doing?  Is there some command I'm not aware of to test this?  Here is
some hardware info. 


root@fireball / # lspci -k
01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX
650] (rev a1)
        Subsystem: Micro-Star International Co., Ltd. [MSI] GK107
[GeForce GTX 650]
        Kernel driver in use: nvidia
        Kernel modules: nvidia_drm, nvidia



root@fireball / # glxinfo
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4



This is what I get with glxgears at full screen.  Note, video is playing
on the TV as well, just not on current screen. 


root@fireball / # glxgears
311 frames in 5.0 seconds = 62.133 FPS
306 frames in 5.0 seconds = 61.123 FPS
311 frames in 5.0 seconds = 62.154 FPS
312 frames in 5.0 seconds = 62.217 FPS
309 frames in 5.0 seconds = 61.619 FPS
307 frames in 5.0 seconds = 61.265 FPS
315 frames in 5.0 seconds = 62.936 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 13277 requests (13277 known processed) with 0 events remaining.
root@fireball / #


Thanks.

Dale

:-)  :-) 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Playing video and CPU usage
  2019-01-12  5:00 [gentoo-user] Playing video and CPU usage Dale
@ 2019-01-12  6:21 ` Andrew Udvare
  2019-01-12  6:39   ` Dale
  2019-01-12  7:12   ` Dale
  2019-01-12  6:23 ` Davyd McColl
  2019-01-12 12:49 ` [gentoo-user] " Nikos Chantziaras
  2 siblings, 2 replies; 11+ messages in thread
From: Andrew Udvare @ 2019-01-12  6:21 UTC (permalink / raw
  To: gentoo-user


> On 2019-01-12, at 00:00, Dale <rdalek1967@gmail.com> wrote:
> 
> Howdy,
> 
> As some know, I recently bought a video card.  While not the most modern
> thing, it is a lot faster than my old one.  I have a question tho.  When
> I'm watching TV and playing a video with Smplayer, high resolution or a
> medium resolution, it seems to use a good bit of CPU power.  I notice in
> gkrellm, htop etc that it is using about 20 to sometimes 40 or 50% of
> CPU power.  Yes, I still have the 8 core CPU in here.  In Smplayer, I
> have video driver set to "gl(fast)" but have tried other settings as
> well.  Obviously, some just plain don't work at all.  It causes Smplayer
> to crash.  I did some googling, I think this is the best driver setting
> for my card.  It is nvidia based.  

It's not the best setting. You should avoid SMPlayer (IMHO from my experience at this point) and switch to mpv or VLC. You want to enable hardware decoding with VDPAU with any player. That card can decode H.264 fully and partially can decode MPEG-1/2/VC-1. You will see very little CPU usage with VDPAU enabled. The downside is the inability to use software-based filters in real-time, but there is a built-in hardware deinterlacer that significantly beats filters like Yadif.

-- 
Andrew Udvare

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Playing video and CPU usage
  2019-01-12  5:00 [gentoo-user] Playing video and CPU usage Dale
  2019-01-12  6:21 ` Andrew Udvare
@ 2019-01-12  6:23 ` Davyd McColl
  2019-01-12  6:45   ` Dale
  2019-01-12 12:49 ` [gentoo-user] " Nikos Chantziaras
  2 siblings, 1 reply; 11+ messages in thread
From: Davyd McColl @ 2019-01-12  6:23 UTC (permalink / raw
  To: gentoo-user



On January 12, 2019 7:00:19 AM Dale <rdalek1967@gmail.com> wrote:

> Howdy,
>
> As some know, I recently bought a video card.  While not the most modern
> thing, it is a lot faster than my old one.  I have a question tho.  When
> I'm watching TV and playing a video with Smplayer, high resolution or a
> medium resolution, it seems to use a good bit of CPU power.  I notice in
> gkrellm, htop etc that it is using about 20 to sometimes 40 or 50% of
> CPU power.  Yes, I still have the 8 core CPU in here.  In Smplayer, I
> have video driver set to "gl(fast)" but have tried other settings as
> well.  Obviously, some just plain don't work at all.  It causes Smplayer
> to crash.  I did some googling, I think this is the best driver setting
> for my card.  It is nvidia based.  Question, how do I know it is using
> the video card to process as much of the video as it is supposed to be
> doing?  Is there some command I'm not aware of to test this?  Here is
> some hardware info. 
>
>
> root@fireball / # lspci -k
> 01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX
> 650] (rev a1)
>         Subsystem: Micro-Star International Co., Ltd. [MSI] GK107
> [GeForce GTX 650]
>         Kernel driver in use: nvidia
>         Kernel modules: nvidia_drm, nvidia
>
>
>
> root@fireball / # glxinfo
> name of display: :0
> display: :0  screen: 0
> direct rendering: Yes
> server glx vendor string: SGI
> server glx version string: 1.4
>
>
>
> This is what I get with glxgears at full screen.  Note, video is playing
> on the TV as well, just not on current screen. 
>
>
> root@fireball / # glxgears
> 311 frames in 5.0 seconds = 62.133 FPS
> 306 frames in 5.0 seconds = 61.123 FPS
> 311 frames in 5.0 seconds = 62.154 FPS
> 312 frames in 5.0 seconds = 62.217 FPS
> 309 frames in 5.0 seconds = 61.619 FPS
> 307 frames in 5.0 seconds = 61.265 FPS
> 315 frames in 5.0 seconds = 62.936 FPS
> XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
>       after 13277 requests (13277 known processed) with 0 events remaining.
> root@fireball / #
What X driver are you using? Nouveau or the proprietary nvidia one? Your 
glxinfo suggests neither and you should get way higher fps with glxgears on 
either, but most especially with the proprietary one.
Personally, I tried Nouveau for a while, but found it unstable on KDE 
plasma - kept locking up - but I know plasma tries to run everything 
accelerated. Also the proprietary one is way faster for gaming.
>
>
> Thanks.
>
> Dale
>
> :-)  :-) 
>




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Playing video and CPU usage
  2019-01-12  6:21 ` Andrew Udvare
@ 2019-01-12  6:39   ` Dale
  2019-01-12  7:12   ` Dale
  1 sibling, 0 replies; 11+ messages in thread
From: Dale @ 2019-01-12  6:39 UTC (permalink / raw
  To: gentoo-user

Andrew Udvare wrote:
>> On 2019-01-12, at 00:00, Dale <rdalek1967@gmail.com> wrote:
>>
>> Howdy,
>>
>> As some know, I recently bought a video card.  While not the most modern
>> thing, it is a lot faster than my old one.  I have a question tho.  When
>> I'm watching TV and playing a video with Smplayer, high resolution or a
>> medium resolution, it seems to use a good bit of CPU power.  I notice in
>> gkrellm, htop etc that it is using about 20 to sometimes 40 or 50% of
>> CPU power.  Yes, I still have the 8 core CPU in here.  In Smplayer, I
>> have video driver set to "gl(fast)" but have tried other settings as
>> well.  Obviously, some just plain don't work at all.  It causes Smplayer
>> to crash.  I did some googling, I think this is the best driver setting
>> for my card.  It is nvidia based.  
> It's not the best setting. You should avoid SMPlayer (IMHO from my experience at this point) and switch to mpv or VLC. You want to enable hardware decoding with VDPAU with any player. That card can decode H.264 fully and partially can decode MPEG-1/2/VC-1. You will see very little CPU usage with VDPAU enabled. The downside is the inability to use software-based filters in real-time, but there is a built-in hardware deinterlacer that significantly beats filters like Yadif.
>


I've tried VLC, don't like it much.  Plus, I have to tell Smplayer to
send audio to the TV not the computer speakers.  I have no idea how to
do that in VLC.  May google that at some point.  Still, just didn't like
VLC much.

I'm using the nvidia drivers.  Info.


[IP-] [  ] x11-drivers/nvidia-drivers-396.54


I meant to include that in first post but forgot.  Ooops. 

Thanks.

Dale

:-)  :-) 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Playing video and CPU usage
  2019-01-12  6:23 ` Davyd McColl
@ 2019-01-12  6:45   ` Dale
  0 siblings, 0 replies; 11+ messages in thread
From: Dale @ 2019-01-12  6:45 UTC (permalink / raw
  To: gentoo-user

Davyd McColl wrote:
>
>
> On January 12, 2019 7:00:19 AM Dale <rdalek1967@gmail.com> wrote:
> What X driver are you using? Nouveau or the proprietary nvidia one?
> Your glxinfo suggests neither and you should get way higher fps with
> glxgears on either, but most especially with the proprietary one.
> Personally, I tried Nouveau for a while, but found it unstable on KDE
> plasma - kept locking up - but I know plasma tries to run everything
> accelerated. Also the proprietary one is way faster for gaming.


I'm using nvidia.  I meant to include that in the first post but
forgot.  Age.  :/ 

[IP-] [  ] x11-drivers/nvidia-drivers-396.54


I can't recall the exact FPS before with old card but I'm thinking it is somewhere close what I'm getting here.  Plus the CPU usage makes me wonder.  

While I don't do gaming, I still want the video card to do its job.  After all, that's what it is there for.  When I'm doing updates in the background, that takes away from that if Smplayer/mplayer are using a lot of CPU power.  

At least it isn't just me that thinks the card isn't getting the load it should.  

Dale

:-)  :-)  



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Playing video and CPU usage
  2019-01-12  6:21 ` Andrew Udvare
  2019-01-12  6:39   ` Dale
@ 2019-01-12  7:12   ` Dale
  2019-01-12  8:02     ` Andrew Udvare
  1 sibling, 1 reply; 11+ messages in thread
From: Dale @ 2019-01-12  7:12 UTC (permalink / raw
  To: gentoo-user

Andrew Udvare wrote:
>> On 2019-01-12, at 00:00, Dale <rdalek1967@gmail.com> wrote:
>>
>> Howdy,
>>
>> As some know, I recently bought a video card.  While not the most modern
>> thing, it is a lot faster than my old one.  I have a question tho.  When
>> I'm watching TV and playing a video with Smplayer, high resolution or a
>> medium resolution, it seems to use a good bit of CPU power.  I notice in
>> gkrellm, htop etc that it is using about 20 to sometimes 40 or 50% of
>> CPU power.  Yes, I still have the 8 core CPU in here.  In Smplayer, I
>> have video driver set to "gl(fast)" but have tried other settings as
>> well.  Obviously, some just plain don't work at all.  It causes Smplayer
>> to crash.  I did some googling, I think this is the best driver setting
>> for my card.  It is nvidia based.  
> It's not the best setting. You should avoid SMPlayer (IMHO from my experience at this point) and switch to mpv or VLC. You want to enable hardware decoding with VDPAU with any player. That card can decode H.264 fully and partially can decode MPEG-1/2/VC-1. You will see very little CPU usage with VDPAU enabled. The downside is the inability to use software-based filters in real-time, but there is a built-in hardware deinterlacer that significantly beats filters like Yadif.
>


Just for giggles, I used VLC for a bit to play a video.  It has a fair
resolution and is a .mp4.  It uses about the same amount of CPU power as
Smplayer. I can't tell any difference even with the same video.  It
appears that it may be something besides the player. 

I did find some settings tho.  I also figured out how to tell it to send
sound to the TV.  Progress.  ;-) 

Any other ideas?  Something just don't seem to be working right here. 

Dale

:-)  :-) 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Playing video and CPU usage
  2019-01-12  7:12   ` Dale
@ 2019-01-12  8:02     ` Andrew Udvare
  2019-01-12  8:48       ` J. Roeleveld
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Udvare @ 2019-01-12  8:02 UTC (permalink / raw
  To: gentoo-user



Sent from my iPhone

> On Jan 12, 2019, at 02:12, Dale <rdalek1967@gmail.com> wrote:
> Just for giggles, I used VLC for a bit to play a video.  It has a fair
> resolution and is a .mp4.  It uses about the same amount of CPU power as
> Smplayer. I can't tell any difference even with the same video.  It
> appears that it may be something besides the player. 

You have to go into settings and make sure VDPAU is enabled. You need to enable the vdpau USE flag. I have it set globally.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Playing video and CPU usage
  2019-01-12  8:02     ` Andrew Udvare
@ 2019-01-12  8:48       ` J. Roeleveld
  2019-01-12 10:00         ` Dale
  0 siblings, 1 reply; 11+ messages in thread
From: J. Roeleveld @ 2019-01-12  8:48 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 751 bytes --]

On January 12, 2019 8:02:48 AM UTC, Andrew Udvare <audvare@gmail.com> wrote:
>
>
>Sent from my iPhone
>
>> On Jan 12, 2019, at 02:12, Dale <rdalek1967@gmail.com> wrote:
>> Just for giggles, I used VLC for a bit to play a video.  It has a
>fair
>> resolution and is a .mp4.  It uses about the same amount of CPU power
>as
>> Smplayer. I can't tell any difference even with the same video.  It
>> appears that it may be something besides the player. 
>
>You have to go into settings and make sure VDPAU is enabled. You need
>to enable the vdpau USE flag. I have it set globally.

Also, for OpenGL, ensure "eselect opengl list" shows nvidia selected.

--
Joost
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

[-- Attachment #2: Type: text/html, Size: 1155 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Playing video and CPU usage
  2019-01-12  8:48       ` J. Roeleveld
@ 2019-01-12 10:00         ` Dale
  2019-01-12 10:50           ` Davyd McColl
  0 siblings, 1 reply; 11+ messages in thread
From: Dale @ 2019-01-12 10:00 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2233 bytes --]

J. Roeleveld wrote:
> On January 12, 2019 8:02:48 AM UTC, Andrew Udvare <audvare@gmail.com>
> wrote:
>
>     Sent from my iPhone
>
>         On Jan 12, 2019, at 02:12, Dale <rdalek1967@gmail.com> wrote:
>         Just for giggles, I used VLC for a bit to play a video. It has
>         a fair resolution and is a .mp4. It uses about the same amount
>         of CPU power as Smplayer. I can't tell any difference even
>         with the same video. It appears that it may be something
>         besides the player. 
>
>
>     You have to go into settings and make sure VDPAU is enabled. You need to enable the vdpau USE flag. I have it set globally.
>
>
> Also, for OpenGL, ensure "eselect opengl list" shows nvidia selected.
>
> --
> Joost
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity. 


I enabled the vdpau USE flag globally and re-emerged the ones with
changed flags.  It wasn't many but got most video related stuff.  I then
set it up in Smplayer, will do VLC and others shortly.  I checked this a
few days ago and at the time, only nvidia was listed with eselect so it
was set to nvidia.  When I checked it just now, I had two, nvidia and
xorg-x11, and xorg was selected for some reason.  I set it back to
nvidia as it should be. 

I just restarted Smplayer and the CPU is sitting at almost nothing when
playing a video and using vdpau.  I can't tell much difference between
when I am playing a video and when I'm not really.  However, while sound
is working, the video is iffy at best. It sort of comes and goes.  I've
tried different video file formats but get the same when using vdpau. 
When I change it back to gl or something else, it works like it should. 
That said, when using say gl (fast), the CPU is almost nothing now.  I
suspect it was the eselect opengl setting that was making things not
work right.  I'll keep playing with the vdpau driver when I have time. 
I'm not sure how much improvement it will bring but if it should be
used, I'll give it a shot. 

Thanks for the help.  Since I had already checked that eselect setting,
I didn't think it would be wrong.  As I've said before, it's those silly
little things that messes things up.  :/

Dale

:-)  :-) 

[-- Attachment #2: Type: text/html, Size: 3355 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] Playing video and CPU usage
  2019-01-12 10:00         ` Dale
@ 2019-01-12 10:50           ` Davyd McColl
  0 siblings, 0 replies; 11+ messages in thread
From: Davyd McColl @ 2019-01-12 10:50 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2551 bytes --]



On January 12, 2019 12:00:43 PM Dale <rdalek1967@gmail.com> wrote:

> J. Roeleveld wrote:
>> On January 12, 2019 8:02:48 AM UTC, Andrew Udvare <audvare@gmail.com>
>> wrote:
>>
>>     Sent from my iPhone
>>
>>         On Jan 12, 2019, at 02:12, Dale <rdalek1967@gmail.com> wrote:
>>         Just for giggles, I used VLC for a bit to play a video. It has
>>         a fair resolution and is a .mp4. It uses about the same amount
>>         of CPU power as Smplayer. I can't tell any difference even
>>         with the same video. It appears that it may be something
>>         besides the player.
>>
>>
>>     You have to go into settings and make sure VDPAU is enabled. You need to 
>>     enable the vdpau USE flag. I have it set globally.
>>
>>
>> Also, for OpenGL, ensure "eselect opengl list" shows nvidia selected.
>>
>> --
>> Joost
>> -- 
>> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
>
> I enabled the vdpau USE flag globally and re-emerged the ones with
> changed flags.  It wasn't many but got most video related stuff.  I then
> set it up in Smplayer, will do VLC and others shortly.  I checked this a
> few days ago and at the time, only nvidia was listed with eselect so it
> was set to nvidia.  When I checked it just now, I had two, nvidia and
> xorg-x11, and xorg was selected for some reason.  I set it back to
> nvidia as it should be. 
>
> I just restarted Smplayer and the CPU is sitting at almost nothing when
> playing a video and using vdpau.  I can't tell much difference between
> when I am playing a video and when I'm not really.  However, while sound
> is working, the video is iffy at best. It sort of comes and goes.  I've
> tried different video file formats but get the same when using vdpau. 
> When I change it back to gl or something else, it works like it should. 
> That said, when using say gl (fast), the CPU is almost nothing now.  I
> suspect it was the eselect opengl setting that was making things not
> work right.  I'll keep playing with the vdpau driver when I have time. 
> I'm not sure how much improvement it will bring but if it should be
> used, I'll give it a shot. 
>
> Thanks for the help.  Since I had already checked that eselect setting,
> I didn't think it would be wrong.  As I've said before, it's those silly
> little things that messes things up.  :/
And that's why I thought you were using software rendering - because you 
were 😂 forgot to mention the eselect, but someone more switched on than me 
didn't 👍

>
> Dale
>
> :-)  :-) 

[-- Attachment #2: Type: text/html, Size: 3902 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-user] Re: Playing video and CPU usage
  2019-01-12  5:00 [gentoo-user] Playing video and CPU usage Dale
  2019-01-12  6:21 ` Andrew Udvare
  2019-01-12  6:23 ` Davyd McColl
@ 2019-01-12 12:49 ` Nikos Chantziaras
  2 siblings, 0 replies; 11+ messages in thread
From: Nikos Chantziaras @ 2019-01-12 12:49 UTC (permalink / raw
  To: gentoo-user

On 12/01/2019 07:00, Dale wrote:
> It is nvidia based.  Question, how do I know it is using
> the video card to process as much of the video as it is supposed to be
> doing?
You already corrected the vdpau USE flag thing. As for smplayer, you 
should select "gpu" (it might be named "opengl", depending on the 
version of mpv) in "General" in the "Video" tab.

In "Performance", you can set "Hardware decoding" to "vpau". If that 
doesn't work, then "vdpau-copy". There's also "cuda" and "cuda-copy". 
Not sure which works better.

All this assumes you use mpv in smplayer, not mplayer. Using mpv is 
highly recommended.



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-01-12 12:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-12  5:00 [gentoo-user] Playing video and CPU usage Dale
2019-01-12  6:21 ` Andrew Udvare
2019-01-12  6:39   ` Dale
2019-01-12  7:12   ` Dale
2019-01-12  8:02     ` Andrew Udvare
2019-01-12  8:48       ` J. Roeleveld
2019-01-12 10:00         ` Dale
2019-01-12 10:50           ` Davyd McColl
2019-01-12  6:23 ` Davyd McColl
2019-01-12  6:45   ` Dale
2019-01-12 12:49 ` [gentoo-user] " Nikos Chantziaras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox