Jump to content

haven

Members
  • Posts

    21
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Still working on HDMI audio problem, with updates. ( v24.8.4 for RK3318 Box running Armbian Linux 6.6.47-current-rockchip64) Gdm3 + Xfce Desktop If I boot with HDMI cable disconnected and connect the cable after BOOT completed -> HDMI sound ok If I boot with HDMI cable connected -> no HDMI sound I cannot find any error, all seems ok. aplay -l **** List of PLAYBACK Hardware Devices **** card 0: HDMI [HDMI], device 0: ff000000.i2s-i2s-hifi i2s-hifi-0 [ff000000.i2s-i2s-hifi i2s-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0 parse-edid < /sys/class/drm/card0-HDMI-A-1/edid Checksum Correct Section "Monitor" Identifier "Panasonic-TV" ModelName "Panasonic-TV" VendorName "MEI" # Monitor Manufactured week 1 of 2020 # EDID version 1.3 # Digital Display DisplaySize 700 390 Gamma 2.20 Option "DPMS" "false" Horizsync 15-80 VertRefresh 49-76 # Maximum pixel clock is 150MHz #Not giving standard mode: 1280x1024, 60Hz #Extension block found. Parsing... Modeline "Mode 2" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync Modeline "Mode 0" 148.50 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync Modeline "Mode 1" 85.50 1360 1424 1536 1792 768 771 777 795 +hsync +vsync Modeline "Mode 3" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync Modeline "Mode 4" 74.250 1280 1390 1420 1650 720 725 730 750 +hsync +vsync Modeline "Mode 5" 74.250 1280 1720 1760 1980 720 725 730 750 +hsync +vsync Modeline "Mode 6" 74.250 1920 2008 2052 2200 1080 1082 1087 1125 +hsync +vsync interlace Modeline "Mode 7" 74.250 1920 2448 2492 2640 1080 1082 1089 1125 +hsync +vsync interlace Modeline "Mode 8" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync Modeline "Mode 9" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync Modeline "Mode 10" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync Modeline "Mode 11" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync Modeline "Mode 12" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync Modeline "Mode 13" 74.250 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync Modeline "Mode 14" 74.250 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync Modeline "Mode 15" 27.000 1440 1464 1590 1728 576 578 581 625 -hsync -vsync interlace Modeline "Mode 16" 27.000 1440 1464 1590 1728 576 578 581 625 -hsync -vsync interlace Modeline "Mode 17" 25.200 640 656 752 800 480 490 492 525 -hsync -vsync Modeline "Mode 18" 27.027 1440 1478 1602 1716 480 484 487 525 -hsync -vsync interlace Modeline "Mode 19" 27.027 1440 1478 1602 1716 480 484 487 525 -hsync -vsync interlace Modeline "Mode 20" 27.00 720 732 796 864 576 581 586 625 -hsync -vsync Option "PreferredMode" "Mode 2" EndSection Tried to include in boot.cmd extra option "hdmi.audio=1" with no results. Tried to reload all alsa modules with sudo alsa force-reload -> no results Tried to disable and re-enable hdmi with: xrandr --output HDMI-1 --off xrandr --output HDMI-1 --auto no result
  2. Still working on HDMI audio, with some updates. Pulseaudio default sink set correctly. Fisrt of all the issue appears only on my home TV. Tested with other TV sound seems ok. HDMI port works with other device (my notebook) kernel 6.6.47-current Armbian v24.8.4 -> no hdmi audio kernel 6.6.2-edge Armbian v23.11.1 -> no hdmi audio kernel 6.8.11-edge Armbian v24.8.4 -> no hdmi audio kernel 6.11.0-edge Armbian v24.8.4 -> no hdmi audio kernel 6.1.63-current Armbian v23.11.1 -> hdmi audio OK still working on ..
  3. Update: the error I see in dmesg are irrilevant, I checked a good working system and they are still there without any issue. Still no HDMI sound on kernel 6.6.47
  4. I have been running all ok with kernel 6.6.2-edge-rockchip64 A few days ago updated to 6.6.47-current-rockchip64, now HDMI audio is not working, video is ok, Everything else works like a charm. Uboot has been also updated. I have all the output configuration well configured, but no output at all. Cards detected, output sink detected, default output points to the right ouput, not muted, volume 100%. aplay -l card 0: HDMI [HDMI], device 0: ff000000.i2s-i2s-hifi i2s-hifi-0 [ff000000.i2s-i2s-hifi i2s-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: ANALOG [ANALOG], device 0: ff010000.i2s-rk3328-hifi rk3328-hifi-0 [ff010000.i2s-rk3328-hifi rk3328-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: SPDIF [SPDIF], device 0: ff030000.spdif-dit-hifi dit-hifi-0 [ff030000.spdif-dit-hifi dit-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0 In dmseg I see this error (maybe related): [ 69.740081] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -22 [ 69.769681] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_hw_params on i2s-hifi: -22 Any idea how to get HDMI audio working?
  5. Working on CPU frequencies, the armbian image limit max cpu freq to 1.3 GHz. Neverthless the box has been sold as 1.5Ghz, so I was asking myself why should I lose some calculation power. After few serching around I found that the box can run stable at 1.4GHz with 1.35V voltage. Using armbian-config, the dtc can be modifed: opp-1200000000 { opp-hz = <0x00 0x47868c00>; opp-microvolt = <0x124f80>; clock-latency-ns = <0x9c40>; status = "okay"; }; opp-1296000000 { opp-hz = <0x00 0x4d3f6400>; opp-microvolt = <0x137478>; clock-latency-ns = <0x9c40>; status = "okay"; }; opp-1392000000 { opp-hz = <0x00 0x52f83c00>; opp-microvolt = <0x149970>; clock-latency-ns = <0x9c40>; status = "okay"; }; I also tested 1.5GHz but temperature raise wuickly when stressed (up to 90°C) and started to have some unstable unexpected behaviour, so I stick to 1392 MHz with good results.
  6. Moved the whole system from sd card to internal emmc. (* printscreen from Helios64, just for sample https://wiki.kobol.io/helios64/install/transfer/) Step 1 - Run Armbian Configuration Utility Step 2 - Select Install Menu Step 3 - Select Boot from eMMC - system on eMMC Step 4 - Confirm that the process will erase data on eMMC Step 5 - Select filesystem type for eMMC Step 6 - Wait for transfer process to complete Step 7 - Final step, install u-boot before poweroff #install u-boot for your system sudo apt install linux-u-boot-rk3318-box-edge cd /usr/lib/linux-u-boot-edge-rk3318-box/ #Write tpl+spl at 64th sector sudo dd if=idbloader.img of=/dev/sdc seek=64 #Write U-Boot proper at 16384 sector sudo dd if=u-boot.itb of=/dev/sdc seek=16384 sync Power off. Remove sd card. Boot from internal emmc successfully!
  7. RK3318 board (x88 pro 10) Kernel: 6.6.2-edge-rockchip64 Ubuntu Jammy 22.04.3 LTS Vidoe hardware acceleration working. Clock and leds working using the OpenVFD service See details here if interested:
  8. Updated to kernel 6.6.2-edge-rockchip64 Need to recompile openvfd driver, had to modify openvfd_drv.c. Patch attached. patch linux_openvfd/driver/openvfd_drv.c < openvfd_drv.c.patch openvfd_drv.c.patch
  9. About OpenVFDService, had to study and understood that led cannot be triggerd without an userspace program with custom made functions. https://github.com/arthur-liberman/linux_openvfd/blob/master/OpenVFDService.c So decided to mod directly the OpenVFDService to include POWER, LAN and WIFI led. My setup is: POWER always on when the box is running LAN on when lan cable connected The OpenVFDService source is attached, and hereunder a short explanation of the mod. // display is controlled by just 7 words 0 -> lan, power, colon, wifi leds on/off 1 -> hour +1 2 -> hour 3 -> minute +1 4 -> minute 5 -> unused = 0 6 -> unused = 0 7 -> unused = 0 memset(wb,0x00, sz); // set all to 0 // byte 0 mapping wb[0] |= 0b01100000; // wifi wb[0] |= 0b00000100; // power wb[0] |= 0b00010000; // colon wb[0] |= 0b00001000; // lan // mod for time and colon wb[0] |= 0b00010000 & (data.colon_on << 4); // colon blink original function wb[1] = char_to_mask(data.time_date.hours/10); // hour+1 wb[2] = char_to_mask(data.time_date.hours%10); // hour wb[3] = char_to_mask(data.time_date.minutes/10); // minutes+1 wb[4] = char_to_mask(data.time_date.minutes%10); // minutes //write to display ret = write(openvfd_fd, wb, sz); LAN connected was pretty straightforward: // check ethernet char buf_eth[1]; int fd = open("/sys/class/net/eth0/carrier", O_RDONLY); if (fd < 0) { perror("Open /sys/class/net/eth0/carrier failed.\n"); return; } else{ // read from fd read(fd, buf_eth, 1); close(fd); } // set display LAN led if ( buf_eth[0]=='1' ){ wb[0] |= 0b00001000; // lan } About Wifi led, my box do not use wifi, so decided to link this function the the IR remote receiver. Led on when a IR signal is received. // create thread for LIRC dev listening in main ret = pthread_create(&lirc_id, NULL, lirc_thread_handler, &setup); //New thread - listen ot lirc device for IR signal void *lirc_thread_handler(void *arg) { lirc_loop(); pthread_exit(NULL); } // IR read loop and set flag void lirc_loop(){ char buf[8]; //printf("Start lirc wait signal:\n"); while(sync_data.isActive) { //printf("DEBUG new thread created!\n"); if ( !gotIRchar ){ // check lirc dev int fd = open("/dev/lirc0", O_RDONLY); if (fd < 0) { perror("Open /dev/lirc0 failed.\n"); return; } // read from fd read(fd, buf, sizeof(buf)); //printf("DEBUG read complete %i\r",sizeof(buf)); close(fd); if (buf[0] > 0){ //printf("Ir receive: %s\n",buf); gotIRchar = true; // set IR received FLAG } } } } // check flag and set display WIFI led if ( gotIRchar ){ wb[0] |= 0b01100000; // wifi gotIRchar = false; } OpenVFDService.c
  10. Update, still wokring on OpenVFD, in armbian ubuntu jammy the front display shows only clock. Using test mode I can succesfully see all symbols lit up: OpenVFDService -t I can also manually trigger the 3 symbols with: echo eth > /sys/class/leds/openvfd/led_on echo wifi > /sys/class/leds/openvfd/led_on echo power > /sys/class/leds/openvfd/led_on Neither wifi led is linked to wifi status, nor power, nor lan.
  11. No way to have kodi acceleration working yet. In the meanwhile I have been studying the front LCD, which was black [SOLVED] 1. Install OpenVFD #install kernel headers (skip if already installed) sudo apt-get install linux-headers-`uname -r` # download the sources: git clone https://github.com/arthur-liberman/linux_openvfd # change the directory cd linux_openvfd/driver # edit the Makefile # change the line KERNELDIR = ../../../ # to this: KERNELDIR = /lib/modules/$(shell uname -r)/build # create a symlink to correct System.map in this KERNELDIR - in my case: # /lib/modules/6.1.7-rockchip64/build/System.map -> /boot/System.map-6.1.7-rockchip64 # compile the driver (in openvfd/driver): make -j4 # install module sudo make modules_install # load module modprobe openvfd 2. Install OpenVFDService cd linux_openvfd make -j4 OpenVFDService sudo cp OpenVFDService /usr/sbin/ 3. Update dts using armbian-config add at the end: openvfd { compatible = "open,vfd"; dev_name = "openvfd"; status = "okay"; }; reboot and you will find new device-tree in /proc/device-tree/open-vfd 4. Create openvfd.service in /lib/systemd/system/openvfd.service or download attached file [Unit] Description=OpenVFD Service ConditionPathExists=/proc/device-tree/openvfd/ [Service] ExecStart=/bin/sh -c '[ `cat /proc/device-tree/openvfd/compatible` = "open,vfd" ] && /sbin/modprobe openvfd; /usr/sbin/OpenVFDService' ExecStop=/bin/kill -TERM $MAINPID ExecStopPost=-/usr/sbin/rmmod openvfd RemainAfterExit=yes [Install] WantedBy=basic.target create VFD config in /etc/modprobe.d/openvfd.conf options openvfd vfd_gpio_clk="4,0x13,0" options openvfd vfd_gpio_dat="4,0x16,0" options openvfd vfd_gpio_stb="4,0x12,0" options openvfd vfd_chars="4,0,1,2,3" options openvfd vfd_dot_bits="0,1,3,2,4,5,6" #ID Display type #0x03 A display like on the A95X R2 (or the Abox A1 Max). <-- #.2 Reserved - must be 0. #.3 flags #.4 0 - > FD628 and compatible controllers options openvfd vfd_display_type="0x03,0x00,0x00,0x00" enable service and start (this will autoload the kernel module openvfd sudo systemctl enable openvfd sudo systemctl start openvfd After this the system clock will successfully show up on the front LCD openvfd.service
  12. have 3 scenarios: perfetct when launching mpv from terminal with gpu-context=drm some frame scattering when using mpv windowed in X11 too many frame dropped with mpv -fs in X11 perfect with mpv -fs in Xwayland I don't like wayland too much, and I would prefer X11, but seems to have no choice.
  13. So after more the one week working on legacy kernel, I decided to switch to mainline kernel (now using 6.6.2-edge-rockchip64). Removed the liujianfeng1994 repository and installed packeges of the v4l2request repository. Regarding this bug: bug: Lima driver (Mali 400/450) shows a red/pink tint when video is played in X11/Wayland (see https://github.com/mpv-player/mpv/issues/12968) I found that forcing MESA to a different GL core profile can solve the pinkish problem: export MESA_GL_VERSION_OVERRIDE=3.2COMPAT export MESA_GLSL_VERSION_OVERRIDE=320 mpv your-video.mkv Now I have HW accelerated video with mpv . Still have tu study how to get Kodi acceleration working.
  14. Regarding this bug: bug: Lima driver (Mali 400/450) shows a red/pink tint when video is played in X11/Wayland (see https://github.com/mpv-player/mpv/issues/12968) I found that forcing MESA to a different GL core profile can solve the pinkish problem: export MESA_GL_VERSION_OVERRIDE=3.2COMPAT export MESA_GLSL_VERSION_OVERRIDE=320 mpv your-video.mkv
  15. So after having hw decode in gstreamer, still kodi not using HW codec. The option to use DRM in settings/player is missing,so decided to rebuild kodi on my own, from repository : https://launchpad.net/~liujianfeng1994/+archive/ubuntu/rockchip-multimedia/+packages Install the Debian SDK sudo apt install devscripts build-essential Go to page https://launchpad.net/~liujianfeng1994/+archive/ubuntu/rockchip-multimedia/+packages, From this page, copy the url to the the changes file from the top link marked (changes file). https://launchpadlibrarian.net/682100344/kodi_20.2+dfsg-4+gles_source.changes From a temporary working directory, run: dget --extract --allow-unauthenticated https://launchpad.net/~liujianfeng1994/+archive/ubuntu/rockchip-multimedia/+files/kodi_20.2+dfsg-4+gles_source.changes This command will download sources and create the source tree hereunder: kodi-20.2+dfsg ├── addons ├── cmake ├── debian ├── docs ├── lib ├── libdvdnav-embedded ├── libdvdread-embedded ├── LICENSES ├── media ├── obj-aarch64-linux-gnu ├── project ├── repo-resources-embedded ├── system ├── tools ├── userdata └── xbmc Install the Package build-dependencies and Build the Package cd kodi* sudo mk-build-deps --install --remove As long as this completed with no errors, the package is ready to build. dpkg-buildpackage --build=binary --no-sign Be prepeared.. this will create a 8.5 GB folder with all kodi packages, if you are able to go to the end of Make process! In my case, it produced the .deb packages hereunder: kodi_20.2+dfsg-4+gles_arm64.deb kodi-addons-dev_20.2+dfsg-4+gles_arm64.deb kodi-addons-dev-common_20.2+dfsg-4+gles_all.deb kodi-bin_20.2+dfsg-4+gles_arm64.deb kodi-data_20.2+dfsg-4+gles_all.deb kodi-eventclients-common_20.2+dfsg-4+gles_all.deb kodi-eventclients-dev_20.2+dfsg-4+gles_arm64.deb kodi-eventclients-dev-common_20.2+dfsg-4+gles_all.deb kodi-eventclients-kodi-send_20.2+dfsg-4+gles_arm64.deb kodi-eventclients-ps3_20.2+dfsg-4+gles_arm64.deb kodi-eventclients-python_20.2+dfsg-4+gles_arm64.deb kodi-eventclients-wiiremote_20.2+dfsg-4+gles_arm64.deb kodi-eventclients-zeroconf_20.2+dfsg-4+gles_arm64.deb kodi-repository-kodi_20.2+dfsg-4+gles_all.deb kodi-tools-texturepacker_20.2+dfsg-4+gles_arm64.deb ------------------------------------------------------------ Just install created packages with dpkg -i. Kodi starting proprely, but DRM Prime decoder option missing. Studing in this problem, I suppose that kodi should run on GDM/Wayland, instead my configuration works on X11/Xfce. PROBLEM Now trying to setup wayland, i have the login screen with gdm3, but after successfull authentication nothing happens -> the systems come back to login screen. Wayland running: /usr/bin/Xwayland :1024 -rootless -noreset -accessx -core -auth /run/user/119/.mutter-Xwaylandauth.ZVKFG2 -listen 4 -listen 5 -displayfd 6 -initfd 7 See some errors here, to be investigated: sudo service gdm3 status ● gdm.service - GNOME Display Manager Loaded: loaded (/lib/systemd/system/gdm.service; static) Active: active (running) since Fri 2023-12-22 14:00:13 CET; 9min ago Process: 3364 ExecStartPre=/usr/share/gdm/generate-config (code=exited, status=0/SUCCESS) Main PID: 3371 (gdm3) Tasks: 3 (limit: 4662) Memory: 2.5M CGroup: /system.slice/gdm.service └─3371 /usr/sbin/gdm3 Dec 22 14:00:13 rk3318-box systemd[1]: Starting GNOME Display Manager... Dec 22 14:00:13 rk3318-box systemd[1]: Started GNOME Display Manager. Dec 22 14:00:13 rk3318-box gdm-autologin][3375]: gkr-pam: no password is available for user Dec 22 14:00:13 rk3318-box gdm-autologin][3375]: pam_unix(gdm-autologin:session): session opened for user ror(uid=1000)> Dec 22 14:00:14 rk3318-box gdm-autologin][3375]: gkr-pam: gnome-keyring-daemon started properly Dec 22 14:00:16 rk3318-box gdm3[3371]: Gdm: GdmDisplay: Session never registered, failing Dec 22 14:00:16 rk3318-box gdm-autologin][3482]: gkr-pam: no password is available for user Dec 22 14:00:16 rk3318-box gdm-autologin][3482]: pam_unix(gdm-autologin:session): session opened for user ror(uid=1000)> Dec 22 14:00:16 rk3318-box gdm-autologin][3482]: gkr-pam: gnome-keyring-daemon started properly
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines