Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upSudden tearing in videos (youtube etc) as if a "vsync issue" was afoot when trying to get two monitors with different refresh rates work in dual-head config (esp if another, unrelated VM is highly active) #3194
Comments
tonsimple
changed the title from
Sudden tearing in videos (youtube etc) as if a "vsync issue" was afoot when trying to get two monitors with different refresh rates work in dual-head config
to
Sudden tearing in videos (youtube etc) as if a "vsync issue" was afoot when trying to get two monitors with different refresh rates work in dual-head config (esp if another, unrelated VM is highly active)
Oct 19, 2017
andrewdavidwong
added
bug
C: gui-virtualization
labels
Oct 19, 2017
andrewdavidwong
added this to the Release 3.2 updates milestone
Oct 19, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Yethal
Oct 21, 2017
Where exactly did you modify the file? In dom0? In templates? And in which directory?
Yethal
commented
Oct 21, 2017
|
Where exactly did you modify the file? In dom0? In templates? And in which directory? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
tonsimple
commented
Oct 21, 2017
|
in dom0 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Yethal
commented
Oct 22, 2017
|
I don't have that file there. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
tonsimple
Oct 22, 2017
Weird, I do, and its settings are working (easily tested by trying to delete all screen entries, which prevents xfce start (I did try it just to make sure my file actually works)
tonsimple
commented
Oct 22, 2017
|
Weird, I do, and its settings are working (easily tested by trying to delete all screen entries, which prevents xfce start (I did try it just to make sure my file actually works) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Yethal
Oct 22, 2017
[Yethal@dom0 ~]$ ls /etc/X11
applnk fontpath.d xinit Xmodmap xorg.conf.d Xresources
Is this file supposed to be autocreated at some point during the installation process?
Yethal
commented
Oct 22, 2017
|
[Yethal@dom0 ~]$ ls /etc/X11 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
tonsimple
Oct 22, 2017
I don't know, but I think it "was there for me" when I recently re-installed qubes due to one of ASUS's dumb weird BIOS bugs.
I think there's an x command to autocreate it if it is absent....
Edit: PS: I'll post a question about this to qubes-devel
tonsimple
commented
Oct 22, 2017
•
|
I don't know, but I think it "was there for me" when I recently re-installed qubes due to one of ASUS's dumb weird BIOS bugs. Edit: PS: I'll post a question about this to qubes-devel |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
samcv
Feb 3, 2018
I am using 4.0-rc3, and by default XFCE is setup with vertical sync (vsync) disabled. May not be totally related to this issue, maybe I should open another issue to see if the default for that preference can be changed?
P.S. @tonsimple are you using KDE of XFCE?
samcv
commented
Feb 3, 2018
|
I am using 4.0-rc3, and by default XFCE is setup with vertical sync (vsync) disabled. May not be totally related to this issue, maybe I should open another issue to see if the default for that preference can be changed? P.S. @tonsimple are you using KDE of XFCE? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andrewdavidwong
Feb 3, 2018
Member
I am using 4.0-rc3, and by default XFCE is setup with vertical sync (vsync) disabled. May not be totally related to this issue, maybe I should open another issue to see if the default for that preference can be changed?
Generally speaking, we try to respect upstream distro's default choices unless there's a specific reason not to. If having vsync disabled by default is best for most people, then it's not unreasonable to ask the minority to take a minute to change that setting, whereas it would be unreasonable to make the default worse for most people just so that a minority doesn't have to bother changing a setting. On the other hand, if the default is wrong in general (e.g., if having vsync enabled by default would actually be better for most XFCE users, regardless of whether they're also Qubes users), then it might be worth filing an issue with XFCE.
Generally speaking, we try to respect upstream distro's default choices unless there's a specific reason not to. If having vsync disabled by default is best for most people, then it's not unreasonable to ask the minority to take a minute to change that setting, whereas it would be unreasonable to make the default worse for most people just so that a minority doesn't have to bother changing a setting. On the other hand, if the default is wrong in general (e.g., if having vsync enabled by default would actually be better for most XFCE users, regardless of whether they're also Qubes users), then it might be worth filing an issue with XFCE. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
brendanhoar
Mar 4, 2018
FWIW, the following substantially improved youtube HD video viewing in my personal VM (using firefox) on a Thinkpad W520 with integrated (intel) graphics. The options may be specific to the intel driver.
- Open Terminal in dom0
- cd /etc/X11/xorg.conf.d/
- sudo vi 10-display.conf
- Put the following content in it (assumption you know vi basics)
Section "Device"
Identifier "Intel Graphics Card0"
Driver "intel"
Option "TearFree" "true"
Option "TripleBuffer" true"
Option "Vsync" "true"
EndSection
-- Save the file
If you make a typo (or if I did) and Xorg can't parse it, X11 won't load. You'll need to hit alt-f2, login as qubes-user and remove or rename the file without the conf extension and reboot to fix it. Ask me how I know... :)
I also enabled Qubes/System Tools/Windows Manager Tweaks/Compositor/"Synchronize drawing to the vertical blank" before the above, but that did not seem to make a difference. I haven't turned it off since making the above change, though.
brendanhoar
commented
Mar 4, 2018
|
FWIW, the following substantially improved youtube HD video viewing in my personal VM (using firefox) on a Thinkpad W520 with integrated (intel) graphics. The options may be specific to the intel driver.
Section "Device" -- Save the file If you make a typo (or if I did) and Xorg can't parse it, X11 won't load. You'll need to hit alt-f2, login as qubes-user and remove or rename the file without the conf extension and reboot to fix it. Ask me how I know... :) I also enabled Qubes/System Tools/Windows Manager Tweaks/Compositor/"Synchronize drawing to the vertical blank" before the above, but that did not seem to make a difference. I haven't turned it off since making the above change, though. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
brendanhoar
commented
Mar 4, 2018
|
Clarification: this was under Qubes V4.0RC4 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Mar 4, 2018
Member
Thanks for researching this @brendanhoar !
While considering something we could put in default installation, the above will break non-intel hardware. But I think using OutputClass should work:
Section "OutputClass"
Identifier "Intel Graphics Card0"
# not sure if should be "intel" or "i915"
MatchDriver "i915"
Option "TearFree" "true"
Option "TripleBuffer" true"
Option "Vsync" "true"
EndSection
|
Thanks for researching this @brendanhoar !
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
samcv
Mar 5, 2018
Personally it doesn't make sense to me to force the GPU driver settings into a less efficient and non-driver portable setting instead of changing the settings for the DE to use vsync. Changing the setting for XFCE would affect all video cards and not have to mess with any of the Xorg or driver settings. Forcing the drivers to use "TearFree" reduces performance and battery life needlessly. The simple solution is to have the DE use vsync instead of trying to get the GPU to correct for the DE's lack of using vsync itself.
On the Intel driver: TripleBuffer and VSync are already enabled by default. @brendanhoar referred to the setting as "Vsync" but it is actually "VSync" for the Intel GPU driver. It could possibly be case insensitive or the setting may be being ignored (since this setting defaults to being enabled).
samcv
commented
Mar 5, 2018
•
|
Personally it doesn't make sense to me to force the GPU driver settings into a less efficient and non-driver portable setting instead of changing the settings for the DE to use vsync. Changing the setting for XFCE would affect all video cards and not have to mess with any of the Xorg or driver settings. Forcing the drivers to use "TearFree" reduces performance and battery life needlessly. The simple solution is to have the DE use vsync instead of trying to get the GPU to correct for the DE's lack of using vsync itself. On the Intel driver: TripleBuffer and VSync are already enabled by default. @brendanhoar referred to the setting as "Vsync" but it is actually "VSync" for the Intel GPU driver. It could possibly be case insensitive or the setting may be being ignored (since this setting defaults to being enabled). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Yethal
Mar 5, 2018
What about non-Intel GPUs? If it's as simple as single configuration file per vendor it would only be a matter of detecting the gpu via lspci/modprobe and choosing appropriate file.
Yethal
commented
Mar 5, 2018
|
What about non-Intel GPUs? If it's as simple as single configuration file per vendor it would only be a matter of detecting the gpu via lspci/modprobe and choosing appropriate file. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
brendanhoar
Mar 5, 2018
Hi Sam,
Thanks for the information on the default settings for the Intel driver making some of my changes redundant (or ignored). I will do more testing with the settings later this week.
Also, I agree with your premise, if by DE you mean Desktop Environment: if a DE setting can handle it, we shouldn't need to modify the display driver settings.
So...
I thought I had already tried that by checking the Qubes/System Tools/Windows Manager Tweaks/Compositor/"Synchronize drawing to the vertical blank" setting, but that did not seem to reduce the tearing.
Can you think of another place in the DE that I should be adjusting this? Am I interpreting your "DE" correctly?
Thanks,
Brendan
brendanhoar
commented
Mar 5, 2018
|
Hi Sam, Thanks for the information on the default settings for the Intel driver making some of my changes redundant (or ignored). I will do more testing with the settings later this week. Also, I agree with your premise, if by DE you mean Desktop Environment: if a DE setting can handle it, we shouldn't need to modify the display driver settings. So... I thought I had already tried that by checking the Qubes/System Tools/Windows Manager Tweaks/Compositor/"Synchronize drawing to the vertical blank" setting, but that did not seem to reduce the tearing. Can you think of another place in the DE that I should be adjusting this? Am I interpreting your "DE" correctly? Thanks, |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
SurinameClubcard
Jul 19, 2018
I'm running Qubes R4.0 on two systems. Both have only one, Intel based, video card. The first system has an rather old Intel HD 4600 chip (PCI-id 8086:0412), the second system has a pretty new Intel HD Graphics 630 (PCI-id 8086:591b). On the first system, setting "Synchronize drawing on the vertical blank" immediately fixed the tearing, on the second one nothing changed. It is (a bit annoyingly) visible when playing movies. I will experiment with above suggestions.
SurinameClubcard
commented
Jul 19, 2018
•
|
I'm running Qubes R4.0 on two systems. Both have only one, Intel based, video card. The first system has an rather old Intel HD 4600 chip (PCI-id 8086:0412), the second system has a pretty new Intel HD Graphics 630 (PCI-id 8086:591b). On the first system, setting "Synchronize drawing on the vertical blank" immediately fixed the tearing, on the second one nothing changed. It is (a bit annoyingly) visible when playing movies. I will experiment with above suggestions. |
tonsimple commentedOct 19, 2017
•
edited
Edited 1 time
-
tonsimple
edited Oct 19, 2017 (most recent)
Qubes OS version:
R 3.2
Affected TemplateVMs:
dom0 ?
Steps to reproduce the behavior:
Just play a video on youtube using intel embedded driver on Skylake while having two screens (144 hz one and a 60 hz one)
The window with movie (youtube in a browser) is on 144hz screen.
Expected behavior:
No VSYNC issue, no tearing, movie plays smooth.
Actual behavior:
Spontaneous bursts of tearing as consistent with "vsync not working right"
General notes:
Two 60hz screens and 144 Hz + 144 Hz screen have so far not produced this issue.
P.S.: adding the following to xorg.conf alleviated issue MASSIVELY in firefox and "moderately" in chrome.
Option "TearFree" "true"
Option "TrippleBuffer" "true"
Option "Vsync" "true"
More interestingly, according to https://www.vsynctester.com/ the issue becomes more pronounced if some "heavy lifting" is done in another (unrelated) VM.
Is a VM being able to affect VSYNC (and, seemingly, only VSYNC since no dropped frames) in another VM... normal?
Related issues: