Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Gaming while watching Youtube performance issue
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
statikregimen
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jul 2011
Posts: 102
Location: USA/Michigan

PostPosted: Wed Nov 22, 2017 5:10 pm    Post subject: [SOLVED] Gaming while watching Youtube performance issue Reply with quote

Happy Thanksgiving everyone (prolly wont really get another chance to say it here this year)!

When playing certain(most) games on one screen, while trying to watch Youtube on another, my overall framerate drops dramatically in both applications, often times causing them, and the WM to hang. It was never perfect in Ubuntu (or Winderps) on this machine, but acceptable/stable, so at least I know it can be done.

Changing video quality/size, game quality/resolution doesn't seem to help much.

Turning vsync on in the affected games resolves the problem, but I never had to do that in the aforementioned OSes, and would really rather not enable it in first person shooters (though it's a fine solution for many games, annoyingly).

I tried Compton as a "Hail Mary", and while it did seem to make the system more stable, it did not seem to affect performance (nor the effectiveness of enabling vsync in games). I'm still exploring configuration options, but not sure if this is a rabbit trail or not.

Hardware is more than capable: https://wiki.gentoo.org/wiki/MSI_GT72S-G220 - using a 3440x1440 monitor on the HDMI...so not expecting mind blowing performance, but at least want to achieve the performance I've had before.

Window manager is Qtile.... don't recall having issues in Ubuntu, but could be wrong...I hope not.

Thanks in advance for any insight! Sorry if I've left anything out...

EDIT: Vimeo happens to work a lot better...so maybe a Firefox issue?
_________________
Links of me:
https://bitbucket.org/experimentfailed/
https://experimentfailed.bandcamp.com/


Last edited by statikregimen on Sun Jul 15, 2018 9:34 pm; edited 2 times in total
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Thu Nov 30, 2017 4:23 pm    Post subject: Reply with quote

Does the NVIDIA GPU is passed through the crappy build in intel gpu and htan to the output devices? Marketed as Nivida optimus and such.

I have used several intel gpu based notebooks, or hybrid ones, and I see microlags, a lot of unresponsiveness, driver issues in windows 10. so in my point of view, the intel gpu is the source of those issues

I play urbanterror with 660m on the internal lvds and watch youtube on VGA with my external monitor. I use i3wm + eudev + openrc. I3wm launches separate x-servers for every virtual screen.

it could also be a setup issue, an issue with a not decent choice of your window manager.

Firefox is problematic recently, I have not watched it in details, but it seems it has issues.

When you game I recommend that you use something slim as window manager anyway, slim and simple
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5236

PostPosted: Thu Nov 30, 2017 5:32 pm    Post subject: Re: Gaming while watching Youtube performance issue Reply with quote

statikregimen wrote:
EDIT: Vimeo happens to work a lot better...so maybe a Firefox issue?

Maybe one uses a format that gets passed through to your GPU and one doesn't? Most graphics cards don't know what to do with VP9 for instance. Try turning off hwaccel in firefox and see if it helps.

You might also want to try something like mpv and see if that reproduces the problem; it can play youtube URLs directly and should be easier to experiment with hardware decoding than going through about:config and browser restarts each time...
Back to top
View user's profile Send private message
statikregimen
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jul 2011
Posts: 102
Location: USA/Michigan

PostPosted: Fri Dec 01, 2017 3:09 pm    Post subject: Re: Gaming while watching Youtube performance issue Reply with quote

Thanks for the replies!

Roman_Gruber wrote:
Does the NVIDIA GPU is passed through the crappy build in intel gpu and htan to the output devices? Marketed as Nivida optimus and such.

I have used several intel gpu based notebooks, or hybrid ones, and I see microlags, a lot of unresponsiveness, driver issues in windows 10. so in my point of view, the intel gpu is the source of those issues

I play urbanterror with 660m on the internal lvds and watch youtube on VGA with my external monitor. I use i3wm + eudev + openrc. I3wm launches separate x-servers for every virtual screen.

it could also be a setup issue, an issue with a not decent choice of your window manager.

Firefox is problematic recently, I have not watched it in details, but it seems it has issues.

When you game I recommend that you use something slim as window manager anyway, slim and simple


I would speculate that yes, this laptop uses Optimus, but not sure how to tell. Will look more into this.

I've also suspected Firefox, so I will try something else....I just didn't want to spend the time building Chromium unless I had to.

As I mentioned, my window manager is Qtile - it is very light weight, but does seem a bit sparse on development (latest release is from Feb. 2017). I will also try another, just to be sure.


Ant P. wrote:
statikregimen wrote:
EDIT: Vimeo happens to work a lot better...so maybe a Firefox issue?

Maybe one uses a format that gets passed through to your GPU and one doesn't? Most graphics cards don't know what to do with VP9 for instance. Try turning off hwaccel in firefox and see if it helps.

You might also want to try something like mpv and see if that reproduces the problem; it can play youtube URLs directly and should be easier to experiment with hardware decoding than going through about:config and browser restarts each time...


I tried disabling hwaccel in Firefox, to no avail.

I did not think about trying a standalone player. I have VLC installed which will do the trick, and may be a better solution overall due to my poor regard for Google and YT....
Back to top
View user's profile Send private message
statikregimen
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jul 2011
Posts: 102
Location: USA/Michigan

PostPosted: Sat Dec 02, 2017 1:19 am    Post subject: Reply with quote

Well, mpv has not alleviated the problem entirely, but it's 10x better. It's also better for my needs than VLC - no GUI makes it work really well in a tiling WM, so thank you for introducing me to it! Got it set up with youtube-dl (had to rebuild ffmpeg w/ the openssl use flag) and I'm in business. I still have to use vsync in my games, and it's inconvenient to use YT this way, so it's not a permanent solution, but will get me by nicely in the mean time :D
Back to top
View user's profile Send private message
havana8
n00b
n00b


Joined: 17 Nov 2017
Posts: 16

PostPosted: Mon Dec 04, 2017 3:48 pm    Post subject: Reply with quote

If someone finds a way to fix it please share it! It would be helpful for sure! :)
Back to top
View user's profile Send private message
statikregimen
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jul 2011
Posts: 102
Location: USA/Michigan

