Any way to change the refresh rate? modetest: permission denied

924 views
Skip to first unread message

Marc Herbert

unread,
Jan 19, 2018, 6:40:32 PM1/19/18
to Chromium OS dev
Hi,

Is there a way to change the refresh rate?

# strace -f modetest -s DP-3:1920x1080-60

DRM_IOCTL_MODE_SETCRTC, 0x7ffe93d24c70) = -1 EACCES (Permission denied)

Chrome has the master lock on the DRM device. This means that modetest won't be able to change the connector properties unless it is running as root.

Well, looks like even root is denied permission to set modes. I changed:

echo Y > /sys/kernel/debug/dri/drm_master_relax

... but it made no difference.

This is significant test limitation, any alternative?

Cheers,

Marc

Marc Herbert

unread,
Jan 19, 2018, 7:23:10 PM1/19/18
to Chromium OS dev
BTW I just found that the resolutions reported by the display settings panel cannot be trusted: https://bugs.chromium.org/p/chromium/issues/detail?id=775757#c5

Dominik Behr

unread,
Jan 19, 2018, 8:06:04 PM1/19/18
to Chromium OS dev
I think the best way of using modetest would be to either shut down chrome 
just type stop ui
or if you really want Chrome to still live, use dbus-send to send ReleaseOwnership message to DisplayService in chrome, so it will give up master. See frecon sources how it uses this message.
The drm_master_relax sysfs switch is for using drmSetMaster by frecon when Chrome has hung.

Marc Herbert

unread,
Jan 29, 2018, 9:41:18 PM1/29/18
to Chromium OS dev
Thanks Dominik, either stop ui or

dbus-send --system --dest=org.chromium.DisplayService --print-reply /org/chromium/DisplayService org.chromium.DisplayServiceInterface.ReleaseOwnership

work. Then  modetest -s DP-5:1920x1080-24 (for instance) shows a test card at any supported resolution and refresh rate. Just one issue though: I couldn't find how to light up more than one screen at a time, not even with modetest -d. So MST testing for instance.

TakeOwnership restores the interface... to the initial resolutions, previous modetest commands are forgotten.

PS: not all but some resolution mysteries have been explained, see updates in 775757
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages