User Tools

Site Tools


kodi:kodi-nuc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
kodi:kodi-nuc [2021/11/03 22:22] Wulf Rajekkodi:kodi-nuc [2024/05/05 23:06] (current) Wulf Rajek
Line 1: Line 1:
-====== Kodi NUC setup ======+====== Kodi NUC main setup ======
  
-KODI INSTALL\\ +===== BIOS SETTINGS ===== 
 +Enter bios: 
 +<code>systemctl reboot --firmware-setup</code> 
 +Set SGX to Enabled in BIOS to avoid boot message relating to it. (can possibly be set by software https://github.com/intel/sgx-software-enable ) 
 +Set Fan control to custom with fanless at 48C, min 75, 30% at 1C, min 65 for RAM.
  
-Main instructions from [[https://forum.kodi.tv/showthread.php?tid=231955|here]]\\+Suggested Custom Fan Control Mode: 
 +Primary Temperature Sensor to Processor, Fan Off Capability - enabled at 48C, Minimum Temperature to 85, Minimum Duty Cycle to 40, Duty Cycle Increment to 6 
 +Secondary Temperature Sensor to Memory, Minimum Temperature to 60, Minimum Duty Cycle to 40, Duty Cycle Increment to 6.
  
-Base OS install of [[http://cdimage.ubuntu.com/releases/20.04.1/release/|Ubuntu server 20.04.1 64bit]]   +Set CEC to desired settings 
-  - install no additional packages apart from ssh.  + 
-  - Do not use encrypted home directory+===== KODI INSTALL =====  
-  - don't partition with lvm, just full disk guided + 
-  - you can setup default user 'kodi' with whatever password or setup your own user and add the kodi user later+Base OS install of Ubuntu server LTS 22.04.3 (orig notes from 20.04.1) 
 +  - [[https://old-releases.ubuntu.com/releases/|Old Ubuntu server releases]] [[https://releases.ubuntu.com/|Current Ubuntu server releases]] 
 +  - install default server (not minimized) 
 +  - Do not use lvm and/or encryption
 +  - setup default user 'kodi' with password kodi (or setup your own user and add the kodi user later
 +  - install no snap packages 
 +  - install openssh 
 +  - trigger reboot 
 + 
 +copy ssh-keys manually to /home/kodi/.ssh/authorized_keys or use ssh-copy-id kodi@ip-address then proceed with configuration through remote ssh terminal.
  
 <code> <code>
 sudo apt-get update sudo apt-get update
-sudo apt-get install ssh software-properties-common xorg xserver-xorg-legacy alsa-utils mesa-utils git-core librtmp1 libmad0 lm-sensors libmpeg2-4 avahi-daemon libnfs11 libva2 vainfo i965-va-driver linux-firmware dbus-x11 openbox pastebinit xserver-xorg-video-intel+sudo apt-get install software-properties-common xorg xserver-xorg-legacy alsa-utils mesa-utils git-core librtmp1 libmad0 lm-sensors libmpeg2-4 avahi-daemon libnfs13 libva2 vainfo i965-va-driver linux-firmware dbus-x11 openbox pastebinit xserver-xorg-video-intel alsa
 sudo apt-get dist-upgrade sudo apt-get dist-upgrade
 +</code>
 +
 +Support NFS mounts on system level:
 +<code>
 +sudo apt-get install nfs-common
 </code> </code>
  
 Some house-cleaning to begin with: Some house-cleaning to begin with:
 <code> <code>
-#remove ruby 
-sudo apt-get purge ruby 
 #remove snapd #remove snapd
 sudo apt purge snapd ubuntu-core-launcher squashfs-tools sudo apt purge snapd ubuntu-core-launcher squashfs-tools
-sudo systemctl disable snap-repair.timer 
-sudo systemctl disable snapd.refresh.timer 
  
-#remove infrared support (unless required) 
-sudo apt-get purge lirc 
-#remove bluetooth support (unless required) 
-sudo apt-get purge bluez bluetooth 
 #remove lvm2 (unless system uses LVM) Note: may remove ubuntu-server package for cleanup #remove lvm2 (unless system uses LVM) Note: may remove ubuntu-server package for cleanup
 sudo apt remove lvm2 --purge sudo apt remove lvm2 --purge
-#remove at scheduling service 
-sudo apt-get purge at 
-#remove lxc filesystem used by containers 
-sudo apt-get purge lxcfs 
-sudo rm -rf /etc/apparmor.d/lxc 
-sudo rm -rf /etc/apparmor.d/lxc-containers  
-sudo rm -rf /etc/apparmor.d/usr.bin.lxc-start  
 #remove raid support #remove raid support
 sudo apt-get purge mdadm sudo apt-get purge mdadm
 +
 #remove iscsi (IP based scsi support for remote storage) #remove iscsi (IP based scsi support for remote storage)
 sudo apt-get purge open-iscsi sudo apt-get purge open-iscsi
 #Remove udisks2: desktop environment option to mount/umount #Remove udisks2: desktop environment option to mount/umount
 sudo apt-get purge udisks2 sudo apt-get purge udisks2
-#remove samba NOTE: Keep samba-libs package for kodi!: 
-sudo apt-get purge samba samba-common samba-common-bin 
 #remove btrfs packages #remove btrfs packages
-sudo apt-get purge btrfs-progs btrfs-tools+sudo apt-get purge btrfs-progs 
 #remove iptables #remove iptables
 sudo apt-get purge iptables sudo apt-get purge iptables
 #remove wireless support #remove wireless support
-sudo apt-get purge wireless-tools wpasupplicant connman+sudo apt-get purge wpasupplicant
 #remove Open VM tools as not running in a VM #remove Open VM tools as not running in a VM
 sudo apt-get purge open-vm-tools sudo apt-get purge open-vm-tools
-sudo apt-get purge python2 
  
-sudo apt-get purge cloud-initramfs-copymods cloud-initramfs-dyn-netconf cloud-guest-utils+sudo apt-get purge cloud-init* cloud-guest-utils 
 + 
 +sudo apt-get purge ubuntu-advantage-tools 
 +sudo apt-get purge cryptsetup* 
 + 
  
 #install zip and unzip #install zip and unzip
-sudo apt-get install zip unzip+sudo apt-get install zip unzip samba-libs
  
 # if the latest kernel is required or desired, install the hardware enablement kernel (currently 5.11.x) # if the latest kernel is required or desired, install the hardware enablement kernel (currently 5.11.x)
Line 69: Line 77:
 Disable IPv6 support unless required: Disable IPv6 support unless required:
 <code> <code>
-echo "# Disable IPv6" >> /etc/sysctl.conf +echo "# Disable IPv6" | sudo tee /etc/sysctl.conf 
-echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf +echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee /etc/sysctl.conf 
-echo "#" >> /etc/sysctl.conf+echo "#" | sudo tee /etc/sysctl.conf
 sysctl -p sysctl -p
 </code> </code>
Line 81: Line 89:
 sudo systemctl disable motd-news.timer sudo systemctl disable motd-news.timer
  
-apt-get remove --purge landscape-common+sudo apt-get remove --purge landscape-common
 sudo chmod -R 0644 /etc/update-motd.d/ sudo chmod -R 0644 /etc/update-motd.d/
 sudo vi /etc/default/motd-news sudo vi /etc/default/motd-news
Line 99: Line 107:
 <code> <code>
 sudo dpkg-reconfigure xserver-xorg-legacy sudo dpkg-reconfigure xserver-xorg-legacy
 +echo "needs_root_rights=yes" | sudo tee /etc/X11/Xwrapper.config
 </code> </code>
- 
-Now edit /etc/X11/Xwrapper.config and add the following into a new line at the end of the file: 
-<code>needs_root_rights=yes</code> 
  
 Create the kodi user and it add it the relevant groups. If you have created the kodi user during installation only do the usermod part. Create the kodi user and it add it the relevant groups. If you have created the kodi user during installation only do the usermod part.
-<code>sudo adduser kodi +<code> 
-sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input kodi</code>+sudo adduser kodi 
 +sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input kodi 
 +</code>
  
  
Line 151: Line 159:
  
 edit /etc/security/limits.conf and add before the end. remember kodi is the username, not the application. This will allow your user to get the audio thread a bit more priority. edit /etc/security/limits.conf and add before the end. remember kodi is the username, not the application. This will allow your user to get the audio thread a bit more priority.
-<code>kodi                   nice            -1</code>+<code> 
 +echo "kodi                   nice            -1" | sudo tee /etc/security/limits.conf 
 +</code>
  
 Fake display-manager.service to not make plymouth or something else complain. Fake display-manager.service to not make plymouth or something else complain.
Line 159: Line 169:
 <code> <code>
 #check ubuntu version #check ubuntu version
-lsbrelease -a+lsb_release -a
 </code> </code>
  
 Add the stable or nightly repository and install kodi: Add the stable or nightly repository and install kodi:
 <code> <code>
-#stable 18+#stable 20
 sudo add-apt-repository ppa:team-xbmc/ppa sudo add-apt-repository ppa:team-xbmc/ppa
 sudo apt-get update sudo apt-get update
Line 170: Line 180:
 sudo apt-get install kodi kodi-x11 kodi-inputstream-adaptive kodi-vfs-libarchive kodi-vfs-rar sudo apt-get install kodi kodi-x11 kodi-inputstream-adaptive kodi-vfs-libarchive kodi-vfs-rar
  
-#nightly 19 - combined x11/wayland/gbm version as of nightly 28/Oct/2020+#nightly 21 - combined x11/wayland/gbm version as of nightly 28/Oct/2020
 sudo add-apt-repository ppa:team-xbmc/xbmc-nightly sudo add-apt-repository ppa:team-xbmc/xbmc-nightly
 sudo apt-get update sudo apt-get update
 sudo apt-get dist-upgrade sudo apt-get dist-upgrade
 sudo apt-get install kodi kodi-bin kodi-inputstream-adaptive kodi-vfs-libarchive kodi-vfs-rar sudo apt-get install kodi kodi-bin kodi-inputstream-adaptive kodi-vfs-libarchive kodi-vfs-rar
 +
 +#remove joystick support unless desired for retro-gaming
 +sudo apt-get purge kodi-peripheral-joystick
 </code> </code>
  
Line 270: Line 283:
 git clone https://github.com/solbero/plymouth-theme-kodi-animated-logo git clone https://github.com/solbero/plymouth-theme-kodi-animated-logo
 cd plymouth-theme-kodi-animated-logo cd plymouth-theme-kodi-animated-logo
 +sudo apt-get install fakeroot fonts-ubuntu plymouth-label
 ./build.sh ./build.sh
 sudo dpkg -i plymouth-theme-kodi-animated-logo.deb sudo dpkg -i plymouth-theme-kodi-animated-logo.deb
Line 301: Line 315:
 ===== Boot without connected TV / AVR ===== ===== Boot without connected TV / AVR =====
  
-The Extended DIsplay Identification Data (EDID) is data that describes the capabilities of a digital display (DVI,HDMI, Displayport, etc) and E-EDID contains the audio capabilities as well.+The Extended Display Identification Data (EDID) is data that describes the capabilities of a digital display (DVI,HDMI, Displayport, etc) and E-EDID contains the audio capabilities as well.
  
 NOTE: Kernel 4.4+ is required or audio EDID information won't be copied. Verify with <code>uname -a</code> NOTE: Kernel 4.4+ is required or audio EDID information won't be copied. Verify with <code>uname -a</code>
Line 325: Line 339:
 Now we need to make a little hack and also convince ubuntu to load this edid.bin in initramfs. Create /etc/initramfs-tools/hooks/include-edid-data file and write into it: Now we need to make a little hack and also convince ubuntu to load this edid.bin in initramfs. Create /etc/initramfs-tools/hooks/include-edid-data file and write into it:
  
-<code>+<code bash /etc/initramfs-tools/hooks/include-edid-data>
 #!/bin/sh #!/bin/sh
  
Line 370: Line 384:
 If there's a reference to ''snd_hda_intel'' in the output, then the kernel module has already been loaded as the driver: If there's a reference to ''snd_hda_intel'' in the output, then the kernel module has already been loaded as the driver:
 <code> <code>
-sudo lsmod | grep snd+sudo lsmod | grep snd_hda_intel
 </code> </code>
 This command will list all sound devices. You'll need this to identify which sound device you wish to use later and to determine if there are multiple devices or just one. This command will list all sound devices. You'll need this to identify which sound device you wish to use later and to determine if there are multiple devices or just one.
Line 411: Line 425:
  
 <code> <code>
-sudo vi /etc/modprobe.d/alsa-base.conf +echo "options snd-hda-intel enable_msi=1 bdl_pos_adj=1,48" | sudo tee /etc/modprobe.d/alsa-base.conf
-</code> +
-<code> +
-options snd-hda-intel enable_msi=1 bdl_pos_adj=1,48+
 </code> </code>
  
Line 431: Line 442:
 https://wiki.gentoo.org/wiki/ALSA#A.2F52.2C_AC3.2C_Dolby.2C_DTS \\ https://wiki.gentoo.org/wiki/ALSA#A.2F52.2C_AC3.2C_Dolby.2C_DTS \\
 https://forum.voidlinux.eu/t/solved-setting-up-alsa-sound-how-to/1416/20 \\ https://forum.voidlinux.eu/t/solved-setting-up-alsa-sound-how-to/1416/20 \\
 +
 ===== WIFI ===== ===== WIFI =====
 dmesg | grep iwl dmesg | grep iwl
Line 616: Line 628:
 </code> </code>
  
-===== bittorrent on nuc ===== 
-<code> 
-sudo apt-get install transmission-daemon 
-sudo service transmission-daemon stop 
-sudo vi /var/lib/transmission-daemon/info/settings.json 
-#change rcp username and password (the password can be plaintext, next restart it'll be replaced with sha1 format) 
-#add local network to rcp whitelist like 127.0.0.1,192.168.1.* 
-#set "incomplete-dir": "/var/lib/transmission-daemon/downloads", 
-#set "incomplete-dir-enabled": true, 
-#set umask to 2 
-#default torrent folder is /var/lib/transmission-daemon/downloads. place torrent in there and it will start downloading. 
-sudo usermod -a -G debian-transmission wuff 
-sudo usermod -a -G users debian-transmission 
  
-#increase UDP buffers for uTP support 
-sudo vi /etc/sysctl.conf 
-add  
-#UDP buffer increase for Transmission uTP support 
-net.core.rmem_max = 16777216 
-net.core.wmem_max = 4194304 
- 
-#then  
-sudo sysctl -p 
- 
-sudo service transmission-daemon start 
-#default web interface is http://server-ip:9091 
-</code> 
-Firefox addon for adding magnet links/bt to remote transmission:\\ 
-https://addons.mozilla.org/en-US/firefox/addon/transmitter-for-transmission/?src=ss 
- 
- 
-<code> 
-sudo apt-get install smbclient 
-sudo apt-get install cifs-utils 
-sudo apt-get install wpasupplicant wireless-tools 
-####Be VERY careful with the following command and only install connman if you really need it. Connman takes over default Linux network and wifi connection settings and results in a very hard time to configure it yourself and might even result in network not to work as it's supposed to! 
-sudo apt-get install connman 
-connmanctl enable bluetooth  
-hciconfig hci0 up 
-</code> 
- 
-Support NFS mounts on system level: 
-<code> 
-sudo apt-get install nfs-common 
-</code> 
  
  
Line 744: Line 712:
 </code> </code>
  
-Bash script for automated key update: +Bash script for automated key update for cron
-<code updatemakemkvkey.sh>+<code bash updatemakemkvkey.sh>
 #!/bin/sh #!/bin/sh
 url=$(curl -s "https://www.makemkv.com/forum/viewtopic.php?f=5&t=1053" | grep "current beta key.*<\/code>" ) url=$(curl -s "https://www.makemkv.com/forum/viewtopic.php?f=5&t=1053" | grep "current beta key.*<\/code>" )
Line 803: Line 771:
  
 ===== Sources ===== ===== Sources =====
-URLs: \\+ 
 +This article is based on the main instructions from [[https://forum.kodi.tv/showthread.php?tid=231955|here]]\\ 
 Refresh Kodi skin: \\ Refresh Kodi skin: \\
 reddit.com/r/kodi/comments/4ml9ll/refresh_skin_command/ \\ reddit.com/r/kodi/comments/4ml9ll/refresh_skin_command/ \\
kodi/kodi-nuc.1635978178.txt.gz · Last modified: 2023/05/29 11:53 (external edit)