GentooThis forum is for the discussion of Gentoo Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have installed Gentoo on a macbook air 2013 model. This is not the first install of Linux that has been on this computer but I seam to be having some problems with systemd now and brightens keys. First of all the brightness control for the keyboard and the backlight both dont work when not in a window manager. I suspect this is normal.
However after I launch X windows and attempt to use the keys the window manager is freezing and you can no longer interact with the desktop. This only seams to occur with enlightenment and xfce4 (these are the only ones tested currently compiling gnome to see if problem still occurs). Blackbox for example does not have this issue but that is a very minimal window manager that does not attempt to manage the backlight.
The system is not frozen as I can pop over to another virtual terminal via the ctrl alt f6 method and terminate the X process.
I checked the system logs via the journalctl function but it shows me nothing of value. There is a CPU error with pipe underrun error but I suspect that is a problem with the custom backlight driver that you have to run on this computer so that suspend resume brightness is not broken. I am currently running kernel 4.0.4 and have also tested with the gentoo kernel sources and still the same issue occurs.
Some things to note;
I have had gentoo recently on this same computer and was running OpenRC and did not have this problem. I have also had Ubuntu 15 on this computer and it is running systemd and I was not having this problem in unity as I was able to change the brightness of the screen or the keyboard without problem.
I am not sure how exactly systemd handles the events that are generated from pressing either of these keys and how they are processed by the system to be causing the windows manager hang like this it really is a mystery and the journal logs are not giving me much info to work with.
Any suggestions or possible ways I get get more info would be very much appreciated.
I am not sure how exactly systemd handles the events that are generated from pressing either of these keys and how they are processed by the system to be causing the windows manager hang like this it really is a mystery and the journal logs are not giving me much info to work with.
systemd doesn't handle this keys at all, it is always one of the DE's programs that do that. On XFCE, for example, it is xfce4-power-manager that handles these settings. Where your USE flags for xfce4-power-manager the same when running OpenRC instead of systemd?
I disabled and masked the systemd-brightness@devicename.service files and rebooted the system. After this I no longer got freezes when using the brightness keys for the keyboard and backlight. I suspect that what is going on is the window manager DE is trying to set the new brightness setting and systemd is trying to update its info as these services restore brightness only from what I read and there is a infinite loop occurring or some other invalid call is occurring.
You are correct tho that systemd does not control the brightness but it does save and restore the levels on boot and shutdown. I suspect its just bad code and other distributions mask the service as its probably buggy. That or its possible that my hardware just does not like the way systemd is trying to update data ( possibly trying to write to nvram )
FYI - I did attempt to upgrade to the newest version of systemd by putting in a package.accept.keyword for systemd ~amd64 but it did not reslove the problem.
That is weird, I never masked that service and it just worked for me using xfce4-power-manager (though I am not using that anymore, a power-manager without an option to shutdown the system is just weird), but maybe it is just an incompatibility with your hardware. It may help to report that bug so that it get fixed upstream.
I would report it to the systemd guys but I worry that it will just be ignored because I cannot give them any useful data ( logs, dmesg data, etc ). All I get is a buffer underrun error that I think is semi related with the custom backlight driver.
Its also possible that I am missing something from my kernel .config that is causing it as well.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.