From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandros Theodotou Subject: bug#38163: GDK does not return the monitor's refresh rate Date: Sun, 10 Nov 2019 16:44:23 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-1lEiSlD1Ily4xtVP8JSt" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:51963) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTqKl-0004af-HV for bug-guix@gnu.org; Sun, 10 Nov 2019 11:45:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iTqKk-0005Cy-Ed for bug-guix@gnu.org; Sun, 10 Nov 2019 11:45:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:43655) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iTqKk-0005Cq-C1 for bug-guix@gnu.org; Sun, 10 Nov 2019 11:45:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iTqKk-0005nx-5I for bug-guix@gnu.org; Sun, 10 Nov 2019 11:45:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:51897) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTqKH-0004QI-Dt for bug-guix@gnu.org; Sun, 10 Nov 2019 11:44:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iTqKF-0004sy-R3 for bug-guix@gnu.org; Sun, 10 Nov 2019 11:44:32 -0500 Received: from mout02.posteo.de ([185.67.36.142]:56933) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iTqKF-0004sE-Kx for bug-guix@gnu.org; Sun, 10 Nov 2019 11:44:31 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 51C602400FD for ; Sun, 10 Nov 2019 17:44:29 +0100 (CET) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 47B0GN00Fdz9rxG for ; Sun, 10 Nov 2019 17:44:27 +0100 (CET) List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 38163@debbugs.gnu.org --=-1lEiSlD1Ily4xtVP8JSt Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I have been developing and testing my GTK app (Zrythm) on many distros and Guix is the only case that the monitor's refresh rate is returned as 0. The API I am using is this: https://developer.gnome.org/gdk3/stable/GdkMonitor.html#gdk-monitor-get-ref= resh-rate I was developing/testing on Parabola GNU/Linux-libre before and it was giving me a correct rate of 60 Hz. Other distros I have tested this API before on: Various ubuntu versions, debian 9 and 10, manjaro (arch), various fedora versions, plus a few others that users tested on. I suspect GDK is trying to access something that guix doesn't make available to it, but I don't have much knowledge of the internals of GDK or Guix to debug this myself. I will post a package from my guix channel that you can test this on soon. To call the API, one basically calls the following, after including , so any GTK program will do. ``` GdkDisplay * display =3D gdk_display_get_default (); GdkMonitor * monitor =3D gdk_display_get_primary_monitor (display); int refresh_rate =3D gdk_monitor_get_refresh_rate (monitor); ``` --=-1lEiSlD1Ily4xtVP8JSt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEESBMjhK0999huJUuDAi6uQjE9cPMFAl3IPmcACgkQAi6uQjE9 cPM+Ogf/Sfm12hz69y56gbHNw5aHncCf/vra35nu1R3/3HMhnK5t3t66Q10qcCyH i7k7rP+rY53knOlM0hvJcuUVNhQRaHTTpwr2VoOaNwt/6a0dNmb/JRmQq7rSJYVy dFTIKF+SeUPBeKLzv6v9pNApMpJL0VbECVgFoaoJFo+boLwZXlwsyFtggZRQ+2cj E27AhIMk7lM7WQPqZ2s3cqqTz63Arse0Fy02RFKjQoSJPoj8EdVpWDcfq4cq5aBG dzf5CORnyoA+HddvoJZBWVI+RR8h/mIxaHJ0CHqABHLgKeZR2PIG7qAve/KJZbQ2 P0JCoEFAvCSuvWiK/8mQuT4vI0FzsQ== =PO5a -----END PGP SIGNATURE----- --=-1lEiSlD1Ily4xtVP8JSt--