MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.89k stars 497 forks source link

Pine A64 | Add support for Kodi #380

Closed Fourdee closed 6 years ago

Fourdee commented 8 years ago

As title

Fourdee commented 8 years ago

Looks like we are missing GPU driver:

root@DietPi:~# cat /var/log/Xorg.0.log | grep '(EE)'
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  1010.299] (EE) open /dev/dri/card0: No such file or directory
[  1010.349] (EE) AIGLX: reverting to software rendering
[  1010.349] (EE) AIGLX error: dlopen of /usr/lib/aarch64-linux-gnu/dri/swrast_dri.so failed (/usr/lib/aarch64-linux-gnu/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
[  1010.349] (EE) GLX: could not load software renderer
[  1011.148] (EE) Server terminated successfully (0). Closing log file.

Following http://linux-sunxi.org/Mali_binary_driver :

root@DietPi:~/sunxi-mali# make config
rm -f config.mk
make config.mk
make[1]: Entering directory '/root/sunxi-mali'
make -f Makefile.config
make[2]: Entering directory '/root/sunxi-mali'
ABI="" (Detected)
Makefile.config:37: Unknown/unhandled ABI ""
Makefile.config:38: Use ABI=armel or ABI=armhf instead
Makefile.config:39: *** Unknown/unhandled ABI "".  Stop.
make[2]: Leaving directory '/root/sunxi-mali'
Makefile:12: recipe for target 'config.mk' failed
make[1]: *** [config.mk] Error 2
make[1]: Leaving directory '/root/sunxi-mali'
Makefile:8: recipe for target 'config' failed
make: *** [config] Error 2

worth a shot

root@DietPi:~/sunxi-mali# make ABI=armhf config
rm -f config.mk
make config.mk
make[1]: Entering directory '/root/sunxi-mali'
make -f Makefile.config
make[2]: Entering directory '/root/sunxi-mali'
ABI="armhf" (Provided)
Error: ioctl(GET_API_VERSION) failed: Unknown error -1
VERSION="" (Detected)
Error: ioctl(GET_API_VERSION) failed: Unknown error -1
Error: ioctl(GET_API_VERSION) failed: Unknown error -1
Error: ioctl(GET_API_VERSION) failed: Unknown error -1
Error: ioctl(GET_API_VERSION) failed: Unknown error -1
Error: ioctl(GET_API_VERSION) failed: Unknown error -1
Makefile.config:57: Unknown/unhandled Mali Version ""
Makefile.config:58: Use VERSION=(r2p4,r3p0,r3p1,r3p2-01rel1) instead
Error: ioctl(GET_API_VERSION) failed: Unknown error -1
Makefile.config:59: *** Unknown/unhandled Mali Version "".  Stop.
make[2]: Leaving directory '/root/sunxi-mali'
Makefile:12: recipe for target 'config.mk' failed
make[1]: *** [config.mk] Error 2
make[1]: Leaving directory '/root/sunxi-mali'
Makefile:8: recipe for target 'config' failed
make: *** [config] Error 2
rhkean commented 8 years ago

odd.... it should be there the mali driver is in /lib/modules/3.10.101-0-pine64-longsleep/kernel/extramodules

Fourdee commented 8 years ago

Yep, same for 3.10.101-4:

root@DietPi:~/sunxi-mali# ls -lha /lib/modules/3.10.101-4-pine64-longsleep/kernel/extramodules
total 6.3M
drwxrwxr-x 2 root root 4.0K May 26 19:04 .
drwxrwxr-x 9 root root 4.0K May 26 19:04 ..
-rw-rw-r-- 1 root root 6.3M May 26 19:04 mali.ko
root@DietPi:~/sunxi-mali# uname -a
Linux DietPi 3.10.101-4-pine64-longsleep #51 SMP PREEMPT Thu May 26 18:20:37 CEST 2016 aarch64 GNU/Linux

Also noted here: https://github.com/longsleep/build-pine64-image/blob/master/kernel/README.md#compile-bsp-mali-kernel-module

Fourdee commented 8 years ago

Looked at this: https://github.com/longsleep/build-pine64-image/blob/master/simpleimage/platform-scripts/install_mate_desktop.sh#L15-L32

Not sure where they are getting fbturbo from, not available in default jessie repo, or deb-multimedia repo for arm64.

rhkean commented 8 years ago

found it

I just booted his xenial image. it has an additional apt source:

cat /etc/apt/sources.list.d/longsleep-ubuntu-ubuntu-pine64-flavour-makers-xenial.list

deb http://ppa.launchpad.net/longsleep/ubuntu-pine64-flavour-makers/ubuntu xenial main

rhkean commented 8 years ago

very first package....

root@keanbean:~/tmp# head -n 25 Packages
Package: xserver-xorg-video-fbturbo
Priority: optional
Section: x11
Installed-Size: 85
Maintainer: Ryan Finnie <ryan@finnie.org>
Architecture: arm64
Version: 0~git.20151007.f9a6ed7-5~xenial1.0
Provides: xorg-driver-video
Depends: libc6 (>= 2.17), libump, xorg-video-abi-20, xserver-xorg-core (>= 2:1.17.99.902)
Filename: pool/main/x/xserver-xorg-video-fbturbo/xserver-xorg-video-fbturbo_0~git.20151007.f9a6ed7-5~xenial1.0_arm64.deb
Size: 29310
MD5sum: 4e7dc1e72a19568bbbdda74544750a9a
SHA1: 588c9afe5b976f1fbd22794f14331ef695249a98
SHA256: 3d9aa490013e1924c47f1471d910ba2f42453aaa4bea7fc32ba2462943ff5287
Description: X.Org X server -- fbturbo display driver
Description-md5: d6352865b2982b24bff4a7bf31ad0324
Fourdee commented 8 years ago
root@DietPi:~# apt-get install xserver-xorg-video-fbturbo --no-install-recommends
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:
 xserver-xorg-video-fbturbo : Depends: xorg-video-abi-20 but it is not installable
                              Depends: xserver-xorg-core (>= 2:1.17.99.902) but 2:1.16.4-1 is to be installed
E: Unable to correct problems, you have held broken packages.
wget http://ftp.de.debian.org/debian/pool/main/x/xorg-server/xserver-xorg-core_1.18.3-1_arm64.deb
root@DietPi:~# dpkg -i xserver-xorg-core_1.18.3-1_arm64.deb
dpkg: considering removing xserver-xorg-video-modesetting in favour of xserver-xorg-core ...
dpkg: yes, will remove xserver-xorg-video-modesetting in favour of xserver-xorg-core
dpkg: regarding xserver-xorg-core_1.18.3-1_arm64.deb containing xserver-xorg-core:
 xserver-xorg-core breaks systemd (<< 226-4~)
  systemd (version 215-17+deb8u4) is present and installed.

dpkg: error processing archive xserver-xorg-core_1.18.3-1_arm64.deb (--install):
 installing xserver-xorg-core would break systemd, and
 deconfiguration is not permitted (--auto-deconfigure might help)
Errors were encountered while processing:
 xserver-xorg-core_1.18.3-1_arm64.deb
apt-get purge xserver-xorg-video-modesetting

root@DietPi:~# dpkg -i --auto-deconfigure xserver-xorg-core_1.18.3-1_arm64.deb
dpkg: considering deconfiguration of systemd, which would be broken by installation of xserver-xorg-core ...
dpkg: yes, will deconfigure systemd (broken by xserver-xorg-core)
dpkg: considering deconfiguration of xserver-xorg, which would be broken by installation of xserver-xorg-core ...
dpkg: yes, will deconfigure xserver-xorg (broken by xserver-xorg-core)
(Reading database ... 21857 files and directories currently installed.)
Preparing to unpack xserver-xorg-core_1.18.3-1_arm64.deb ...
De-configuring xserver-xorg (1:7.7+7) ...
De-configuring systemd (215-17+deb8u4) ...
Unpacking xserver-xorg-core (2:1.18.3-1) over (2:1.16.4-1) ...
Replacing files in old package xserver-xorg (1:7.7+7) ...
dpkg: dependency problems prevent configuration of xserver-xorg-core:
 xserver-xorg-core depends on xserver-common (>= 2:1.18.3-1); however:
  Version of xserver-common on system is 2:1.16.4-1.
 xserver-xorg-core depends on libdbus-1-3 (>= 1.9.14); however:
  Version of libdbus-1-3:arm64 on system is 1.8.20-0+deb8u1.

dpkg: error processing package xserver-xorg-core (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of systemd:
 xserver-xorg-core (2:1.18.3-1) breaks systemd (<< 226-4~) and is unpacked but not configured.
  Version of systemd to be configured is 215-17+deb8u4.

dpkg: error processing package systemd (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of xserver-xorg:
 xserver-xorg depends on xserver-xorg-core (>= 2:1.15.0.901); however:
  Package xserver-xorg-core is not configured yet.
 xserver-xorg-core (2:1.18.3-1) breaks xserver-xorg (<< 1:7.7+10~) and is unpacked but not configured.
  Version of xserver-xorg to be configured is 1:7.7+7.

dpkg: error processing package xserver-xorg (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 xserver-xorg-core
 systemd
 xserver-xorg
root@DietPi:~#
Fourdee commented 8 years ago

Just installed the "official" Pine64 Debian image: https://www.pine64.com/downloads

Debian Linux with Mate GUI Image [20160501] by lenny.raposo with Longsleep kernel, updated by PINE64.

No FBturbo in dpkg.

root@debianpine64:~# cat /var/log/Xorg.0.log | grep '(EE)'
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    23.576] (EE) open /dev/dri/card0: No such file or directory
[    23.669] (EE) AIGLX: reverting to software rendering

I installed Kodi, runs, at 0.5 frames second, software render:

Older kernel:

root@debianpine64:/home/pine64user# uname -a
Linux debianpine64 3.10.65-7-pine64-longsleep #28 SMP PREEMPT Sat Apr 23 20:13:25 CEST 2016 aarch64 GNU/Linux

@rhkean Did Kodi ever work on the DietPi Pine image?

rhkean commented 8 years ago

@rhkean Did Kodi ever work on the DietPi Pine image?

no. I noted that in my announcement under known issues.

I didn't try it with longsleep's xenial image, though... that's the image that I found the fbturbo package reference.... https://www.stdin.xyz/downloads/people/longsleep/pine64-images/ubuntu/ forum discussion here: http://forum.pine64.org/showthread.php?tid=376

Fourdee commented 8 years ago

@rhkean

no. I noted that in my announcement under known issues.

Apologies, I didn't check lol

http://forum.pine64.org/showthread.php?tid=1380&pid=12300#pid12300

Allwinner is still working on a Mali DRM binary blob

http://forum.pine64.org/showthread.php?tid=1380&pid=12325#pid12325

That's why Kodi also depends on 3D drivers in addition to the strictly required VPU drivers. More simplistic media players can just do hardware accelerated video decoding job in fullscreen or in a plain looking rectangular window without any extra fluffiness and fancy 3D effects.

I'll leave this ticket open as a feature request, but i'll move it out of the milestone. I'll also disable the Kodi install option for now.

edit: Might give this a go http://forum.pine64.org/showthread.php?tid=424&pid=3468#pid3468 http://forum.pine64.org/showthread.php?tid=424&pid=7843#pid7843

Fourdee commented 8 years ago

Gah:

apt-get install -y build-essential git make gcc automake libtool xutils-dev xorg-dev

cd /root
git clone https://github.com/linux-sunxi/libump.git
cd libump
autoreconf -i
./configure
make -j $(nproc --all)
make install

cd /root
git clone https://github.com/ssvb/xf86-video-fbturbo.git
cd xf86-video-fbturbo/
autoreconf -vi
./configure --prefix=/usr
make -j $(nproc --all)
make install

cd /root
git clone https://github.com/linux-sunxi/libcedrus.git
cd libcedrus
make -j $(nproc --all)
make install

cd /root
git clone https://github.com/linux-sunxi/libvdpau-sunxi.git
cd libvdpau-sunxi
git checkout 906c36ed45ceb53fecd5fc72e821c11849eeb1a3 #current source code is broken.
# requires libvdpau 1.1, grab it from stretch
sed -i 's/jessie/stretch/' /etc/apt/sources.list
apt-get update
apt-get install libvdpau-dev -y
sed -i 's/stretch/jessie/' /etc/apt/sources.list
apt-get update

make -j $(nproc --all)
make install
root@DietPi:~/libvdpau-sunxi# make -j $(nproc --all)
cc -c tiled_yuv.S -o tiled_yuv.o
tiled_yuv.S: Assembler messages:
tiled_yuv.S:25: Error: unknown pseudo-op: `.syntax'
tiled_yuv.S:26: Error: unknown architecture `armv7-a'

tiled_yuv.S:27: Error: unknown pseudo-op: `.fpu'
tiled_yuv.S:28: Error: unknown pseudo-op: `.thumb'
tiled_yuv.S:46: Warning: unknown register 'r0' -- .req ignored
tiled_yuv.S:47: Warning: unknown register 'r1' -- .req ignored
tiled_yuv.S:48: Warning: unknown register 'r2' -- .req ignored
tiled_yuv.S:49: Error: operand 1 should be a SIMD vector register -- `cnt .req r3'
tiled_yuv.S:50: Warning: unknown register 'r4' -- .req ignored
tiled_yuv.S:51: Warning: unknown register 'r5' -- .req ignored
tiled_yuv.S:52: Warning: unknown register 'r6' -- .req ignored
tiled_yuv.S:53: Warning: unknown register 'r7' -- .req ignored
tiled_yuv.S:54: Warning: unknown register 'r8' -- .req ignored
tiled_yuv.S:55: Warning: unknown register 'r9' -- .req ignored
tiled_yuv.S:56: Warning: unknown register 'r12' -- .req ignored
tiled_yuv.S:57: Warning: unknown register 'lr' -- .req ignored
tiled_yuv.S:59: Error: unknown pseudo-op: `.thumb_func'
tiled_yuv.S:60: Error: unknown mnemonic `push' -- `push {r4,r5,r6,r7,r8,lr}'
tiled_yuv.S:61: Error: operand 1 should be an integer register -- `ldr HEIGHT,[sp,#24]'
tiled_yuv.S:62: Error: operand 1 should be an integer or stack pointer register -- `add NEXTLIN,r3,#31'
tiled_yuv.S:63: Error: unknown mnemonic `lsrs' -- `lsrs NTILES,r3,#5'
tiled_yuv.S:64: Error: operand 1 should be a SIMD vector register -- `bic NEXTLIN,NEXTLIN,#31'
tiled_yuv.S:65: Error: operand 1 should be an integer or stack pointer register -- `and REST,r3,#31'
tiled_yuv.S:66: Error: operand 1 should be an integer register -- `lsl NEXTLIN,NEXTLIN,#5'
tiled_yuv.S:67: Error: operand 1 should be an integer register -- `subs PITCH,r2,r3'
tiled_yuv.S:68: Error: unknown mnemonic `movs' -- `movs TLINE,#32'
tiled_yuv.S:69: Error: unknown mnemonic `rsb' -- `rsb NEXTLIN,NEXTLIN,#32'
tiled_yuv.S:70: Error: operand 1 should be an integer register -- `mov TSIZE,#1024'
tiled_yuv.S:73: Error: operand 1 should be an integer register -- `cbz NTILES,3f'
tiled_yuv.S:74: Error: operand 1 should be an integer register -- `mov CNT,NTILES'
tiled_yuv.S:77: Error: unknown mnemonic `pld' -- `pld [SRC,TSIZE]'
tiled_yuv.S:78: Error: unknown mnemonic `vld1.8' -- `vld1.8 {d0-d3},[SRC:256],TSIZE'
tiled_yuv.S:79: Error: operand 1 should be an integer register -- `subs CNT,#1'
tiled_yuv.S:80: Error: unknown mnemonic `vst1.8' -- `vst1.8 {d0-d3},[DST]!'
tiled_yuv.S:83: Error: operand 1 should be an integer register -- `cbnz REST,4f'
tiled_yuv.S:86: Error: operand 1 should be an integer or stack pointer register -- `add DST,PITCH'
tiled_yuv.S:89: Error: operand 1 should be an integer register -- `subs TLINE,#1'
tiled_yuv.S:90: Error: unknown mnemonic `itee' -- `itee ne'
tiled_yuv.S:91: Error: unknown mnemonic `addne' -- `addne SRC,NEXTLIN'
tiled_yuv.S:92: Error: unknown mnemonic `subeq' -- `subeq SRC,#992'
tiled_yuv.S:93: Error: unknown mnemonic `moveq' -- `moveq TLINE,#32'
tiled_yuv.S:95: Error: operand 1 should be an integer register -- `subs HEIGHT,#1'
tiled_yuv.S:97: Error: unknown mnemonic `pop' -- `pop {r4,r5,r6,r7,r8,pc}'
tiled_yuv.S:100: Error: operand 1 should be an integer register -- `mov TMPSRC,SRC'
tiled_yuv.S:101: Error: operand 1 should be an integer register -- `tst REST,#16'
tiled_yuv.S:103: Error: unknown mnemonic `vld1.8' -- `vld1.8 {d0-d1},[TMPSRC:128]!'
tiled_yuv.S:104: Error: unknown mnemonic `vst1.8' -- `vst1.8 {d0-d1},[DST]!'
tiled_yuv.S:105: Error: operand 1 should be an integer or stack pointer register -- `add SRC,TSIZE'
tiled_yuv.S:106: Error: operand 1 should be an integer register -- `ands CNT,REST,#15'
tiled_yuv.S:108: Error: unknown mnemonic `vld1.8' -- `vld1.8 {d0[0]},[TMPSRC]!'
tiled_yuv.S:109: Error: operand 1 should be an integer register -- `subs CNT,#1'
tiled_yuv.S:110: Error: unknown mnemonic `vst1.8' -- `vst1.8 {d0[0]},[DST]!'
tiled_yuv.S:115: Error: unknown pseudo-op: `.thumb_func'
tiled_yuv.S:116: Error: unknown mnemonic `push' -- `push {r4,r5,r6,r7,r8,r9,lr}'
tiled_yuv.S:117: Error: operand 1 should be an integer register -- `mov DST2,r2'
tiled_yuv.S:118: Error: operand 1 should be an integer register -- `ldr HEIGHT,[sp,#32]'
tiled_yuv.S:119: Error: operand 1 should be an integer register -- `ldr r4,[sp,#28]'
tiled_yuv.S:120: Error: operand 1 should be an integer or stack pointer register -- `add NEXTLIN,r4,#31'
tiled_yuv.S:121: Error: unknown mnemonic `lsrs' -- `lsrs NTILES,r4,#5'
tiled_yuv.S:122: Error: operand 1 should be a SIMD vector register -- `bic NEXTLIN,NEXTLIN,#31'
tiled_yuv.S:123: Error: operand 1 should be an integer register -- `ubfx REST,r4,#1,#4'
tiled_yuv.S:124: Error: operand 1 should be an integer register -- `lsl NEXTLIN,NEXTLIN,#5'
tiled_yuv.S:125: Error: operand 1 should be an integer or stack pointer register -- `sub PITCH,r3,r4,lsr#1'
tiled_yuv.S:126: Error: unknown mnemonic `movs' -- `movs TLINE,#32'
tiled_yuv.S:127: Error: unknown mnemonic `rsb' -- `rsb NEXTLIN,NEXTLIN,#32'
tiled_yuv.S:128: Error: operand 1 should be an integer register -- `mov TSIZE,#1024'
tiled_yuv.S:131: Error: operand 1 should be an integer register -- `cbz NTILES,3f'
tiled_yuv.S:132: Error: operand 1 should be an integer register -- `mov CNT,NTILES'
tiled_yuv.S:135: Error: unknown mnemonic `pld' -- `pld [SRC,TSIZE]'
tiled_yuv.S:136: Error: unknown mnemonic `vld2.8' -- `vld2.8 {d0-d3},[SRC:256],TSIZE'
tiled_yuv.S:137: Error: operand 1 should be an integer register -- `subs CNT,#1'
tiled_yuv.S:138: Error: unknown mnemonic `vst1.8' -- `vst1.8 {d0-d1},[DST]!'
tiled_yuv.S:139: Error: unknown mnemonic `vst1.8' -- `vst1.8 {d2-d3},[DST2]!'
tiled_yuv.S:142: Error: operand 1 should be an integer register -- `cbnz REST,4f'
tiled_yuv.S:145: Error: operand 1 should be an integer or stack pointer register -- `add DST,PITCH'
tiled_yuv.S:146: Error: operand 1 should be an integer or stack pointer register -- `add DST2,PITCH'
tiled_yuv.S:149: Error: operand 1 should be an integer register -- `subs TLINE,#1'
tiled_yuv.S:150: Error: unknown mnemonic `itee' -- `itee ne'
tiled_yuv.S:151: Error: unknown mnemonic `addne' -- `addne SRC,NEXTLIN'
tiled_yuv.S:152: Error: unknown mnemonic `subeq' -- `subeq SRC,#992'
tiled_yuv.S:153: Error: unknown mnemonic `moveq' -- `moveq TLINE,#32'
tiled_yuv.S:155: Error: operand 1 should be an integer register -- `subs HEIGHT,#1'
tiled_yuv.S:157: Error: unknown mnemonic `pop' -- `pop {r4,r5,r6,r7,r8,r9,pc}'
tiled_yuv.S:160: Error: operand 1 should be an integer register -- `mov TMPSRC,SRC'
tiled_yuv.S:161: Error: operand 1 should be an integer register -- `tst REST,#8'
tiled_yuv.S:163: Error: unknown mnemonic `vld2.8' -- `vld2.8 {d0-d1},[TMPSRC:128]!'
tiled_yuv.S:164: Error: unknown mnemonic `vst1.8' -- `vst1.8 {d0},[DST]!'
tiled_yuv.S:165: Error: unknown mnemonic `vst1.8' -- `vst1.8 {d1},[DST2]!'
tiled_yuv.S:166: Error: operand 1 should be an integer or stack pointer register -- `add SRC,TSIZE'
tiled_yuv.S:167: Error: operand 1 should be an integer register -- `ands CNT,REST,#7'
tiled_yuv.S:169: Error: unknown mnemonic `vld2.8' -- `vld2.8 {d0[0],d1[0]},[TMPSRC]!'
tiled_yuv.S:170: Error: operand 1 should be an integer register -- `subs CNT,#1'
tiled_yuv.S:171: Error: unknown mnemonic `vst1.8' -- `vst1.8 {d0[0]},[DST]!'
tiled_yuv.S:172: Error: unknown mnemonic `vst1.8' -- `vst1.8 {d1[0]},[DST2]!'
Makefile:46: recipe for target 'tiled_yuv.o' failed
make: *** [tiled_yuv.o] Error 1

tiled_yuv.S:26: Error: unknown architecture `armv7-a'

rhkean commented 8 years ago

why does that say "armv7" ?

shouldn't that be saying "arm64"? (I don't think this is a multi-arch kernel)

Fourdee commented 8 years ago

@rhkean

shouldn't that be saying "arm64"?

Yep. Probably needs a flag, but no idea at the moment.

The good news is FBturbo + libump works. So better performance in desktops:

root@DietPi:~# cat /var/log/Xorg.0.log | grep fbturbo
[    16.232] (II) LoadModule: "fbturbo"
[    16.239] (II) Loading /usr/lib/xorg/modules/drivers/fbturbo_drv.so
[    16.246] (II) Module fbturbo: vendor="X.Org Foundation"
[    16.246] (II) FBTURBO: driver for framebuffer: fbturbo
[    16.246] (WW) Falling back to old probe method for fbturbo

I've uploaded the arm64 debs for FBturbo:

wget http://dietpi.com/downloads/binaries/all/libump_1-1_arm64.deb -O package.deb
dpkg -i package.deb
rm package.deb

wget http://dietpi.com/downloads/binaries/all/xf86-video-fbturbo_1-1_arm64.deb -O package.deb
dpkg -i package.deb
rm package.deb

cat << _EOF_ > /etc/X11/xorg.conf
Section "Device"
        Identifier      "Allwinner A10/A13 FBDEV"
        Driver          "fbturbo"
        Option          "fbdev" "/dev/fb0"
        Option          "SwapbuffersWait" "true"
EndSection
_EOF_
Fourdee commented 8 years ago

Updates on mali driver:

http://forum.pine64.org/showthread.php?tid=587&pid=12614#pid12614

The 3D acceleration already completed and currently under stability test and memory optimization. The exa acceleration functionality will be implement thru hardware rotate and memory copy implementation. The code will be release on early next week.

nicothyrael commented 8 years ago

Hi! As the Mali driver was updated, can you re-enable Kodi to be tested? http://forum.pine64.org/showthread.php?tid=587&page=12

Thanks!

Fourdee commented 8 years ago

@nicothyrael Yep :+1: .

Not sure if its released via Longsleeps kernel upgrade script yet, i'll take a look.

Notes to self: Build script with Mali DRM driver: https://github.com/longsleep/build-pine64-image/commit/81bca181179dbcf5c82ae0a35b83ddcc2c04b9fd

Kernel source with Mali DRM driver: https://github.com/longsleep/linux-pine64/commit/f79eb809916be7ec7ef30c860b08bdde3c8c2dd8

Fourdee commented 8 years ago

http://forum.pine64.org/showthread.php?tid=587&pid=17035#pid17035

bash <(curl -s https://raw.githubusercontent.com/longsleep/build-pine64-image/master/simpleimage/platform-scripts/pine64_update_kernel.sh) latest drm

apt-get install -y software-properties-common
add-apt-repository -y ppa:longsleep/ubuntu-pine64-flavour-makers

#Change repo target from Jessie to xenial. Longsleeps packages are only available for distro Xenial.
echo -e "deb http://ppa.launchpad.net/longsleep/ubuntu-pine64-flavour-makers/ubuntu xenial main" > /etc/apt/sources.list.d/longsleep-ubuntu-pine64-flavour-makers-jessie.list

apt-get update
root@DietPi:~# apt-get install -y xserver-xorg-video-armsoc-sunxi
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:
 xserver-xorg-video-armsoc-sunxi : Depends: xorg-video-abi-20 but it is not installable
                                   Depends: xserver-xorg-core (>= 2:1.17.99.902) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Looks like its going be one of those "hacky hacky, workaroundy" jobs to get it working on Jessie :-1:

nicothyrael commented 8 years ago

This worked for me:

  1. Update kernel and uboot with longsleep scripts.
  2. Reboot
  3. sudo apt-get install -y software-properties-common
  4. sudo add-apt-repository -y ppa:longsleep/ubuntu-pine64-flavour-makers
  5. sudo apt-get update
  6. sudo apt-get upgrade
  7. sudo apt-get dist-upgrade
  8. sudo apt-get install xserver-xorg-video-armsoc-sunxi

but still get:

the following packages have unmet dependencies: kodi : Depends: kodi-bin (>= 2:16.1~git20160425.1001-final-0xenial) but 15.2+dfsg1-3ubuntu1 is to be installed Depends: libshairplay0 but it is not installable Recommends: libva-intel-vaapi-driver but it is not installable or i965-va-driver but it is not installable E: Unable to correct problems, you have held broken packages.

Fourdee commented 8 years ago

Ok lets try upgrading to stretch, rather than create a endless list of dependency workarounds.

On a fresh DietPi installation:

cat << _EOF_ > /etc/apt/sources.list
deb http://ftp.debian.org/debian stretch main contrib non-free
deb http://ftp.debian.org/debian stretch-updates main contrib non-free
deb http://security.debian.org stretch/updates main contrib non-free
deb http://ftp.debian.org/debian stretch-proposed-updates contrib non-free main
_EOF_

apt-get update
apt-get dist-upgrade

# Yes for service restarts
# Yes to all config overwrites, excluding swapfile and cron jobs

bash <(curl -s https://raw.githubusercontent.com/longsleep/build-pine64-image/master/simpleimage/platform-scripts/pine64_update_kernel.sh) latest drm

reboot

apt-get install -y software-properties-common
add-apt-repository -y ppa:longsleep/ubuntu-pine64-flavour-makers

#Change repo target to xenial. Longsleeps packages are only available for distro Xenial.
echo -e "deb http://ppa.launchpad.net/longsleep/ubuntu-pine64-flavour-makers/ubuntu xenial main" > /etc/apt/sources.list.d/longsleep-ubuntu-pine64-flavour-makers-jessie.list

apt-get update

apt-get install -y xserver-xorg-video-armsoc-sunxi alsa-base xinit
apt-get install -y kodi

xinit kodi

Kodi runs, but its < 1fps (software render), screen keeps cycling signal.

16:57:40 T:547548053504  NOTICE: Starting Kodi from Debian (16.1 Debian package version: 16.1+dfsg1-1). Platform: Linux ARM 64-bit
16:57:40 T:547548053504  NOTICE: Using Release Kodi from Debian x64 build
16:57:40 T:547548053504  NOTICE: Kodi from Debian compiled Apr 24 2016 by GCC 5.3.1 for Linux ARM 64-bit version 4.5.1 (263425)
16:57:40 T:547548053504  NOTICE: Running on Debian GNU/Linux stretch/sid testing, kernel: Linux ARM 64-bit version 3.10.102-2-pine64drm-longsleep
16:57:40 T:547548053504  NOTICE: FFmpeg version: 3.0.1-3
16:57:40 T:547548053504  NOTICE: Host CPU: AArch64 Processor rev 4 (aarch64), 4 cores available
16:57:40 T:547548053504  NOTICE: special://xbmc/ is mapped to: /usr/share/kodi
16:57:40 T:547548053504  NOTICE: special://xbmcbin/ is mapped to: /usr/lib/aarch64-linux-gnu/kodi
16:57:40 T:547548053504  NOTICE: special://masterprofile/ is mapped to: /root/.kodi/userdata
16:57:40 T:547548053504  NOTICE: special://home/ is mapped to: /root/.kodi
16:57:40 T:547548053504  NOTICE: special://temp/ is mapped to: /root/.kodi/temp
16:57:40 T:547548053504  NOTICE: The executable running is: /usr/lib/aarch64-linux-gnu/kodi/kodi.bin
16:57:40 T:547548053504  NOTICE: Local hostname: DietPi
16:57:40 T:547548053504  NOTICE: Log File is located: /root/.kodi/temp/kodi.log
16:57:40 T:547548053504  NOTICE: -----------------------------------------------------------------------
16:57:40 T:547548053504   ERROR: DBus: Error org.freedesktop.DBus.Error.ServiceUnknown - The name org.freedesktop.UPower was not provided by any .service files
16:57:40 T:547548053504  NOTICE: load settings...
16:57:41 T:547548053504   ERROR: PulseAudio: Failed to connect context
16:57:41 T:547548053504  NOTICE: PulseAudio might not be running. Context was not created.
16:57:41 T:547548053504  NOTICE: Found 1 Lists of Devices
16:57:41 T:547548053504  NOTICE: Enumerated ALSA devices:
16:57:41 T:547548053504  NOTICE:     Device 1
16:57:41 T:547548053504  NOTICE:         m_deviceName      : default
16:57:41 T:547548053504  NOTICE:         m_displayName     : Default (sndhdmi Analog)
16:57:41 T:547548053504  NOTICE:         m_displayNameExtra:
16:57:41 T:547548053504  NOTICE:         m_deviceType      : AE_DEVTYPE_PCM
16:57:41 T:547548053504  NOTICE:         m_channels        : FL,FR,BL,BR,FC,LFE,SL,SR
16:57:41 T:547548053504  NOTICE:         m_sampleRates     : 8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,176400,192000
16:57:41 T:547548053504  NOTICE:         m_dataFormats     : AE_FMT_S24NE4,AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S16LE
16:57:41 T:547548053504  NOTICE: No settings file to load (special://xbmc/system/advancedsettings.xml)
16:57:41 T:547548053504  NOTICE: No settings file to load (special://masterprofile/advancedsettings.xml)
16:57:41 T:547548053504  NOTICE: Default DVD Player: dvdplayer
16:57:41 T:547548053504  NOTICE: Default Video Player: dvdplayer
16:57:41 T:547548053504  NOTICE: Default Audio Player: paplayer
16:57:41 T:547548053504  NOTICE: Disabled debug logging due to GUI setting. Level 0.
16:57:41 T:547548053504  NOTICE: Log level changed to "LOG_LEVEL_NORMAL"
16:57:41 T:547548053504  NOTICE: Loading player core factory settings from special://xbmc/system/playercorefactory.xml.
16:57:41 T:547548053504  NOTICE: Loaded playercorefactory configuration
16:57:41 T:547548053504  NOTICE: Loading player core factory settings from special://masterprofile/playercorefactory.xml.
16:57:41 T:547548053504  NOTICE: special://masterprofile/playercorefactory.xml does not exist. Skipping.
16:57:41 T:547548053504  NOTICE: Running database version Addons20
16:57:41 T:547548053504  NOTICE: ADDONS: Using repository repository.xbmc.org
16:57:41 T:547548053504  NOTICE: Setup SDL
16:57:41 T:547548053504  NOTICE: Checking resolution 16
16:57:42 T:547548053504  NOTICE: Using visual 0x21
16:57:42 T:547548053504  NOTICE: GL_VENDOR = Mesa Project
16:57:42 T:547548053504  NOTICE: GL_RENDERER = Software Rasterizer
16:57:42 T:547548053504  NOTICE: GL_VERSION = 2.1 Mesa 11.2.2
16:57:42 T:547548053504  NOTICE: GL_SHADING_LANGUAGE_VERSION = 1.20
16:57:42 T:547548053504  NOTICE: GL_EXTENSIONS = GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_copy_texture GL_EXT_polygon_offset GL_EXT_subtexture GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_compiled_vertex_array GL_EXT_texture GL_EXT_texture3D GL_IBM_rasterpos_clip GL_ARB_point_parameters GL_EXT_draw_range_elements GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_multitexture GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat GL_3DFX_texture_compression_FXT1 GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_transpose_matrix GL_EXT_blend_func_separate GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_secondary_color GL_EXT_texture_env_add GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_INGR_blend_func_separate GL_NV_blend_square GL_NV_light_max_exponent GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_S3_s3tc GL_SUN_multi_draw_arrays GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_EXT_framebuffer_object GL_EXT_texture_compression_s3tc GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_MESA_window_pos GL_NV_packed_depth_stencil GL_NV_texture_rectangle GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_window_pos GL_ATI_fragment_shader GL_EXT_stencil_two_side GL_EXT_texture_cube_map GL_NV_depth_clamp GL_NV_point_sprite GL_APPLE_packed_pixels GL_APPLE_vertex_array_object GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_vertex_program GL_ARB_vertex_shader GL_ATI_draw_buffers GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_EXT_depth_bounds_test GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert GL_MESA_ycbcr_texture GL_ARB_depth_clamp GL_ARB_fragment_program_shadow GL_ARB_half_float_pixel GL_ARB_occlusion_query2 GL_ARB_point_sprite GL_ARB_shading_language_100 GL_ARB_sync GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate GL_OES_read_format GL_ARB_pixel_buffer_object GL_ARB_texture_compression_rgtc GL_ARB_texture_float GL_ARB_texture_rectangle GL_ATI_texture_compression_3dc GL_EXT_pixel_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_mirror_clamp GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent GL_ARB_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_packed_depth_stencil GL_APPLE_object_purgeable GL_ARB_vertex_array_object GL_ATI_separate_stencil GL_ATI_texture_mirror_once GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_gpu_program_parameters GL_EXT_texture_array GL_EXT_texture_compression_latc GL_EXT_texture_sRGB_decode GL_ARB_copy_buffer GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_ARB_map_buffer_range GL_ARB_texture_rg GL_ARB_texture_swizzle GL_ARB_vertex_array_bgra GL_EXT_texture_swizzle GL_EXT_vertex_array_bgra GL_NV_conditional_render GL_ARB_debug_output GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions GL_ARB_provoking_vertex GL_ARB_sampler_objects GL_EXT_provoking_vertex GL_ARB_get_program_binary GL_ARB_robustness GL_ARB_separate_shader_objects GL_ARB_texture_compression_bptc GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ARB_compressed_texture_pixel_storage GL_ARB_map_buffer_alignment GL_ARB_texture_storage GL_AMD_shader_trinary_minmax GL_ARB_clear_buffer_object GL_ARB_invalidate_subdata GL_ARB_program_interface_query GL_ARB_vertex_attrib_binding GL_KHR_debug GL_ARB_multi_bind GL_ARB_texture_mirror_clamp_to_edge GL_ARB_get_texture_sub_image GL_KHR_context_flush_control

Boot log:

root@DietPi:~# dmesg | grep drm
[    0.000000] Linux version 3.10.102-2-pine64drm-longsleep (longsleep@mose2) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.1) ) #76 SMP PREEMPT Sun Jul 31 20:50:25 CEST 2016
[    7.218067] [drm] Initialized drm 1.1.0 20060810
[    7.219315] [drm:sunxi_drm_get_name_node] *ERROR* of_find_compatible_node allwinner,sunxi-lcd1 fail
[    7.219341] [drm:disp_sys_script_get_item] *ERROR* get [lcd1] item err.
[    7.219485] [drm:sunxi_drm_get_name_node] *ERROR* of_find_compatible_node allwinner,sunxi-lcd1 fail
[    7.219508] [drm:disp_sys_script_get_item] *ERROR* get [lcd1] item err.
[    7.219651] [drm:sunxi_drm_get_name_node] *ERROR* of_find_compatible_node allwinner,sunxi-lcd1 fail
[    7.219673] [drm:disp_sys_script_get_item] *ERROR* get [lcd1] item err.
[    7.219749] [drm] [1007] crtc_id:0(22)
[    7.219790] [drm] [1007] crtc_id:1(35)
[    7.219807] [drm] [638] encoder_id:0(36) possible_crtcs:0x3
[    7.219824] [drm] [638] encoder_id:1(37) possible_crtcs:0x3
[    7.220320] [drm] failed to get gpio[hdmi_io_0].
[    7.220336] [drm] failed to get gpio[hdmi_io_1].
[    7.220350] [drm] failed to get gpio[hdmi_io_2].
[    7.220364] [drm] failed to get gpio[hdmi_io_3].
[    7.220378] [drm] failed to get gpio[hdmi_io_4].
[    7.220494] [drm] suceess to enable regulator vcc-hdmi-33!
[    7.735582] [drm] [489]sunxi_con_id:0(38), fix:1
[    7.735837] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[    7.735855] [drm] No driver support for vblank timestamp query.
[    8.493368] [drm] sunxi_hdmi_get_edid:add 39 cout modes.
[    8.493445] [drm] connetor(0)--->crtc(0) encoder:37,resolution(1920 x 1080)
[    8.493470] [drm] surface(1920 x 1080), fb(1920 x 1080) and bpp(32) form(875713089)
[    8.658277] sunxi-drm sunxi-drm: fb0:  frame buffer device
[    8.658410] sunxi-drm sunxi-drm: registered panic notifier
[    8.658547] [drm] Initialized sunxi 1.0.0 20160530 on minor 0
[   61.798785] CPU: 3 PID: 2360 Comm: kodi.bin Tainted: G           O 3.10.102-2-pine64drm-longsleep #76
[   64.029017] CPU: 3 PID: 2391 Comm: kodi.bin Tainted: G           O 3.10.102-2-pine64drm-longsleep #76
[   66.176217] CPU: 3 PID: 2422 Comm: kodi.bin Tainted: G           O 3.10.102-2-pine64drm-longsleep #76
[   66.480068] CPU: 3 PID: 2422 Comm: kodi.bin Tainted: G           O 3.10.102-2-pine64drm-longsleep #76
[   85.013394] [drm] sunxi_hdmi_get_edid:add 39 cout modes.
[   85.771497] [drm] sunxi_hdmi_get_edid:add 39 cout modes.
[   89.930731] CPU: 0 PID: 2796 Comm: kodi.bin Tainted: G           O 3.10.102-2-pine64drm-longsleep #76
[   90.856599] [drm] sunxi_hdmi_get_edid:add 39 cout modes.
Fourdee commented 8 years ago

xinit startx

root@DietPi:~# cat /var/log/Xorg.0.log | grep '(EE)'
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    49.489] (EE) ARMSOC(0): ERROR: Pixman failed to blit from /dev/fb0 to scanout buffer
[    49.493] (EE) MODE :0
[    49.626] (EE) AIGLX error: dlopen of /usr/lib/aarch64-linux-gnu/dri/armsoc_dri.so failed (/usr/lib/aarch64-linux-gnu/dri/armsoc_dri.so: cannot open shared object file: No such file or directory)
[    49.626] (EE) AIGLX: reverting to software rendering
[    49.762] (EE) MODE :0
[    51.023] (EE) MODE :0
[    51.130] (EE) MODE :0
[    52.554] (EE) MODE :0
[    53.437] (EE) MODE :0
[    53.540] (EE) MODE :0

/usr/lib/aarch64-linux-gnu/dri/armsoc_dri.so

Fourdee commented 8 years ago

Moving this out of milestone. This is going to take much longer than expected. Could really do with some input/suggestions if anyone has it.

Fourdee commented 6 years ago

General Cleanup: Marking all software requests as closed. Once interest peaks, we'll reopen once work starts.

rtwld commented 1 year ago

I am trying to run Kodi for Debian 20.x on DietPi bookworm on Pine64, but videos have really low framerate since hw acceleration is missing.

I wonder if @MichaIng would be interested in reopening this issue? Since 2020, the LibVA implementation for the Linux Video4Linux2 Request API is available for Allwinner: https://github.com/bootlin/libva-v4l2-request; and LibreElec seems to be running Kodi with hw acceleration on Pine64, too. Perhaps this would make support for Pine64 easier?