Giter Site home page Giter Site logo

bytbox / pommed-light Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 25.0 1.76 MB

A trimmed version of the pommed hotkey handler for macbooks

Home Page: http://bytbox.net/blog/2012/04/light-pommed.html

License: GNU General Public License v2.0

Makefile 1.74% Shell 0.83% C 96.70% Roff 0.73%

pommed-light's People

Contributors

abjugard avatar adangel avatar agimenez avatar alxndrhi avatar bytbox avatar colinharrington avatar corsac-s avatar evadnoob avatar gschwind avatar jblache avatar jmlacroix avatar jonaustin avatar monochromec avatar panchoh avatar puffnfresh avatar qunying avatar ram-z avatar rydberg avatar sattlerc avatar thomaschiroux avatar trofi avatar xavieralt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pommed-light's Issues

Trouble compiling

I am on Debian testing. My build fails and it looks like I have conflicting header files.
What can I do about this?

$ make
make -C pommed OFLIB=
make[1]: Entering directory `/usr/local/src/pommed-light/pommed'
gcc -g -O2 -Wall  -I/usr/include/alsa       -DNO_SYS_INOTIFY_H -DNO_SYS_TIMERFD_H   -c -o evdev.o evdev.c
In file included from /usr/include/x86_64-linux-gnu/asm/fcntl.h:1:0,
                 from /usr/include/linux/fcntl.h:4,
                 from /usr/include/linux/inotify.h:11,
                 from evdev.c:37:
/usr/include/asm-generic/fcntl.h:171:8: error: redefinition of ‘struct flock’
In file included from /usr/include/fcntl.h:35:0,
                 from evdev.c:25:
/usr/include/x86_64-linux-gnu/bits/fcntl.h:35:8: note: originally defined here
make[1]: *** [evdev.o] Error 1
make[1]: Leaving directory `/usr/local/src/pommed-light/pommed'
make: *** [pommed] Error 2

acpi_video0 backlight vs. intel_backlight

On a stock Lubuntu 13.10 running on a MBP 8,1 I noticed that using acpi_video0 in /sys/class/backlight to control the backlight doesn't seem to work (kernel 3.13). In contrast to this, intel_backlight does seem to work.

As a quick workaround, inserting the respective /sys/class files in sysfs_backlight.c does the trick:

--- sysfs_backlight.c.org 2014-02-22 18:32:50.552133444 +0100
+++ sysfs_backlight.c 2014-02-22 18:06:00.186953043 +0100
@@ -70,6 +70,7 @@
"/sys/class/backlight/apple_backlight/actual_brightness",
"/sys/class/backlight/nvidia_backlight/actual_brightness",
"/sys/class/backlight/nv_backlight/actual_brightness",

  • "/sys/class/backlight/intel_backlight/actual_brightness",
    "/sys/class/backlight/acpi_video0/actual_brightness",
    #endif
    };
    @@ -89,6 +90,7 @@
    "/sys/class/backlight/apple_backlight/brightness",
    "/sys/class/backlight/nvidia_backlight/brightness",
    "/sys/class/backlight/nv_backlight/brightness",
  • "/sys/class/backlight/intel_backlight/brightness",
    "/sys/class/backlight/acpi_video0/brightness",
    #endif
    };
    @@ -108,6 +110,7 @@
    "/sys/class/backlight/apple_backlight/max_brightness",
    "/sys/class/backlight/nvidia_backlight/max_brightness",
    "/sys/class/backlight/nv_backlight/max_brightness",
  • "/sys/class/backlight/intel_backlight/max_brightness",
    "/sys/class/backlight/acpi_video0/max_brightness",
    #endif
    };

Caveat: I don't know why yet, but in order to make this work, acpi_video0 cannot
be present in the backlight directory, so acpi_backlight=vendor as a kernel parameter has to be stated during boot.

Only works in TTY and only 3 brightness steps

Currently on a macbook pro (mid 2010) using pommed because nvidia-bl is no longer working for some reason. The brightness keys don't seem to work at all unless i am in a TTY, they have no effect in GDM or the DE (cinnamon). However, if I adjust the brightness while in a TTY, the brightness change stays when switching back to cinnamon or GDM. Also, there are only 3 brightness steps, how can I have more steps, and why does it not work in cinnamon/GDM?

pommed -d output: https://haste.gradyn.com/95hE1YTuQK.makefile

Macbook Pro 8,2: keyboard evdev discarded

In line 51 of my log, you can find that the internal keyboard is discarded. This is because its product ID (0x0252) is not between the ones in evdev.h. Any idea why my product id is not in the list? Maybe it's a typo (0x0262 instead of 0x0252)?

