diff --git a/frontend/device/kobo/powerd.lua b/frontend/device/kobo/powerd.lua index ba1060f80..95370e904 100644 --- a/frontend/device/kobo/powerd.lua +++ b/frontend/device/kobo/powerd.lua @@ -321,8 +321,9 @@ function KoboPowerD:turnOffFrontlightHW() util.runInSubProcess(function() for i = 1,5 do self:_setIntensity(math.floor(self.fl_intensity - ((self.fl_intensity / 5) * i))) - -- NOTE: We generally don't need to sleep when using sysfs as a backend... - if self.device:hasNaturalLight() and not self.device:hasNaturalLightMixer() then + --- @note: Newer devices appear to block slightly longer on FL ioctls/sysfs, so only sleep on older devices, + --- otherwise we get a jump and not a ramp ;). + if not self.device:hasNaturalLight() then if (i < 5) then util.usleep(35 * 1000) end @@ -359,7 +360,9 @@ function KoboPowerD:turnOnFrontlightHW() util.runInSubProcess(function() for i = 1,5 do self:_setIntensity(math.ceil(self.fl_min + ((self.fl_intensity / 5) * i))) - if self.device:hasNaturalLight() and not self.device:hasNaturalLightMixer() then + --- @note: Newer devices appear to block slightly longer on FL ioctls/sysfs, so only sleep on older devices, + --- otherwise we get a jump and not a ramp ;). + if not self.device:hasNaturalLight() then if (i < 5) then util.usleep(35 * 1000) end