19

I have a b+, and raspbian is installed. The reason I am using raspbian rather than Raspbmc, OpenELEC, or XBian is that I want to use this b+ to do other things (GPIO related and so on) as well as to use it as a movie player.

environments

I use a regular micro USB cable about 50cm long, and I use self-powered USB hub 5v2.3A. It was just about 5v when I checked one of the ports with a multimeter.

$ uname -a
Linux tvbox 3.18.3+ #741 PREEMPT Fri Jan 23 13:32:52 GMT 2015 armv6l GNU/Linux

$ sudo /opt/vc/bin/vcgencmd version
Jan 22 2015 00:08:14
Copyright (c) 2012 Broadcom
version 2433779e6b2d922c3d1fff6101413156e7db747c (clean) (release)

$ cat /boot/config.txt | grep gpu_mem
gpu_mem_512=192

$ free
             total       used       free     shared    buffers     cached
Mem:        315700     222636      93064          0      18812     121836
-/+ buffers/cache:      81988     233712
Swap:       102396          0     102396

$ sudo rasp-config  # overclock -> None   700MHz ARM, 250MHz core, 400MHz SDRAM, 0 overvolt

how I installed kodi may not be exactly as below, but I at least used apt-get to install it, and the version is 14.0.

$ sudo add-apt-repository ppa:team-xbmc/ppa
$ sudo apt-get update
$ sudo apt-get install kodi
$ kodi --version
14.0 Git:ad747d9 Media Center Kodi
Copyright (C) 2005-2013 Team Kodi - http://kodi.tv

This installation created kodi user that I can't login. There is a home directly for kodi.

$ cat /etc/default/kodi
# Set this to 1 to enable startup
ENABLED=1

# The user to run Kodi as
USER=kodi

# Adjust niceness of Kodi (decrease for higher priority)
NICE=-5

I set ENABLED=1 and it automatically shows KODI(xbmc) on my TV if I have HDMI connected.

problem

and here's the problem. If I boot this up, it shows kodi up on my TV, but I see no mouse pointer, or keyboard won't function.

I confirmed the same mouse and keyboard worked fine under my own user id (login then startx). For some reasons, under user "kodi" mouse and keyboard seem to be not recognised. The kodi yellowish big mouse pointer won't even show.

thing I tried

I searched for solutions, and people were saying it's the power source. Since I am using USB hub 5v2.3A, I think this is enough. Then I checked the actual voltage at PP3 and PP7

http://cdn.shopify.com/s/files/1/0315/6117/products/raspberry-pi-model-b-plus-3_grande.jpg?v=1405340813

with keyboard, mouse, wifi dongle, it was around 4.8v
with mouse only, it was 4.9v

Even when it was 4.9v, kodi didn't show mouse pointer, and I could control none.

how to solve?

If there is anybody who could run kodi on a b+ raspbian, please let me know.

Thanks

1
  • I had the same issue but didn't found your question until now (and it was by chance). May I suggest to change the title of the question to something like "kodi hangs when run as the kodi user"?
    – YSC
    Feb 23, 2016 at 13:07

3 Answers 3

19

I found the answer myself.
http://www.raspberrypi.org/forums/viewtopic.php?f=91&t=96151&p=668943

The point is you edit /etc/udev/rules.d/10-permissions.rules file.

$ sudo nano /etc/udev/rules.d/10-permissions.rules

you add these lines in the file

# input
KERNEL=="mouse*|mice|event*",   MODE="0660", GROUP="input"
KERNEL=="ts[0-9]*|uinput",      MODE="0660", GROUP="input"
KERNEL=="js[0-9]*",             MODE="0660", GROUP="input"

# tty
KERNEL=="tty[0-9]*",            MODE="0666"

# vchiq
SUBSYSTEM=="vchiq",  GROUP="video", MODE="0660"

then you check which groups kodi user is in.

$ id kodi 
uid=108(kodi) gid=65534(nogroup) groups=65534(nogroup),5(tty),29(audio),44(video),46(plugdev)

I think you won't see input group there. so you add it to kodi

$ sudo usermod -a -G input kodi

$ id kodi 
uid=108(kodi) gid=65534(nogroup) groups=65534(nogroup),5(tty),29(audio),44(video),46(plugdev),999(input)

and go back to this kodi auto enable file, and make sure ENABLED=1 just like in the question above.

$ cat /etc/default/kodi

You can now reboot, then you should see kodi gets up on your TV, and your mouse and keyboard are functioning as they should.

12

I found this searching for a similar problem with a fresh Raspberry Pi 2. I'm using Raspbian and installed Kodi from the default repo (simple: apt-get install kodi).

All that was needed to get the keyboard working in my case was:

sudo usermod -a -G input kodi

and reboot.

5

Change user from kodi to pi in /etc/default/kodi file.

EDIT

If you install Kodi with apt-get install kodi, it creates a new user Kodi which does not have permissions to use keyboard/mouse. You can change by which user Kodi is launched in /etc/default/kodi file. Raspbian has user pi with all required permissions so easiest fix is to run Kodi with user pi.

2
  • 1
    While this may technically answer the question, it would be better to include some explanation as to what exactly it does. Jun 24, 2015 at 14:38
  • 1
    this answer is simpler and better: the "remote control" didn't work in @kukrt answer
    – franck
    Jul 8, 2016 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.