Bug 102682 - vblank_mode ignored from ~/.drirc
Summary: vblank_mode ignored from ~/.drirc
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: 17.2
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-12 16:35 UTC by Niklas Haas
Modified: 2019-09-18 20:26 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Niklas Haas 2017-09-12 16:35:08 UTC
Various sources (e.g. IRC) have led me to believe that `vblank_mode` should be a settable option via ~/.drirc; however, it doesn't seem like this is the case to me. A demonstration:

<driconf>
    <device screen="0" driver="radeonsi">
        <application name="Default">
            <option name="vblank_mode" value="0" />
        </application>
    </device>
</driconf>

I made this from the ~/.drirc skeleton created by `driconf`. Curiously, the `vblank_mode` setting was also absent from that skeleton, but I added it manually. (It's also absent from the GUI - although a friend of mine says he has the option in his driconf interface!) As expected, this option seems to have no effect - I still get vsync in all tested applications (e.g. glxgears).

I can override it manually by using the environment variable vblank_mode, e.g. `vblank_mode=0 glxgears`. This *does* work, although it doesn't explain why this option is seemingly ignored from ~/.drirc. More worrying is the fact that the actual source code (dri3_set_swap_interval) uses configQuery("vblank_mode") to get this value, so it should pull it from both XML and the environment, right?

If this is not expected behavior, I can try stepping through the `configQuery` function in gdb; but I thought I'd ask first in case this is a known or easily explained issue.

Mesa version is 17.2.0, kernel version is 4.12.4, device is a Sapphire RX 560.
Comment 1 Gustaw Smolarczyk 2017-09-12 17:28:58 UTC
Hi,

The problem seems to be with the `driver="radeonsi"' part (the screen attribute is not used when driver is present). It seems that there is a bug and an incorrect driver name "loader" is passed to the xmlconfig machinery.

For a quick work-around, just remove both screen and driver attributes, unless you want to restrict your setting to a specific driver/screen.
Comment 2 Niklas Haas 2017-09-12 17:31:19 UTC
Verifying that your work-around does, indeed, work around the issue.
Comment 3 Gustaw Smolarczyk 2017-09-12 17:40:22 UTC
Was too fast. The passed driver name is not "loader" but "dri2". And I think it's intentional, since vblank_mode is not an option of a device driver but of the dri infrastructure.

I will let the more experienced developers judge this bug report, but I would say it's NOTABUG.
Comment 4 Nicolai Hähnle 2017-09-13 15:26:49 UTC
IMHO, while there is a certain internal logic to it, having to put driver="dri2" here is surprising and bad usability. I'd say this is a valid bug, and should be fixed.
Comment 5 Niklas Haas 2017-09-14 07:23:01 UTC
At the very least, it's a bug in driconf that it doesn't show up in the GUI.
Comment 6 GitLab Migration User 2019-09-18 20:26:40 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1018.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.