• 1
  • 4
  • 5
  • 6
  • 7(current)
  • 8
How to make XBMC shutdown Linux?
#91
Zemy: There are a few errors in your sudoers file.

1. Check the paths in Cmnd_Alias SHUTDOWN_CMDS ("/user" doesn't exist for one) and in Debian shutdown is at /sbin/shutdown. Not sure about Ubuntu.
2. The last two lines aren't quite right (I don't know if the order matters, but you have syntax errors in there as well). Replace them with:

xbmc ALL=(ALL) ALL # XBMC
xbmc ALL=NOPASSWD: SHUTDOWN_CMDS, MOUNT_CMDS # XBMC
Reply
#92
With the risk of appearing arrogant...I see a few method errors that makes life hard for a few people here

1) The installation procedure is important. I mean ALL the steps. Someone that have this working have to prepare a installation guide. Then you need to follow that in DETAIL instead of random troubleshooting in a system you have no understanding of. Have you put this question to yourself?: Is it really random that solution A works for for him but not for me? Instead of looking for the next solution make sure you did not do something wrong AND that you started from the same staring point as he did.

2) Testing. OK, the purpose of the sudoer file is to make it possible to use sudo for one or many commands without password question. You need to test this in terminal. Forget about xbmc until it is working in terminal.

3) Precision.
Ok, computers tends to be bit stupid. If you edit something like the sudoer you have to do it EXACLY right. Do not enter crap that looks a bit like somthing your friend told you about. What do you expect? Copy/paste someone?
Reply
#93
vikjon0 Wrote:With the risk of appearing arrogant...I see a few method errors that makes life hard for a few people here

1) The installation procedure is important. I mean ALL the steps. Someone that have this working have to prepare a installation guide. Then you need to follow that in DETAIL instead of random troubleshooting in a system you have no understanding of. Have you put this question to yourself?: Is it really random that solution A works for for him but not for me? Instead of looking for the next solution make sure you did not do something wrong AND that you started from the same staring point as he did.

2) Testing. OK, the purpose of the sudoer file is to make it possible to use sudo for one or many commands without password question. You need to test this in terminal. Forget about xbmc until it is working in terminal.

3) Precision.
Ok, computers tends to be bit stupid. If you edit something like the sudoer you have to do it EXACLY right. Do not enter crap that looks a bit like somthing your friend told you about. What do you expect? Copy/paste someone?

Fully agree with above. Taking some a bit from some advise and another from somewhere else ends to total mess with no way out. So many of us are trying to solve out the procedure. If someone has capability to provide a guide of his working solution it would be great.
The hardware used also should be mentioned as there may be differences in some parts and then it would be some logical chances to figure it out.

We should also remember that many of us are using latest unstable releases of XBMC on latest operating systems and that provides more challenges.
But still it is the way to go to improve the best media center solution ever seen.
Today I will give up...and tomorrow start again from the beginning..

Br, Zemy
Reply
#94
Quote: many of us are using latest unstable releases of XBMC
This is key. Stable or nightly? Since officiall stable do not exist in PPA how did you get it?
I guide would for stable on natty would be a first step. Last weekend I wanted to give it a try but it did not want to play with vmware...might try again later.
Reply
#95
lukamus Wrote:Zemy: There are a few errors in your sudoers file.

1. Check the paths in Cmnd_Alias SHUTDOWN_CMDS ("/user" doesn't exist for one) and in Debian shutdown is at /sbin/shutdown. Not sure about Ubuntu.
2. The last two lines aren't quite right (I don't know if the order matters, but you have syntax errors in there as well). Replace them with:

xbmc ALL=(ALL) ALL # XBMC
xbmc ALL=NOPASSWD: SHUTDOWN_CMDS, MOUNT_CMDS # XBMC

Thanks again lukamus,
that fixed the permission problem and commands are accepted without passwords in tty. So some progress achieved. From XBMC still no luck.
Also loosing the remote with pm-suspend (done via tty) so I have to resume from kb. There was some other thread about this..I have to check.
Maybe I should do a new clean install to wipe the mess.
Reply
#96
Yeah, same problem with natty here. I can run sudo shutdown, sudo pm-suspend and sudo reboot from tty without having to enter password but when done via XBMC GUI I end up with black screen and cursor.
Reply
#97
macel Wrote:Yeah, same problem with natty here. I can run sudo shutdown, sudo pm-suspend and sudo reboot from tty without having to enter password but when done via XBMC GUI I end up with black screen and cursor.

Yep i got the same problem. Black screen with a white cursor in the middle
Reply
#98
Once AGAIN. This is most likely problem with the yet-another-new way to launch X sessions uxlaunch

Check out http://forum.xbmc.org/showpost.php?p=804...stcount=52
Check out http://forum.xbmc.org/showpost.php?p=793...stcount=12
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#99
darkscout Wrote:Once AGAIN. This is most likely problem with the yet-another-new way to launch X sessions uxlaunch

Check out http://forum.xbmc.org/showpost.php?p=804...stcount=52
Check out http://forum.xbmc.org/showpost.php?p=793...stcount=12

Thanks, XBMC runs as local service on my box without having to make any changes.

I also tried the standalone approach but it cannot be installed on natty because of unmet dependencies (xbmc-data, xbmc-skin-confluence). I tried to manually install the packages but it also fails.

Code:
The following packages have unmet dependencies:
xbmc-standalone : Depends: xbmc-data (= 2:11.0~git20110405.774b886~ppa1~natty)
                   Depends: xbmc-skin-confluence (= 2:11.0~git20110405.774b886~ppa1~natty)
