Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(490)

Unified Diff: lightup_screen

Issue 3418029: Improve factory screen brightness (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/init.git
Patch Set: Change to /usr/sbin/ Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos_startup ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lightup_screen
diff --git a/lightup_screen b/lightup_screen
new file mode 100755
index 0000000000000000000000000000000000000000..c8d7935d8c7f33610c15031a245fa80e95d63b53
--- /dev/null
+++ b/lightup_screen
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Always exit with 0
+trap "exit 0" EXIT
+set -e
+
+for INTERFACE in "acpi_video0" "i915_backlight"; do
+ BRIGHTNESS="/sys/class/backlight/${INTERFACE}/brightness"
+ MAX_BRIGHTNESS="/sys/class/backlight/${INTERFACE}/max_brightness"
+ [ ! -f "${BRIGHTNESS}" -o ! -f "${MAX_BRIGHTNESS}" ] && continue
+ cp "${MAX_BRIGHTNESS}" "${BRIGHTNESS}"
+ break
+done
« no previous file with comments | « chromeos_startup ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698