To try to understand what could be happening I would like to ask a few questions:
- What OS/custom OS are you using?
- Is this problem frequent, and does it happens all the time? If not, what application/emulator this issue is more noticed?
To try to understand what could be happening I would like to ask a few questions:
I am using your latest Debian 0.3 image. I have a R16-J board, the old one with no hdmi.
I made a video of the issue. I have the exact same issue with DEOT and kernels above 5.3ā¦
It happens all the time, as you can see even in framebuffer while booting.
With stock 5.3 kernel display is fine so I donāt think itās a hardware issue.
it might have to do with the fact that the old boards without the microHDMI (at the least, most of them) have half the ram of the newest boards, but i am not certain
cpi@clockworkpi :~$ cat /proc/meminfo
MemTotal: 507696 kB
I have 512mb, I think it is the same for all CPI3 boards?
I tried downclocking to 1.2ghz, 1ghz and even 800mhz and itās still flickering with either on-demand or performance governor.
then i have no idea what could be causing it other than a software bug
Thanks,
The only thing that comes to my mind is the higher clock speed. I know that you changed the governor, but can you make sure that the GameShell is running at lower frequency? I think you can manually set the frequency as well with this build.
Do you have experience in compiling kernel?
If yes, you could check my sources and I can guide you to revert to the default maximum speed. If not, I can try to rebuild a kernel for you to try in some days.
Other thing we can try is to use the default kernel that comes with the official OS and try it.
First thanks your time and commitment in this project.
I was changing frequency on the fly with cpufrequtils :
root@clockworkpi:~# cpufreq-set -f 1GHz
root@clockworkpi:~# cpufreq-info | grep ācurrent CPUā
current CPU frequency is 1.01 GHz (asserted by call to hardware).
current CPU frequency is 1.01 GHz (asserted by call to hardware).
current CPU frequency is 1.01 GHz (asserted by call to hardware).
current CPU frequency is 1.01 GHz (asserted by call to hardware).
I never compiled a kernel for the clockworkpi but instructions seem pretty straightforward and I have experience building the linux kernel for other hardware. How do I revert the source to the default clock speed?
Hi,
thanks for the information. Iām sorry to take longer to reply.
Lookās correct using cpufreq-set
, but maybe we should try to limit the CPU to run only at lower speeds when it boots. For this we should remake the dtb file. You donāt need to recompile the entire kernel.
Iām assuming you are compiling in the GameShell, you probably need some tools for it, like:
apt install git build-essential libssl-dev u-boot-tools bc
To compile, you can try:
Clone the source code and make sure we are in a branch that the patch works:
git clone https://github.com/smaeul/linux.git --branch=patch/irqchip-v2 --depth=1
cd linux
git checkout 5c715d2cdc577c52a503e055e96d4b55520a5955
Download the patch and apply it:
wget https://raw.githubusercontent.com/wolfallein/clockworkpi-debian/master/cpi-kernel-5.7.smaeul.patch
git apply cpi-kernel-5.7.smaeul.patch
Select the kernel options for clockworkpi:
make clockworkpi_cpi3_defconfig
At this point you can just run make
to compile the entire kernel, modules and dtb files. But to change only the max CPU freq we need to edit the dts file. You can remove the lines 130-154 from the arch/arm/boot/dts/sun8i-r16-clockworkpi-cpi3.dts
file, where we have the &cpu0_opp_table {
I added to have more available clock frequencies.
Or just run the sed
command bellow to comment the part we donāt want:
sed -i '130,154 s/^/\/\//' arch/arm/boot/dts/sun8i-r16-clockworkpi-cpi3.dts
This will comment the lines from 130 to 154.
Now we can compile only the dts files with:
make -j4 dtbs
Finally we can copy the new dtb to /boot
directory. If you want, remember to create a backup of your dtb to return to it if your GameShell fail to boot.
You can copy the generated file with:
cp arch/arm/boot/dts/sun8i-r16-clockworkpi-cpi3.dtb /boot/sun8i-r16-clockworkpi-cpi3.dtb
Tell me if everything is clear to follow. Ask me if you have any problems
It is very important if we can make your system work well, so we at least know what is the problem.
Thank you Joao for your detailed instructions.
I just recompiled the dtb file, I still get the same screen flickering, however CPU clock at boot is now 600 MHz. I did not compiled it on the cpi itself, I crossed-compiled it on my ubuntu 20.04 desktop.
To do so I exported the arch and cross_compile variables to my environment before selecting the kernel options :
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
make clockworkpi_cpi3_defconfig
So sadly, it is not a simple overclocking issue.
be sure to have the tcon clock min diviser set to 6 into sun4i_tcon.c
Unfortunately, I canāt seem to boot this system
Iāve tried flashing the provided img with balena etcher both on windows and on macOS. Iāve tried with dd
on macOS. Iāve tried 2 SD cards of 4 and 8 gb. There are no errors but the GameShell doesnāt boot.
Iām not seeing two partitions on the SD card after writing the img to the SD card, should there be one?
Has anyone had the same problem?
So, we can try other things. You can try the earlier patch versions that I worked:
You have patches for versions 5.4.16 (almost identical to the official), 5.5, and inside the experimental folder the new dts file, uImage and dtb already compiled for higher clock speeds.
You can also try the official 5.2 rc4 patch from here (Kernel/v0.4/52rc4.patch at master Ā· clockworkpi/Kernel Ā· GitHub) that is in the official OS v0.4
The patches listed is intended to work with official linux sources (https://www.kernel.org/). Let me know if you have any problems. At least the official should work, and we can try small changes towards the last patch (5.7) to see where it breaks.
Hello, I never changed this file, but we can check.
Letās see if he has some luck using the official kernel that came with the official OS v0.4.
In the last version we only have one ext4 partition. Something must be wrong when writing the SD card. Can you try to flash different versions to the SD card? Or even the official OS? If you can get them to work and not this version, maybe the file is corrupted. Could you re download and check with Md5sum if the numbers bellow match?
db09b371e97924f6675f81525654aa41 clockworkpi-debian.img
97ee095cbd44631f10b655248d138dc4 clockworkpi-debian.zip
I could flash both the official and the unofficial DEOT v0.5. The md5 is correct. I will try 0.2 today.
Iām thinking one thing. Is it possible that it boots without turning the screen on and without any LED? The board felt a bit warm after a while but itās very hot in Barcelona so it may also be thatā¦
on my unit the screen flicker without this change, it was also part of original clockwork patch, latest you linked donāt got it anymore
since recent linux branch the tcon value is automatically taked from table, but for us it still have the bad value, at least on my last check, on 5.7 it may have been fixed
You seem to have a similar problem as @nin977. It is likely your unit is booting up without the LCD. Could you try plugging an HDMI cable to a screen to check?
Thanks a lot for this help. My unit seems to not have any problem but maybe others does. Iāll try to implement what you suggest and maybe @nin977, and @bitdweller could try to see if this can fix the LCD issue. Unfortunatelly Iām a bit overload with work, but Iāll try to get this done this weekend.
BR
i flashed a 8gb sd card with win32diskimager, and when i try to boot up the gameshel, nothing appears in the screen. i also know it is on because it is producing a lot of heat. i know sometimes the first boot takes a long time, but itās been almost 2 hours. could someone please help me?
@Joao_Manoel thanks for the awesome work to get a stable buster debian working on the clockworkpi, can I make a suggestion to promote your initiative : maybe each time you release a new version you could start a new thread so that if someone wants to try it, they donāt have to worry about comments says āitās not workingā that are several months old and are about version 0.1 and 0.2 of the softwareā¦
Iām having some trouble with saves with this image. For some reason, it is not writing to the SD card, even when permissions are set to allow writing for everyone on the files.
Also, is there a way to change the system time within the OS?
Thanks man, help me out, I have some issue..
Hi all,
Iām sorry to disappear recently, I didnāt use my GameShell for months, and I needed to concentrate more in other projects.
Hello @Pequeno_Pedrinho, do you still have the same issue, or you managed to fix it?
@arthur, Thanks for the suggestion, but I believe that the version 0.3 is almost a final version because from there you can update/upgrade any package using the official Debian repository. The only thing missing would be the kernel that could be released as a separated deb package. Apart from fix the bugs, the only modification I would like to do is replace isc-dhcp-server in favor of dnsmasq because I found dnsmasq is much more reliable to create the network when you connect the USB cable to your computer.
The RetroArch version is a bonus, and the intention was that people would take this lite and clean Debian version to create their front end/OS.
@THTB614, where are you trying to write the saves? Remember that the storage gadget function (the storage disk you see on your PC when you connect the GameShell to your PC) is read-only on the GameShell:
You can enable write permission on the GameShell if you disable the computer to write to it, otherwise you will have a big chance of corrupting your data. If you want to do it, you can do it manually, I can send you the information if you are interested.
You should be able to write in any other part of the system without problems.
Could you explain?
BR,
JP