PostPosted: Wed Dec 06, 2017 2:17 pm    Post subject: Reply with quote

havana8 wrote:
If someone finds a way to fix it please share it! It would be helpful for sure! :)


No promising leads yet, unfortunately, but I try to always keep my threads updated as I work a problem :D
Back to top
View user's profile Send private message
statikregimen
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jul 2011
Posts: 102
Location: USA/Michigan

PostPosted: Sat Jul 14, 2018 1:05 am    Post subject: Reply with quote

Well, it's been several months. Thought maybe it'd work itself out eventually, but so far the issue remains.

Last night, I tried a few suggestions from here - specifically 1000hz timer frequency. I also enabled CONFIG_SCHED_AUTOGROUP, because it sounded good, and was the closest I could find to that link's suggestion of enabling "Automatically use SCHED_ISO policy for X", which I suppose is probably part of the Zen kernel they recommend (or has been dropped). These options had little effect.

Today, I enabled CONFIG_SCHED_SMT, CONFIG_SCHED_MC, and CONFIG_SCHED_MC_PRIO and selected Core 2/Newer Xeon as my Processor Family in addition to the above.

The sum of these changes have made a noticeable difference, but still things slow down quite a bit as long as a video is playing, rendering the video unwatchable and the game unplayable. Mainly, what I gained was the overall framerates of both the game and browser are notably higher by at least double, and I can pause the video reliably without the whole system eventually coming to a halt.

Again: other distros and Windows have both let me watch videos smoothly while gaming, with minimal impact on game frame rates, so something is definitely off with my Gentoo :(

p.s. I did try rebuilding nvidia-drivers after the kernel changes, just to be sure, but no change =/
_________________
Links of me:
https://bitbucket.org/experimentfailed/
https://experimentfailed.bandcamp.com/
Back to top
View user's profile Send private message
statikregimen
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jul 2011
Posts: 102
Location: USA/Michigan

PostPosted: Sun Jul 15, 2018 7:19 pm    Post subject: Reply with quote

I may have solved this...I will mark as such after more testing.

First, I tried switching my kernel's Preemtion Model (under Processor Type and Features) to "Voluntary Kernel Preemption (Desktop)" from Real-time (I will be using this machine for music production and recording). This didn't make much difference (thankfully so hopefully now I can switch it back).

I've noticed several times that Firefox seemed to gobble up a lot of CPU time, so after randomly googling around since I noticed, I finally found https://www.omgubuntu.co.uk/2017/04/small-tweak-makes-firefox-linux-run-much-faster

In the Firefox address bar, enter

Code:
about:config


Then search for

Code:
layers.acceleration.force-enabled


Set it to true and restart Firefox.

It doesn't seem to change CPU usage of Firefox, but so far I've tested in Saints Row: The Third, which was one of the many games affected by this, and both the video and game run glass smooth now!

Cheers.

UPDATE: Marked solved. In addition to Saints Row, I tested Shadow Warrior, and Overload (the new Descent-like game)...all games at more or less maxed detail (3440x1440 + 1080p for the monitor I watch YouTube on) and everything is running great now :D
_________________
Links of me:
https://bitbucket.org/experimentfailed/
https://experimentfailed.bandcamp.com/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum