jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23883
Joined: Sat Jul 30, 2011 7:41 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sat Sep 14, 2019 7:00 am

graphicw wrote:
Sat Sep 14, 2019 6:19 am
OpenGL performance decreases considerably with 64 bit kernel as is. Open Arena at 1080p was a slide show under the 64 bit whereas it performed at 20 fps and better with standard kernel. YouTube and such performed the same as standard kernel.
Software instead of hardware rendering?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

graphicw
Posts: 86
Joined: Mon Sep 09, 2019 5:04 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sat Sep 14, 2019 8:03 am

Definitely acted as though it were in software rendering though the menu's still functioned at a reasonable speed.

User avatar
guidol
Posts: 69
Joined: Tue Jul 03, 2012 9:21 am
Location: Mudanya, Turkey

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sat Sep 14, 2019 9:04 am

as I did read a
Model : Raspberry Pi 3 Model B Rev 1.2
should also do run the 64Bit kernel, BUT rpi-update doesnt install a kernel8.img to /boot
and do say its all up to date :(

Iam running the server-image of raspbian buster

Maybe the /boot partition is to small? But I ddint get a error-message :(

I downloaded the actual firmware from https://github.com/raspberrypi/firmware
and copied kernel8.img to /boot and edited /boot/config.txt

So my Pi3B did boot the 64bit kernel :)

To get my AIY-Voice Hat v1 running again I had to copy from the firmware the modules for kernel v8 to /lib/modules:
cp -R ./firmware-master/modules/* /lib/modules

Now its showing:
Linux rpi3-aiy 4.19.71-v8+ #1263 SMP PREEMPT Thu Sep 12 16:28:48 BST 2019 aarch64 GNU/Linux

So a question will be to copy recursive
./firmware-master/opt/vc/*
or
./firmware-master/hardfp/opt/vc/*
to
/opt/vc

with kernel=kernel8.img now gives a error-message about a custom-kernel :)
without this line (also only arm_64bit=1) the error is gone.


My Internetradio with AIY-Voice Hat v1 is running including Node-Red & Node-Red-Dashboard with kernel8.img and the v8-modules.

PS: more /proc/cpuinfo says with 64bit kernel:
Model : Raspberry Pi 3 Model B Rev 1.2
Hardware : BCM2835
Revision : a02082

shouldnt the Pi3B have a BCM2837?

User avatar
DougieLawson
Posts: 36316
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sat Sep 14, 2019 9:37 am

You need to expand the boot partition to 256MB. rpi-update is a 110MB zipped download now.

The hard part is that parted/gparted won't work on the existing /boot partition. So you have to trash it and recreate it.

We've almost reached the point where the minimum size SDCard for Raspbian is 16GB.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
guidol
Posts: 69
Joined: Tue Jul 03, 2012 9:21 am
Location: Mudanya, Turkey

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sat Sep 14, 2019 9:50 am

DougieLawson wrote:
Sat Sep 14, 2019 9:37 am
You need to expand the boot partition to 256MB. rpi-update is a 110MB zipped download now.
The hard part is that parted/gparted won't work on the existing /boot partition. So you have to trash it and recreate it.
We've almost reached the point where the minimum size SDCard for Raspbian is 16GB.
The only problem I see is that /boot is the first partition:

Code: Select all

/dev/mmcblk0p1     43234   35605      7629  83% /boot

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1       8192    96042    87851 42.9M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      98304 31116287 31017984 14.8G 83 Linux
When I trash it I cant resize it, because / (root) will start at 98304 :(

rpi-update did work in the inital start (did say "first time" and did download and install - but I havent saved the log to which version. was a long hex-string)

User avatar
DougieLawson
Posts: 36316
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sat Sep 14, 2019 11:01 am

You can do that with a RPi booted from some other SDCard with gparted. It will move and re-size EXT4 partitions. It won't resize /boot.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

PaPaTheGMan
Posts: 4
Joined: Mon May 20, 2019 2:33 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sat Sep 14, 2019 12:54 pm

Just an update. I was able to update my '4' just fine. I did, however, have a problem with Docker. It wouldn't run at all, so I had to revert back to 32 bit.

User avatar
guidol
Posts: 69
Joined: Tue Jul 03, 2012 9:21 am
Location: Mudanya, Turkey

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sat Sep 14, 2019 4:27 pm

DougieLawson wrote:
Sat Sep 14, 2019 11:01 am
You can do that with a RPi booted from some other SDCard with gparted. It will move and re-size EXT4 partitions. It won't resize /boot.
I did it the following way:
- backuped the contents of the 2 partitions to 2 directorys on another linux (armbian) system
- partitioned another sdcard with 2 new partitions (No 1 FAT32 bootable 512MB, No 2 ext4 14.x GB)
- formated the partitions via mkfs
- mount the 2 partitions
- restored the contents of the 2 directorys to the 2 partitions
- requested the new partitions ids via blkid
- edited cmdline.txt for the id of the ext4 partiton blkid
- edited /etc/fstab for the id of the fat32 & ext4 partition blkid
- umount the 2 partitions

Now the RPi 3B did boot from the "new" SDCard.

/boot has now enough space:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mmcblk0p1 523248 36104 487144 7% /boot

rpi-update did download the 113MB, BUT didnt installed the v8+ kernel :(

Code: Select all

rpi-update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** Performing self-update
 *** Relaunching after update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** We're running for the first time
 *** Backing up files (this will take a few minutes)
 *** Backing up firmware
 *** Remove old modules backup
 *** Backing up modules 4.19.71-v8+
#############################################################
WARNING: 'rpi-update' updates to pre-releases of the linux
kernel tree and Videocore firmware.

'rpi-update' should only be used if there is a specific
reason to do so - for example, a request by a Raspberry Pi
engineer.

DO NOT use 'rpi-update' as part of a regular update process.

##############################################################
Would you like to proceed? (y/N)

 *** Downloading specific firmware revision (this will take a few minutes)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   168    0   168    0     0    410      0 --:--:-- --:--:-- --:--:--   410
100  113M  100  113M    0     0  1233k      0  0:01:34  0:01:34 --:--:-- 1256k
 *** Updating firmware
 *** Updating kernel modules
 *** depmod 4.19.71+
 *** depmod 4.19.71-v7+
 *** Updating VideoCore libraries
 *** Using HardFP libraries
 *** Updating SDK
 *** Running ldconfig
 *** Storing current firmware revision
 *** Deleting downloaded files
 *** Syncing changes to disk
 *** If no errors appeared, your firmware was successfully updated to 1a244df8143cd07a7417d212f59ac9f3a037f9b1
 *** A reboot is needed to activate the new firmware

- reboot - 

rpi-update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** Performing self-update
 *** Relaunching after update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** Your firmware is already up to date
Any idea why this happens on a Pi 3B?

quattrofoto
Posts: 6
Joined: Fri Jul 06, 2018 9:33 am

Re: Pi4 64-bit raspbian kernel for testing

Sat Sep 14, 2019 7:00 pm

dom wrote:
Wed Sep 04, 2019 12:20 pm
dom wrote:
Wed Sep 04, 2019 11:36 am
The requirement for kernel=kernel8.img was mentioned in first post.
I'm just building a firmware that will go out later that make that no longer necessary.
Firmware pushed. arm_64bit=1 is all you need to enable 64-bit kernel on Pi3 too now.
Neither of these work for me with a RPi 3b+, I tried updating my original image, that broke it so I started with a fresh Buster image, which also broke. I trried both 'arm_64bit=1' and 'kernel=kernel8.img' and both result in the same - I get the graphics test, the four raspberries, followed by the 'Welcome to Raspbian" stage, complete with some boot up messages below it that flash on and off too fast to be of use to anyone, and then a blank screen, nothing else happens after that. If I remove the edit in config.txt on a different computer everything works again (but using the 32bit kernel of course). The only thing I could think of was my non-official 7 inch touchscreen was the reason, but it's exactly the same when using any of the other standard monitors I have available. I haven't messed up any of the steps - if I'm honest I'm not sure it is possible, I mean what's to get wrong? I didn't have any errors during the firmware upgrade so I'm baffled how others seem to be having success but mine is not working, for no obvious reason.

User avatar
guidol
Posts: 69
Joined: Tue Jul 03, 2012 9:21 am
Location: Mudanya, Turkey

Re: Pi4 64-bit raspbian kernel for testing

Sat Sep 14, 2019 7:18 pm

quattrofoto wrote:
Sat Sep 14, 2019 7:00 pm
I haven't messed up any of the steps - if I'm honest I'm not sure it is possible, I mean what's to get wrong?
I didn't have any errors during the firmware upgrade so I'm baffled how others seem to be having success
but mine is not working, for no obvious reason.
The firmware update also seeem to succeed on my Pi3B (see above today in the thread), but the rpi-update DIDNT
install the kernel8.img to /boot

So if you do try to use the 64bit kernel = kernel8.img then the Pi3B couldnt start.
Check if you have a kernel8.img in your /boot directory and a 4.19.71-v8+ directory with modules in you /lib/modules directory.

If this directorys/files arent there you havent a 64bit kernel to start - which means that rpi-update didnt work as aspected.

Also check with the df command how big you /boot-directory (partition1 of the card = FAT32) is.
For the rpi-update (113MB as .zip) you should have at least 256MB in the first partition (my was before my test also only around 42-46MB space)

jdonald
Posts: 415
Joined: Fri Nov 03, 2017 4:36 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sat Sep 14, 2019 7:32 pm

graphicw wrote:
Sat Sep 14, 2019 6:19 am
OpenGL performance decreases considerably with 64 bit kernel as is. Open Arena at 1080p was a slide show under the 64 bit whereas it performed at 20 fps and better with standard kernel. YouTube and such performed the same as standard kernel.
Are you running one of the recommended configurations, namely opengl1, as described in the OpenArena thread?

1280x720 opengl1 runs on my Pi 4 at 55~65 fps in aarch64 kernel mode, same for the 32-bit kernel. If I switch back to the default opengl2 it drops to 10 fps due to the known issue, but it's the same with both kernels.

To check if your system is stuck in software rendering, install mesa-utils and run:

Code: Select all

glxinfo | egrep 'Vendor|Device'
Note if you are running openarena inside a chroot, you'll likely require a custom build of Mesa because Debian Buster is unfortunately tied to Mesa 19.0.

User avatar
esbeeb
Posts: 111
Joined: Sun Feb 05, 2012 12:23 am

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sat Sep 14, 2019 11:24 pm

ShiftPlusOne wrote:
Wed Sep 11, 2019 11:49 am
Having played around with a debian arm64 container a bit, I've got to eat crow.

Going from hardfp armv6 to Debian's armv7 binaries may not have been much of an improvement, but debian's arm64 binaries makes a much bigger difference than I would've expected - double-digit in some cases. Using debootstrap to install to tmpfs (to avoid IO bottlenecks) is 20% faster and xz is about 8% faster.
I'm grateful that Raspbian is moving towards 64-bit! I too am surprised that performance gains like that were found. :D

Here's a crazy idea. Raspberry Pi Foundation could incentivize the discovery of more such performance gains (and shake out many new bugs in the transition to 64-bit) by offering a bounty of a new Raspberry Pi 4, 1GB model, with a power supply (a suitable rig for basic testing), shipped all-expenses paid, to any RPi 4-using forum user who discovers something that goes, say, >=17% faster if you do it in 64-bit mode, instead of 32-bit mode. Showing the math will be necessary with commands like "time", proving a >=17% gain.

Feel free to change this recipe for what constitutes a bounty winner, and what the bounty prize is.

This could be called, say an "eating-crow" bounty.

trejan
Posts: 738
Joined: Tue Jul 02, 2019 2:28 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sat Sep 14, 2019 11:36 pm

esbeeb wrote:
Sat Sep 14, 2019 11:24 pm
Raspberry Pi Foundation could incentivize the discovery of more such performance gains (and shake out many new bugs in the transition to 64-bit) by offering a bounty of a new Raspberry Pi 4, 1GB model, with a power supply (a suitable rig for basic testing), shipped all-expenses paid, to any RPi 4-using forum user who discovers something that goes, say, >=17% faster if you do it in 64-bit mode, instead of 32-bit mode.
That is a fairly expensive bounty for somebody running benchmarks. I'm not sure how it actually helps anyway apart from getting some numbers to put in a headline.

jdonald
Posts: 415
Joined: Fri Nov 03, 2017 4:36 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sun Sep 15, 2019 2:47 am

ejolson had a related idea: a bounty for fixing 64-bit performance issues, such as the slowdown with OpenSSL 1.1.0's AES aarch64 implementation. Bounties could also be made for fixing 64-bit functionality bugs such as any that come up in this thread. That seems more aligned with interests on all sides.
graphicw wrote:
Sat Sep 14, 2019 6:19 am
YouTube and such performed the same as standard kernel.
Interesting to hear that Chromium has no problems with video decode. I then went and tested vlc --vout=mmal_vout and am pleasantly surprised to see MMAL working in 64-bit.

User avatar
esbeeb
Posts: 111
Joined: Sun Feb 05, 2012 12:23 am

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sun Sep 15, 2019 4:45 am

trejan wrote:
Sat Sep 14, 2019 11:36 pm
esbeeb wrote:
Sat Sep 14, 2019 11:24 pm
Raspberry Pi Foundation could incentivize the discovery of more such performance gains (and shake out many new bugs in the transition to 64-bit) by offering a bounty of a new Raspberry Pi 4, 1GB model, with a power supply (a suitable rig for basic testing), shipped all-expenses paid, to any RPi 4-using forum user who discovers something that goes, say, >=17% faster if you do it in 64-bit mode, instead of 32-bit mode.
That is a fairly expensive bounty for somebody running benchmarks. I'm not sure how it actually helps anyway apart from getting some numbers to put in a headline.
I think the Raspberry Pi Engineers would get the benefit of more testers being attracted, and more tester contributions, such as discovering bugs. Hiring QA developers is not cheap, you know. Getting the loyal community to help out more is actually worth a lot, I say (and I am trying to encourage it further).

Yes, the Raspberry Pi Marketing team would benefit from also getting stats to advertise.

I think the end users would benefit from having more things "Just Work" on the day Raspbian 64 gets publicly released, because these 64bit-specific bugs got discovered more aggressively beforehand.

I've toyed around with Armbian, and learned the hard way that it is unwise to assume that software that works bug-free in AMD64 (or likewise in 32-bit ARM) will just as easily work bug-free in 64-bit ARM.

I won't be offended if my idea doesn't get used, BTW. I just wanted to try to encourage more QA-sort of help, even from those who are not really programmers, but quite easily know when something is faster or slower than before.

trejan
Posts: 738
Joined: Tue Jul 02, 2019 2:28 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sun Sep 15, 2019 5:37 am

esbeeb wrote:
Sun Sep 15, 2019 4:45 am
I think the Raspberry Pi Engineers would get the benefit of more testers being attracted, and more tester contributions, such as discovering bugs. Hiring QA developers is not cheap, you know. Getting the loyal community to help out more is actually worth a lot, I say (and I am trying to encourage it further).
You're not encouraging good testing with that bounty system. You're dangling a big carrot for people to find obscure packages and contrived situations to get a 17%+ performance increase for free hardware. There is no incentive to report/fix bugs. Any bugs that are found may not be an AArch64 problem and most of them will just be reported to the software author or package maintainer anyway. Somebody will need to manage a database of what software has already been shown to have a performance increase as well.

ejolson's idea would be a much better option where you have specific bounties for things like the OpenSSL hand tuned assembler routines for AArch64. Picking good bounty targets will be much more productive than a benchmarking free for all.

pica200
Posts: 140
Joined: Tue Aug 06, 2019 10:27 am

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sun Sep 15, 2019 8:06 am

+1
You want people to do something benefiting the whole community for a bounty. These benchmarks are not useful except for comparing differences. Polishing existing code to work better on AArch64 is a good idea.

bullen
Posts: 283
Joined: Sun Apr 28, 2013 2:52 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sun Sep 15, 2019 12:18 pm

Does Minecraft 1.14.4 work out-of-the-box on this?

You need 64-bit Java: http://move.rupy.se/file/jdk-8u181-linu ... flt.tar.gz

And the new Java launcher: http://move.rupy.se/file/launcher.jar
https://github.com/tinspin/rupy - A tiny Java async HTTP application server.

jdonald
Posts: 415
Joined: Fri Nov 03, 2017 4:36 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Mon Sep 16, 2019 2:14 am

Thanks for pointing out the new launcher. If I switch to that one and use rpiMike's scripts, Minecraft 1.14.4 with OptiFine runs for me alright inside a Debian arm64 chroot.

I wouldn't say the 64-bit version runs "out-of-the-box" on Raspbian. For one you need to set up the chroot. Second, due to Debian Buster missing the cut on Mesa 19.1, you'll need to install and run a custom build of Mesa.

Note MamiyaOtaru got 1.14.4 to run in 32-bit when nobody else could, but now I suspect the solution there is to use the right launcher.

saksoook
Posts: 1
Joined: Mon Sep 16, 2019 10:25 am

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Mon Sep 16, 2019 11:01 am

After installing the 64-bit kernel using rpi-update and changing the config.txt to add the needed line, I started the system and everything looked fine at the beginning but when I started to use konsole (KDE terminal Emulator) I faced a strange issue where the konsole suddenly closes (crashes) when the output is big (for example find result or big directory ls -al output), i checked the log files and nothing was there.

I used the virtual console (Ctrl+Alt+F1) and there everything worked fine, finally after troubleshooting for a while, I decided to run konsole command inside the konsole (to see if there will be an error thrown on the konsole) and yes I found that konsole causes "Bus Error".

When I returned back to the old kernel (commented the line in config.txt) konsole worked fine and no issues occured.

NOTE: While I was trying different things I found interesting other issues like that "clear" command causes the konsole to crash too with Bus Error, also if I used less command to pipe the output it will continue to work fine but if I used more it will crash with Bus Error (example ls -al | less => works but ls -al | more crashes)

The following images shows the following:
1- The konsole before running clear command
Screenshot_before.png
Screenshot_before.png (163.24 KiB) Viewed 2040 times
2- The error that occured after running clear command
Screenshot_after.png
Screenshot_after.png (212.49 KiB) Viewed 2040 times
3- The output of uname -a (could not attach the file so I am writing it)
Linux Machine 4.19.71-v8+ #1263 SMP PREEMPT Thu Sep 12 .... aarch64 GNU/Linux
4- The last few lines of the /proc/cpuinfo
Screenshot_cpuinfo.png
Screenshot_cpuinfo.png (185.43 KiB) Viewed 2040 times

RasUser
Posts: 1
Joined: Mon Sep 16, 2019 9:59 am

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Mon Sep 16, 2019 2:15 pm

what do I do with this part>? I have the Pi4 do I need to do this?
Code: Select all

pi@pi4:~ $ uname -a
Linux domnfs 4.19.69-v8+ #1261 SMP PREEMPT Tue Sep 3 20:27:16 BST 2019 aarch64 GNU/Linux

mentaluproar
Posts: 13
Joined: Sun Mar 20, 2016 7:57 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Tue Sep 17, 2019 2:55 am

Saskook, I had the same problem doing apt install, but only for some packages and only if I used Konsole. Any other terminal interface was fine.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5341
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Pi4 64-bit raspbian kernel for testing

Tue Sep 17, 2019 11:30 am

guidol wrote:
Sat Sep 14, 2019 7:18 pm
The firmware update also seeem to succeed on my Pi3B (see above today in the thread), but the rpi-update DIDNT
install the kernel8.img to /boot
Sounds like you are not updating from a debian buster image.
If there isn't currently a Pi4 kernel (kernel7l.img) on /boot then rpi-udate won't update Pi4 files
(and we consider kernel8.img to be part of the Pi4 files).

You can run:

Code: Select all

WANT_PI4=1 rpi-update
to force including the Pi4 files on a system that didn't previously support Pi4,
but be aware raspbian images before buster had a smaller /boot partition
so the new files may not fit.

alump
Posts: 3
Joined: Sun Aug 18, 2019 5:59 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Tue Sep 17, 2019 4:52 pm

After running pi few days, something goes wrong with 64bit kernel, and all I/O operations start to timeout. I'm running Rasbian from USB/SSD, so basically the whole OS will freeze. Dmesg is full of "INFO: task X blocked for more than 120 seconds" messages with stack traces. It has now happened 3 times a row since I moved to 64bit kernel. Not sure how move to 64bit managed to break this, but I didn't have this issue with 32bit kernel. Debugging this is little hard as nothing below root folder can be accessed once issue activates.

I will try to see if upgrading VLI firmware to 0137ab would help with this issue.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5341
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Tue Sep 17, 2019 5:21 pm

alump wrote:
Tue Sep 17, 2019 4:52 pm
After running pi few days, something goes wrong with 64bit kernel, and all I/O operations start to timeout
Post complete dmesg log in case there are any useful clues.
Keep an eye out for anything specific that provokes it.

Return to “Advanced users”