E: Broken packages
xbmc@XBMCLive:~$ sudo apt-get install xbmc-data
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
xbmc-data : Depends: xbmc-bin (< 2:11.0~git20110405.774b886~ppa1~natty.1~) but 2:11.0~git20110609.a1c38f5-0ubuntu1~ppa1~natty is to be installed
E: Broken packages
xbmc@XBMCLive:~$ sudo apt-get install xbmc-bin
Reading package lists... Done
Building dependency tree
Reading state information... Done
xbmc-bin is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Reply
@macel,
Yes that uxlaunch removing method way ends really to that situation..I have been there too. I did a clean install on Natty today and the result was:

- I can do suspend, reboot, shutdown from tty without entering password
- not a one of those work right from XBMC
- something is also wrong on Natty (or kernel) side for wakeup

I can see the IR-receiver in USB3 but in cat /proc/acpi/wakeup there is no USB3 listed at all. Hardware or bios settings have not been changed since working Lucid versions. Only USB0 and USB2 are listed.

Br, Zemy
Reply
Zemy and those with similar problems:
In natty (and newer kernels) you also have to enable wakeup ON the device itself.

Put
Code:
/bin/echo enabled > $(grep 006d /sys/bus/usb/devices/*/idProduct | cut -c-24)/power/wakeup
in your rc.local

Replace 006d with the product ID of your remote for example this is the output of my lsusb:
Code:
Bus 005 Device 002: ID 045e:[b]006d[/b] Microsoft Corp. eHome Remote Control Keyboard keys

This is the rest of my rc.local:
Code:
for i in LAN USB0 USB1 USB2 USB3;
do
    enabled=$(/bin/grep $i /proc/acpi/wakeup | grep disabled);
    if [ -n "$enabled" ]; then
        echo $i > /proc/acpi/wakeup
    fi
done


Quote:I tried to manually install the packages but it also fails.

Then purge xbmc-bin too and try again. Not sure if they're moving away from xbmc.

And honestly, you don't even need xbmc-standalone. This is all it installs:
Code:
x ./
x ./usr/
x ./usr/bin/
x ./usr/bin/xbmc-standalone
x ./usr/share/
x ./usr/share/xsessions/
x ./usr/share/xsessions/XBMC.desktop
x ./usr/share/doc/
x ./usr/share/doc/xbmc-standalone/
x ./usr/share/doc/xbmc-standalone/changelog.gz
x ./usr/share/doc/xbmc-standalone/copyright
x ./usr/share/man/
x ./usr/share/man/man1/
x ./usr/share/man/man1/xbmc-standalone.1.gz

xbmc-standalone is just a fancy script to an even fancier script /usr/bin/xbmc. As Mario once found out. "Our executibale is in another castle": /usr/lib/xbmc/xbmc.bin

http://forum.xbmc.org/showpost.php?p=804...stcount=53
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
Thanks darkscout,

I know that my IR-receiver is in USB3 (and can be found there;
/sys/bus/usb/devices/3-2:1.0/driver/module/drivers/usb:mceusb#)

Bus 003 Device 002: ID 0471:0815 Philips (or NXP) eHome Infrared Receiver
/sys/bus/usb/devices/3-2/idProduct:0815

Should I see the USB3 in cat /proc/acpi/wakeup...? I don´t.

xbmc@HTPC:~$ cat /proc/acpi/wakeup
Device S-state Status Sysfs node
SMB0 S4 *disabled pci:0000:00:03.2
USB0 S4 *disabled pci:0000:00:04.0
USB2 S4 *disabled pci:0000:00:04.1
US15 S4 *disabled pci:0000:00:06.0
US12 S4 *disabled pci:0000:00:06.1
NMAC S5 *disabled pci:0000:00:0a.0
PBB0 S4 *disabled pci:0000:00:09.0
HDAC S4 *disabled pci:0000:00:08.0
XVR0 S4 *disabled pci:0000:00:0c.0
XVR1 S4 *disabled
P0P5 S4 *disabled
P0P6 S4 *disabled pci:0000:00:15.0
P0P7 S4 *disabled pci:0000:00:16.0
P0P8 S4 *disabled pci:0000:00:17.0
P0P9 S4 *disabled pci:0000:00:18.0
PWRB S4 *enabled

After the suggested modifies to rc.local and reboot. Only enabled device
seems to be power button and it works.

Br, Zemy
Reply
Then maybe you should try plugging it into another USB port? Not all USB ports have power on suspend, not all USB ports let you resume from them. I'm guessing 1 & 3 are on the same separate chip.

lspci | grep USB
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
darkscout Wrote:Then maybe you should try plugging it into another USB port? Not all USB ports have power on suspend, not all USB ports let you resume from them. I'm guessing 1 & 3 are on the same separate chip.

lspci | grep USB

Thanks for the tip and sharing Your knowledge. Yes I have tried in several different ports. The port in which it usually has been connected was selected in early days with Lucid installation and it is suggested to use by Zotac for wakeup use. I did some googling with "ubuntu +natty +resume" and it seems that there is a lot problems with current kernels ang bugs open with various hardware mentioned. So I think going back with mini Lucid with has been reliable and easier to handle for my kind of "not a coder" guy. Maybe the bug fixes come out some day and then we don´t need to do so much tricks to get such obvious things like these power modes to work.

Thanks to all for Your help and nice attitude.

Br, Zemy
Reply
ok, cool.. thanks again. I removed xbmc-live and uxlaunch. After that I started xbmc manually from the tty and got shutdown commands working from the GUI. I just have no idea how to get XBMC start automatically without any of the xbmc-live and xbmc-standalone scripts.
Reply
  • 1
  • 4
  • 5
  • 6
  • 7(current)
  • 8

Logout Mark Read Team Forum Stats Members Help
How to make XBMC shutdown Linux?0