Jump to content

bsccara

Members
  • Posts

    3
  • Joined

  • Last visited

  1. Cracked it. Anyone interested can use the code below to do it: #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <sys/ioctl.h> #include <errno.h> #include <string.h> #define DISP_BLANK 0x0C int main(int argc, char *argv[]) { int fd_disp, ret; unsigned long buffer[4] = {0}; if (strcasecmp(argv[1], "off") == 0) buffer[1] = 1; else if (strcasecmp(argv[1], "on") == 0) buffer[1] = 0; else return 0; fd_disp = open("/dev/disp", O_RDWR); if (fd_disp == -1) { fprintf(stderr, "Error: Failed to open /dev/disp: %s\n", strerror(errno)); return errno; } if (ioctl(fd_disp, DISP_BLANK, buffer)) ret = errno; else ret = 0; close(fd_disp); return ret; } Compile this for ARM and use as '<program name> off' to blank and '<program name> on' to un-blank. Still, it is strange why just writing to the sysfs entry doesn't work...
  2. I'm running OpenElec on a NanoPI-M1 and one thing missing is having the screen blanked when the screensaver kicks in, allowing the monitor to power down. In Kodi there's no option to do it, unlike when running in other OS. Probably someone is going to direct me at CEC but that does not work for me as I have a PC monitor connected to the board through a HDMI->VGA adaptor. I've read in the sunxi docs that the '/sys/class/graphics/fb0/blank' sysfs entry should control blanking for the framebuffer, therefore blanking the HDMI output, but it either does not work that way or at all, as nothing happens. On the RP world there is a command line utility that can enable/disable the video output, is there any way of doing it on an H3-based board ?
  3. I'm testing the image file OpenELEC-H3.arm-7.0-devel-20160806193854-r22886-g5828aec-opione on a NanoPI M1. As indicated above it mostly works except for a major issue on my test board. Very frequently Kodi crashes, either on usage or right after startup, while idle. Also it is very common to get 'BUG: Bad page state' errors on dmesg, affecting several services. Usually the system keeps running while Kodi just keeps restarting. After a lot of hypotesis tested I think the problem is the DDR DRAM clock boot setting. Although the script.bin file sets the dram_clk at 624 MHz, after boot the real clock frequency is 672 MHZ, which is over the limit according to H3's datasheet. I've tried setting the DDR frequency by hand to 624 MHz while Kodi is going through its restart-crash-restart cycles and it indeed brings the system back to perfect working order. I've now added the command line into OpenElec's autostart.sh file but it is too late as usually there's a couple of errors in dmesg by the time it runs. But for now its a workaround. The real issue is why is the dram_clk setting on script.bin not enforced at boot time, booting up at 672 MHz instead ? P.S. The command line is : echo 624000 > /sys/devices/platform/sunxi-ddrfreq/devfreq/sunxi-ddrfreq/userspace/set_freq
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines