Systemd: some services starting too early and then failing
Hello everyone,
I freshly installed Arch on this new laptop (Asus Zenbook Prime UX32VD) and from the start, I wanted to have a pure systemd setup. I'm using services only and I've uninstalled initscripts and so far it's working relatively well.
However, some services seem to start too early by default and the workarounds are unsatisfactory.
Problem 1: asus-screen-brightness and asus-kbd-backlight
On this lap top, the stock screen brightness buttons do not work (yet). A script and a service file (which are both available via the asus-screen-brightness AUR package) have to be used to allow users to change the brightness via the script. The problem is, with that service enabled, it only succeeds sometimes. About have of the time booting the laptop it fails, most likely because the necessary nodes in /sys/ do not exist yet. Restarting the service manually after booting does the trick:
[root@tachychineta shapeshifter]# sc status asus-screen-brightness
asus-screen-brightness.service - Allow user access to screen brightness
Loaded: loaded (/etc/systemd/system/asus-screen-brightness.service; enabled)
Active: active (exited) since Fri, 12 Oct 2012 11:23:44 +0200; 1min 1s ago
Process: 320 ExecStart=/usr/bin/asus-screen-brightness allowusers (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/asus-screen-brightness.service
Oct 12 11:23:44 tachychineta systemd[1]: Starting Allow user access to screen brightness...
Oct 12 11:23:44 tachychineta sudo[349]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/chmod g+w /sys/class/backlight/intel_backlight/brightness
Oct 12 11:23:44 tachychineta sudo[349]: pam_unix(sudo:session): session opened for user root by (uid=0)
Oct 12 11:23:44 tachychineta asus-screen-brightness[320]: cat: /sys/class/backlight/intel_backlight/max_brightness: No such file or directory
Oct 12 11:23:44 tachychineta asus-screen-brightness[320]: /usr/bin/asus-screen-brightness: line 8: /10: syntax error: operand expected (error token is "/10")
Oct 12 11:23:44 tachychineta asus-screen-brightness[320]: /usr/bin/asus-screen-brightness: line 10: 2*: syntax error: operand expected (error token is "*")
Oct 12 11:23:44 tachychineta asus-screen-brightness[320]: cat: /sys/class/backlight/intel_backlight/brightness: No such file or directory
Oct 12 11:23:44 tachychineta asus-screen-brightness[320]: chgrp: cannot access ‘/sys/class/backlight/intel_backlight/brightness’: No such file or directory
Oct 12 11:23:44 tachychineta asus-screen-brightness[320]: chmod: cannot access ‘/sys/class/backlight/intel_backlight/brightness’: No such file or directory
Oct 12 11:23:44 tachychineta systemd[1]: Started Allow user access to screen brightness.
[root@tachychineta shapeshifter]# sc restart asus-screen-brightness
[root@tachychineta shapeshifter]# sc status asus-screen-brightness
asus-screen-brightness.service - Allow user access to screen brightness
Loaded: loaded (/etc/systemd/system/asus-screen-brightness.service; enabled)
Active: active (exited) since Fri, 12 Oct 2012 11:25:28 +0200; 2s ago
Process: 2547 ExecStop=/usr/bin/asus-screen-brightness disallowusers (code=exited, status=0/SUCCESS)
Process: 2579 ExecStart=/usr/bin/asus-screen-brightness allowusers (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/asus-screen-brightness.service
Oct 12 11:25:28 tachychineta systemd[1]: Starting Allow user access to screen brightness...
Oct 12 11:25:28 tachychineta sudo[2593]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/chgrp users /sys/class/backlight/intel_backlight/brightness
Oct 12 11:25:28 tachychineta sudo[2593]: pam_unix(sudo:session): session opened for user root by (uid=0)
Oct 12 11:25:28 tachychineta sudo[2597]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/chmod g+w /sys/class/backlight/intel_backlight/brightness
Oct 12 11:25:28 tachychineta sudo[2597]: pam_unix(sudo:session): session opened for user root by (uid=0)
Oct 12 11:25:28 tachychineta systemd[1]: Started Allow user access to screen brightness.
Exactly the same problem occurs with asus-kbd-backlight.service which is needed to allow users to control the keyboard backlight. It also fails because of missing /sys/ entries if started too early.
Problem 2: automatic login & X11
I use the method described on the wiki to autologin into TTY1 with my user and my .bash_profile contains
[[ $(fgconsole) = 1 ]] && startx
and my .xserverrc is configured as explained in this fantastically useful article by falconindy.
This way, X starts automatically and my session is properly authenticated for things like udiskie. I'm not using [testing] but instead rebuilt polkit with --enable-systemd and it's working just fine. The problem is, just like in problem 1, Xorg fails to start every now and then, failing with
(EE) No devices detected.
I don't have a full log because it hasn't happened in a while, but I'm very certain it's because the chipset isn't ready, yet.
Solutions?
I added "i915" to /etc/modules-load.d/static.conf hoping that would cover both the Xorg and backlight problems but it doesn't help. I then tried adding i915 to my MODULES in mkinitcpio.conf and rebuilding the initramfs and at least it looked like that way the problems went away but it added about 4 seconds to the time spent by the "kernel" during boot which is quite unacceptable. (Plots with and without i915 in MODULES).
I read the systemd.unit and systemd.service man pages but I can't find a way to speficy required kernel modules for a service file. I'm not sure if specifying the modules in /etc/modules-load.d shouldn't be enough (because apparently it's supposed to load for sysinit.target, which is early) but apparently it isn't.
Any ideas how I can get these services to work properly without sacrificing too much boot time?
Thank you
Last edited by Shapeshifter (2012-10-12 10:20:09)
Please fill a bug report.
Similar Messages
-
Recording starting too early and also ending too e...
Another problem.....
When recording programmes I am frequently finding that the recording is starting way too early...5-10 minutes....and often ends too early (very annoying as one misses the end of a particular programme).
Any help, gratefully received!
ThanksRecording should start 2 minutes before the scheduled start time and end 5 minutes after the scheduled stop time (by default - you can increase this).
The box won't automatically cope with programmes which start late. Are the programmes you're having a problem with starting on time?
Is the time displayed on the box correct? -
My LabVIEW exe starts to run and then stops in Windows 7
I have built an executable in LabVIEW 2010 on a Windows XP machine and set the properties to be built for Windows 7 or later but when I try to run the exe on the Windows 7 machine the application starts up briefly and then stops running with no error message. Has anyone seen this? I have disabled the firewall on the Windows 7 machine.
Hi Wassa,
It's very strange that your application window opens and then slowly fades away while "LabVIEW shuts down." Can you first verify that the VI itself runs properly on the development machine? Can you then build a .EXE and ensure that it too runs properly on the development machine? If we can get the .EXE working on the development machine you have two deployment methods:
1. If you are deploying to a computer that already has the LabVIEW Run-Time Engine and any additional drivers required for your application, then you simply need to copy the .EXE to the deployment machine
2. If you are deploying to a fresh computer that has no NI software, you'll need to create an installer. When creating the installer, you will need to look through the 'Additional Installers' sections and select any of the additional drivers etc. that are required for your application. By default, LabVIEW only includes the Run-Time Engine. If you are missing any of the 'Additional Installers,' the application will not run properly.
Sanjay C.
Embedded Software Product Manager| National Instruments -
I upgraded to mountain lion a week ago and now on startup of my macbook pro, microsoft excel and word start up automatically and then crash? very strange can anyone please help? I have checked the login items under users and groups and there is nothing.
Are you using the Office for Mac 2011 version, as you need to do? The Office for Mac 2004 is Not at all compatible with Mountain Lion, and the 2008 version has been noted to have some problems running with ML.
Hope this helps -
i cannot able able to start my macbook and then i started my mac in a recovery mode now mac os X utility window opens with 4 options 1. Restore From Time Machine Backup 2. Reinstall Mac OSX 3. Get Help Online 4. Disk Utility if i try to restore my mac with time machine no option appears if i reinstall from Mac OSX error comes and cannot able to recover from disk utility please help how can i reinstall mac OSX
Guitar21,
your MacBook Pro has booted into its Recovery mode. From the OS X Utilities menu, select Disk Utility. On the left-hand side of the Disk Utility window, select your internal disk’s boot partition (typically called “Macintosh HD”). On the right-hand side, press the Verify Disk button if it’s not greyed out; if it is greyed out, or if it reports that errors were found, press the Repair Disk button. Once the verification/repair is completed, exit Disk Utility and select Restart from the Apple menu to restart in normal mode. Does it get to the login screen now? -
I changed my password for itunes and it won't update my apps. It starts to update and then stops. Can anyone help?
I changed the password using my phone.
I have not logged into my computer yet, but I will try that next. Thanks so much for the input and help. -
my screen cuts out half way of opening it but comes back on when i start to close and then very slowly and little bit at a time it stays on why
Could be a bad inverter cable, that's a classic symptom.
-
I've can't open any applications on my Mac ! I tried to delete some files from safari (history) and then none of the apps including iphoto, safari, mail, facetime. I don't know how to fix it, help ? any idea ?
Please read this whole message before doing anything.
This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, or by a peripheral device.
Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
Safe mode is much slower to boot and run than normal, and some things won’t work at all, including sound output andWi-Fi on certain iMacs. The next normal boot may also be somewhat slow.
The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test. -
When I try to download a song or a video on my ipad it starts to download and then before it finishes it stops and says download error. Tap to retry. Any suggestions on how to fix this error and get my items that I purchased to download?
MacBook Airs won't run Classic.
iTunes errors may best be isolated by one of the iTunes forums below:
https://discussions.apple.com/docs/DOC-2463 -
my macbook is running very slowly with the internet. It starts off ok and then slows down - any suggestions?, my macbook is running very slowly with the internet. It starts off ok and then slows down - any suggestions?
How much free disk space do you have and how much memory do you have, running which operating system? Need that information to have any basis to make recommendations.
-
When I open Photoshop Elements 12 it starts to load and then never open the workspace then will not load at all unless I reboot. ?
When I open Photoshop Elements 12 it starts to load and then never open the workspace then will not load at all unless I reboot. ?
-
Tried opening my Mac in safe mode SMS mode. And pram mode. It acts like it is going to start up the gets about 10 percent through the grey start up box and then shuts down. Any other thoughts? Thanks
Douglaslouis,
which model Mac do you have, and which version of OS X is installed on it? -
TV shows and Movies won´t start, only loading and then nothing
Suddenly TV Shows and Movies won´t start on my Apple TV. After purchasing, it starts to load and then nothing. It loads for a few minutes and it says it was "unsuccesfull". I have tried to restart the Apple TV and the WiFi. Please help!
Hi ChristineLunde,
Welcome to the Support Communities!
The article below may be able to help you with this.
Click on the link to see more details and screenshots.
Apple TV (2nd and 3rd generation): Troubleshooting Wi-Fi networks and connections
http://support.apple.com/kb/TS4546
I hope this information helps ....
Happy Holidays!
- Judy -
help my photoshop wont upload on my laptop it starts and then fails, i removed the firewall and it still fails
Photoshop version, OS and version, and system information?
Benjamin -
When I try to work with some photos Imovie gets stuck and then it stops to work at all. It happens only with some specific photos,is there a way to repair them?I can't go on this way,help me please
Hi,
The movie is probably MPEG format.
QuickTime Pro and iMovie cannot transcode audio contained in MPEG movies.
Try to convert with SimpleMovieX or MPEG Streamclip instead.
http://www.aeroquartet.com/SimpleMovieX/
http://www.squared5.com
Regards, BJ
Maybe you are looking for
-
Printing Issue on a MacPro and Lion
When using any Apple prgram, such as Pages, Numbers, Text, etc. and I try to print to my laser printer from my MacPro I get an error and the following message: You don't have permission to write to the folder that the file "Untitled" is in. You can d
-
My Magic Jack is not working properly. I can make a call and the person I have called can hear me but I can't hear them. What can I do to fix this?
-
Video not showing in WMP ActiveX control
Trying to play an MP4 in Windows Media Player and I get a black control and WMP acts as if it is playing. The MP4 does not have audio but other posts have suggested this is not affected by this issue. I have tried all of the various solutions from
-
Imovie from iLife 08 will not launch in Leopard
please help..it's the only reason I bought iLife 08: Process: iMovie [133] Path: /Applications/iMovie.app/Contents/MacOS/iMovie Identifier: com.apple.iMovie7 Version: 7.0 (471) Build Info: iMovieApp-4710000~2 Code Type: X86 (Native) Parent Process: l
-
Include Server Content in Test object
We are currently including server content in Learning objects, which works very well. It is an HTML file which runs a simulation. I would like to know what is the best way to include this as a test. I would like to create a test, which has the HTML s