FS#41391 - [xbmc] Since the new xorg update, xbmc.service does not start
Attached to Project:
Community Packages
Opened by John (graysky) - Tuesday, 29 July 2014, 21:18 GMT
Last edited by Ike Devolder (BlackEagle) - Friday, 08 August 2014, 15:43 GMT
Opened by John (graysky) - Tuesday, 29 July 2014, 21:18 GMT
Last edited by Ike Devolder (BlackEagle) - Friday, 08 August 2014, 15:43 GMT
|
Details
Description: With the recent Xorg update, xbmc.service no
longer starts; the system just sits a the "Arch Linux
3.15.7-1-ARCH (tty1) login:" screen.
Additional info: * package version(s) 13.1-4 Journalctl after manually starting the service: Jul 29 17:16:05 atomic systemd-logind[222]: New session c3 of user xbmc. Jul 29 17:16:05 atomic systemd[837]: pam_unix(systemd-user:session): session opened for user xbmc by (uid=0) Jul 29 17:16:05 atomic systemd[837]: Starting Paths. Jul 29 17:16:05 atomic systemd[837]: Reached target Paths. Jul 29 17:16:05 atomic systemd[837]: Starting Timers. Jul 29 17:16:05 atomic systemd[837]: Reached target Timers. Jul 29 17:16:05 atomic systemd[837]: Starting Sockets. Jul 29 17:16:05 atomic systemd[837]: Reached target Sockets. Jul 29 17:16:05 atomic systemd[837]: Starting Basic System. Jul 29 17:16:05 atomic systemd[837]: Reached target Basic System. Jul 29 17:16:05 atomic systemd[837]: Starting Default. Jul 29 17:16:05 atomic systemd[837]: Reached target Default. Jul 29 17:16:05 atomic systemd[837]: Startup finished in 23ms. Jul 29 17:16:05 atomic sudo[836]: pam_unix(sudo:session): session closed for user root Jul 29 17:16:05 atomic gnome-keyring-daemon[844]: couldn't connect to dbus session bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 Jul 29 17:16:05 atomic xinit[835]: /usr/bin/Xorg.wrap: Only console users are allowed to run the X server Jul 29 17:16:05 atomic gnome-keyring-daemon[844]: couldn't connect to dbus session bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 Jul 29 17:16:20 atomic xinit[835]: /usr/bin/xinit: giving up Jul 29 17:16:20 atomic xinit[835]: /usr/bin/xinit: unable to connect to X server: Connection refused Jul 29 17:16:20 atomic xinit[835]: /usr/bin/xinit: server error Jul 29 17:16:20 atomic systemd[847]: pam_unix(login:session): session closed for user xbmc Jul 29 17:16:20 atomic dbus[223]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.6" (uid=420 pid=847 comm="(sd-pam ") interface="org.freedesktop.login1.Manager" member="ReleaseSession" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=222 comm="/usr/lib/systemd/systemd-logind ") Jul 29 17:16:20 atomic systemd[847]: pam_systemd(login:session): Failed to release session: Access denied Jul 29 17:16:20 atomic systemd[1]: xbmc.service: main process exited, code=exited, status=1/FAILURE Jul 29 17:16:20 atomic systemd[1]: Unit xbmc.service entered failed state. |
This task depends upon
Closed by Ike Devolder (BlackEagle)
Friday, 08 August 2014, 15:43 GMT
Reason for closing: Fixed
Additional comments about closing: xbmc.service will be removed
added link to wiki https://wiki.archlinux.org/index.php/Xbm c#Autostart_at_boot
Friday, 08 August 2014, 15:43 GMT
Reason for closing: Fixed
Additional comments about closing: xbmc.service will be removed
added link to wiki https://wiki.archlinux.org/index.php/Xbm c#Autostart_at_boot
$cat /etc/X11/Xwrapper.config
allowed_users = anybody
needs_root_rights = no
create /etc/systemd/system/getty@tty7.service.d/autologin.conf (with folders)
autologin.conf:
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin xbmc --noclear %I 38400 linux
edit /var/lib/xbmc/.bashrc
#
# ~/.bashrc
#
/usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/xbmc-standalone -- :0 -nolisten tcp
$ systemctl disable xbmc
$ systemctl enable getty@tty7
$ reboot (i did not test any other way, only control on my standalone system is IR remote and ssh )
xbmc is working again, note i'll try to find an other option which is simpler, but this works for now
/etc/X11/xorg.conf.d/15-nvidia.conf:
Section "Device"
Identifier "Nvidia Card"
Driver "nvidia"
VendorName "NVIDIA Corporation"
Option "NoLogo" "true"
#Option "UseEDID" "false"
#Option "ConnectedMonitor" "DFP"
EndSection
I did the workaround you suggested. It autologins in tty7 to xbmc, however I get the same error failure as if it was started by the systemd service file.
XORG prints an error on screen similar to the what it puts in the log if I start it with the service where it mentions that it can't open tty0 and then says connection refused, throwing me back to the console as user xbmc.
Any suggestions on what I may be doing wrong? Thanks
EDIT: Reverted to xorg-server 1.15 and this works both with the old and the new method.
""
The Xorg X server may need root rights to function properly. To start the Xorg X server with these rights your system is
using a suid root wrapper installed as /usr/bin/Xorg.wrap which will execute the real X server which is installed as
/usr/bin/Xorg.bin .
By default Xorg.wrap will autodetect if root rights are necessary, and if not it will drop its elevated rights before
starting the real X server. By default Xorg.wrap will only allow executing the real X server from login sessions on a
physical console.
""
1) Single line 'allowed_users = anybody' in /etc/X11/Xwrapper.config per Jo's comment.
2) /etc/X11/xorg.conf.d/20-nvidia.conf containing the text in Geron's post restored functionality for me.
Perhaps both can be mentioned in a post install scriptlet.
The systemd service file should be dropped if we can't find a clean way to do this without editing files in /etc.
"this also means that it must be launched from the same virtual terminal as was used to log in" - ,
but I tried it. It didn't work.
needs_root_rights = yes|no|auto
Configure if the wrapper should drop its elevated (root) rights
before starting the X server. Use yes to force execution as root,
no to force execution with all suid rights dropped, and auto to
letter the wrapper auto-detect. The default is auto.
It seemed to me to restore previous behavior, "needs_root_rights" need to be set to "yes" not "no" as Jackson Alley (jalley) stated in the first post. (I did try "no", and it didn't work. I was given a permission error)
After doing that it works fine, but I obviously don't feel good disabling new more secure xorg-server features.
Btw, I don't see how it would be possible to run startx from an ssh session without this work around.
$ cat /etc/X11/Xwrapper.config
allowed_users = anybody
needs_root_rights = yes
With "allowed_users = anybody" and (without setting needs_root_rights or with "needs_root_rights = no") I get this error:
(EE) Fatal server error:
(EE) xf86OpenConsole: Cannot open virtual console 2 (Permission denied)
Which is the behavior I would expect.
I am assuming you are using the proprietary nvidia driver from an earlier comment. Maybe that has something to do with it.
However, I had to append vt$XDG_VTNR to the line in .bashrc resulting in:
/usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/xbmc-standalone -- :0 -nolisten tcp vt$XDG_VTNR
That got rid of the tty0 error Wasser described
Blatant forum post self-promotion:
https://bbs.archlinux.org/viewtopic.php?id=185216
This would be IMHO the cleanest solution, with the least amount of dependencies (if one uses the lightdm gtk2 greeter).
Of course, when systemd and X get along better, as explained here:
https://wiki.archlinux.org/index.php/Systemd/User#Xorg_as_a_systemd_user_service
all this will probably be superceded anyway. I think work in this direction is partly being investigated here (this particular solution relying on the PAM runuser configuration files):
https://bugs.archlinux.org/task/37644
"Please note that launching X through a login-manager (gdm, kdm, ...) doesn't yet provide rootless access." - https://www.archlinux.org/news/xorg-server-116-is-now-available/
A display manager with auto login is defeating rootless access anyway, which is no better than a few changes in /etc/X11/Xwrapper.config.
The intended purpose of this bug report is fix the xbmc package. Having the xbmc package depend on a display manager and apply auto login setting is a bit ridiculous.
https://bugs.archlinux.org/task/41391#comment125851 is a working solution, but I bet the maintainers are looking for a better solution.
The current work around is to edit /etc/X11/Xwrapper.config which lets the xbmc service in the package work fine.
Since you are wanting a display manager with auto login, having a look at this might help you https://bbs.archlinux.org/viewtopic.php?id=185216 . (nevermind, you have seen this link)