Your message dated Sun, 9 Nov 2025 19:22:30 -0500
with message-id
<CAAajCMZ9WKAw+cNoMP4Rca7=kkptfdpb-ua6urv8-3ocpqt...@mail.gmail.com>
and subject line closing ancient gnome-power-manager bugs
has caused the Debian Bug report #617310,
regarding gnome-power-manager restores wrong brightness
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
617310: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617310
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gnome-power-manager
Version: 2.32.0-2
Severity: important
After "gnome-power-manager" dims the screen it restores to a wrong brightness
level because it floors its %->discrete calculation instead of rounding it.
I've attached a patch for this and I've submitted it upstream.
--
Pedro Martínez Juliá
Department of Communication and Information Engineering
Faculty of Computer Science
University of Murcia
Email: [email protected]
---------------------------------------------------------
*** Entia non sunt multiplicanda praeter necessitatem ***
>From 9d2952244e5b4f3667e02d5d26aed0a251df5651 Mon Sep 17 00:00:00 2001
From: Pedro Martinez-Julia <[email protected]>
Date: Mon, 7 Mar 2011 23:31:40 +0100
Subject: [PATCH] Fixed #644143, how to convert from percentage to discrete and vice-versa.
---
src/egg-discrete.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/egg-discrete.c b/src/egg-discrete.c
index a051282..fe910cc 100644
--- a/src/egg-discrete.c
+++ b/src/egg-discrete.c
@@ -47,7 +47,7 @@ egg_discrete_from_percent (guint percentage, guint levels)
egg_warning ("levels is 0!");
return 0;
}
- return ((gfloat) percentage * (gfloat) (levels - 1)) / 100.0f;
+ return (guint) ((((gfloat) percentage * (gfloat) (levels - 1)) / 100.0f) + 0.5f);
}
/**
@@ -69,7 +69,7 @@ egg_discrete_to_percent (guint discrete, guint levels)
egg_warning ("levels is 0!");
return 0;
}
- return (guint) ((gfloat) discrete * (100.0f / (gfloat) (levels - 1)));
+ return (guint) (((gfloat) discrete * (100.0f / (gfloat) (levels - 1))) + 0.5f);
}
/**
--
1.7.4.1
--- End Message ---
--- Begin Message ---
There have been many changes to Debian since this bug was originally
reported. If you are still experiencing this issue with Debian 13 (or
with Debian 12 or Testing or Unstable), please report a new bug.
Thank you,
Jeremy Bícha
--- End Message ---