Giter Site home page Giter Site logo

Comments (10)

bytbox avatar bytbox commented on July 23, 2024

This is most likely a change in the kernel, since I haven't made any significant changes in the last few months. (Not that there aren't any that should be made, but I'm too lazy.) Thanks for the bug report - I'll get on it in a few days most likely.

from pommed-light.

JKAbrams avatar JKAbrams commented on July 23, 2024

Yeah, a kernel change is my suspicion too as it crashes in the same way in the original version of pommed.
Let me know if I can be of any assistance, with logs or testing or the sort.
(I could also try my hand at the code if you give me a few pointers as to were to look.)

from pommed-light.

JKAbrams avatar JKAbrams commented on July 23, 2024

Possibly related (from dmesg):
[ 32.623787] pommed:227 conflicting memory types 90000000-90100000 uncached-minus<->write-combining
[ 32.623793] reserve_memtype failed [mem 0x90000000-0x900fffff], track uncached-minus, req uncached-minus

from pommed-light.

JKAbrams avatar JKAbrams commented on July 23, 2024

The error is generated on line 138 in the file gma950_backlight.c the offending line:
memory = mmap(NULL, length, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);

The error from mmap, "Resource temporarily unavailable", I think is EAGAIN, which according to the manpage (http://man7.org/linux/man-pages/man2/mmap.2.html) has two causes:

  1. The file has been locked
  2. Too much memory has been locked (see setrlimit(2)).
    I tried to run the command
    ulimit -l unlimited
    before running pommed-light to get around no 2 but that did not work, which leaves me to think it is no 1 that is at fault, the memory is locked. Now what could be locking the memory? As it turns out, the backlight controls does already work on never kernels, without pommed, so my thinking is that it is this new driver that locks the memory. If so, a workaround to the problem would be to simply drop the backlight-feature of pommed for GMA950.

from pommed-light.

JKAbrams avatar JKAbrams commented on July 23, 2024

Ok, tried it now and it works fine, what I did was essentially blank gma950_backlight.c (http://pastebin.com/J2CRqMzG).
From reading pommed.conf.mactel it sounds to me that it is supposed to work even if the kernel is taking control of the lcd-backlight, is the bug than that it doesn't fail gracefully?
Give me a shout if you want help in testing any real solution. For now I'm just happy to have me F-keys back and the keyboard backlight working again!

from pommed-light.

bytbox avatar bytbox commented on July 23, 2024

The error message reported above happened even when pommed was started manually, rather than from systemd on boot, right? (The bug reported by rekoil would be related if not, so just making sure.)

from pommed-light.

JKAbrams avatar JKAbrams commented on July 23, 2024

bytebox: Yes it happens every time no matter how it is started, so not a systemd issue.
(Sorry about the slow reply, being on the road internet access is a bit spurious.)

from pommed-light.

JKAbrams avatar JKAbrams commented on July 23, 2024

This came back to bite me on 1.47.
However, I found that now (at least for this machine, a trusty early 2008 Macbook Air with KDE 4.14 on Linux 3.16.1), the Linux driver support is now complete:

  • screen backlight
  • keyboard backlight
  • keyboard *
  • not sure about the beeping as I've never used it

So instead of messing with the sourcecode of pommed-light, I find that I no longer need it.
Thanks for providing me with a solution until the Linux drivers came up to speed.

*FN-keys can be switched to function-keys (F1-F12) by adding this line to /etc/modprobe.d/hid_apple.conf:

options hid_apple fnmode=2

from pommed-light.

JKAbrams avatar JKAbrams commented on July 23, 2024

I'm back to using Pommed-light since I found the long term support kernel (version 3.14.51) dont have such severe sleeping problems with the Macbook Air.
As the driver provides /sys/class/backlight/intel_backlight/brightness i rewrote gma950_backlight.c to use that interface in place of the direct memory acces that does not work.
Here it is: http://pastebin.com/y07uArZu

I've tested it and it works on my system.
What would be needed for a proper solution would be a test to select the right method. I guess that test should test for old versions of the graphic driver.

from pommed-light.

cockroach avatar cockroach commented on July 23, 2024

I had the same issue on a first-gen Macbook Air with kernel 4.5.0 and the patch seems to fix it.

from pommed-light.

Related Issues (18)

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.