Note: my keyboard has been replaced in the past, so this might be the reason why it's not "Wellspring V" but "Apple Internal Keyboard / Trackpad".

E: Could not map GMA950/GMA965 memory

DMI vendor name: [Apple Inc.]
DMI product name: [MacBook4,1]
System: Linux 3.16.3-gentoo-core2 x86_64
GMA950/GMA965 PCI resource: [/sys/bus/pci/devices/0000:00:02.0/resource0], length 1024K
E: mmap failed: Resource temporarily unavailable
E: Could not map GMA950/GMA965 memory
E: LCD backlight probe failed, check debug output
I: pommed v1.45lw Apple laptops hotkeys handler
I: Copyright (C) 2006-2011 Julien BLACHE [email protected]
pommed configuration:

  • General settings:
    fnmode: 1
  • sysfs backlight control:
    initial level: -1
    step: 1
    on_batt: 6
  • ATI X1600 backlight control:
    initial level: -1
    step: 10
    on_batt: 80
  • Intel GMA950 backlight control:
    initial level: 0xffffffff
    step: 0xf
    on_batt: 0x40
  • nVidia GeForce 8600M GT backlight control:
    initial level: -1
    step: 1
    on_batt: 6
  • Audio volume control:
    card: default
    initial volume: -1
    step: 10%
    beep: yes
    volume element: PCM
    speaker element: Front
    headphones element: Headphone
  • Keyboard backlight control:
    default level: 100
    step: 10
    auto on threshold: 20
    auto off threshold: 40
    auto enable: yes
    idle timer: 60s
    idle level: 0
  • CD eject:
    enabled: yes
    device: /dev/dvd
  • Beep:
    enabled: no
    beepfile: /usr/share/pommed/goutte.wav
  • Apple Remote IR Receiver:
    enabled: no
    I: DMI machine check: running on a MacBook4,1

Support for MacBookPro 9,2

Hi!

Is it possible to add support for MacBookPro 9,2? I made a fork and tried, however, I get the following error: "E No suitable event devices found". I get that the changes I made (basically just add a new Enum-value and a strcmp) are not enough. What is needed to make it work?

Best regards,
Isak

Crash on Macbook Air -08 "Could not map GMA950/GMA965 memory"

Debug output: http://pastebin.com/1xwMwe59

The relevant error:
E: mmap failed: Resource temporarily unavailable
E: Could not map GMA950/GMA965 memory
E: LCD backlight probe failed, check debug output

Running on Linux 3.8.11, (Arch Linux with systemd).

It used to work a few months ago when I last used linux on this machine, but I could not say which version.

Also tried the pommed arch packages pommed and pommed-git, but they give the same error.

LCD backlight probe fails on boot but not on restart

I enabled the pommed.service but it fails (only) after boot:

E: sysfs backlight probe failed, no fallback for this machine
E: LCD backlight probe failed, check debug output

But if I systelctl restart pommed, pommed starts and runs good.

Otherwise, when nvidia-bl is installed (with apple_bl kernel module disabled), pommed does not crash after boot but the screen backlight Fx keys (and only them) have no effect.

fullsizeoutput_61a

PS : Et merci pour le travail fourni jusqu'ici ! 👍

Unknown Apple machine: MacBookPro11,5

/usr/bin/pommed -d
I: pommed v1.45lw Apple laptops hotkeys handler
I: Copyright (C) 2006-2011 Julien BLACHE [email protected]
pommed configuration:

  • General settings:
    fnmode: 1
  • sysfs backlight control:
    initial level: -1
    step: 1
    on_batt: 6
  • ATI X1600 backlight control:
    initial level: -1
    step: 10
    on_batt: 80
  • Intel GMA950 backlight control:
    initial level: 0xffffffff
    step: 0xf
    on_batt: 0x40
  • nVidia GeForce 8600M GT backlight control:
    initial level: -1
    step: 1
    on_batt: 6
  • Audio volume control:
    card: default
    initial volume: -1
    step: 10%
    beep: yes
    volume element: PCM
    speaker element: Front
    headphones element: Headphone
  • Keyboard backlight control:
    default level: 100
    step: 10
    auto on threshold: 20
    auto off threshold: 40
    auto enable: yes
    idle timer: 60s
    idle level: 0
  • CD eject:
    enabled: yes
    device: /dev/dvd
  • Beep:
    enabled: no
    beepfile: /usr/share/pommed/goutte.wav
  • Apple Remote IR Receiver:
    enabled: no
    DMI vendor name: [Apple Inc.]
    DMI product name: [MacBookPro11,5]
    E: Unknown Apple machine: MacBookPro11,5
    E: Unknown Apple machine

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.