Author Topic: Linux kernel packages 5.9.6 for Debian buster with 4k page size available  (Read 10574 times)

pocock

  • Sr. Member
  • ****
  • Posts: 291
  • Karma: +32/-0
    • View Profile
As promised, the packaged version of the kernel is now available for people who want to test the 4k page size.  There is another thread tracking problems related to the 64k page size, in other words, reasons you might want to try the kernel here with 4k

Debian kernel packaging tools allow me to build multiple flavours of the kernel as separate packages and you can install all of them concurrently.  Therefore, you can install the default kernel with 64k page size and also the kernel with 4k page size at the same time.  When you boot, the grub menu will let you choose between these different kernels.

If you didn't already use any of the packages from the Debify repository then you need to enable the repository with this command:

Code: [Select]
$ wget -O - http://apt.debify.org/add-apt-debify | bash

After enabling the repository, you can get the new kernel with these two apt commands:

Code: [Select]
$ sudo apt update
$ sudo apt install -t debify-buster-backports linux-image-powerpc64le-4k
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  linux-image-5.9.0-0.bpo.2-powerpc64le-4k
Suggested packages:
  linux-doc-5.9 debian-kernel-handbook mkvmlinuz
The following NEW packages will be installed:
  linux-image-5.9.0-0.bpo.2-powerpc64le-4k linux-image-powerpc64le-4k
0 upgraded, 2 newly installed, 0 to remove and 10 not upgraded.
Need to get 40.3 MB of archives.
After this operation, 240 MB of additional disk space will be used.
Do you want to continue? [Y/n]



Please share any feedback about using the package
Debian Developer
https://danielpocock.com

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Hi Pocock, I did the tests with this variant with 4k pages that you entered today. After installing the Kernel, I placed the usual GPU enable file in the usr / share / X11 / xorg.conf folder. The file just to be precise in everything has this content:
# AST2500
Section "Device"
    Identifier "GPU0"
    "Modesetting" driver
    BusID "PCI: 2 @ 5: 0: 0"
    VendorName "ASpeed ​​Corporation"
EndSection

# RX5700 XT
Section "Device"
    Identifier "GPU1"
    Driver "modesetting" # or amdgpu if you have xf86-video-amdgpu installed
    BusID "PCI: 3 @ 0: 0: 0"
    VendorName "AMD Corporation"
EndSection

# this is absolutely necessary, it tells xorg which GPU to use for the screen
Section "Screen"
    Identifier "Screen0"
    Device "GPU1"
EndSection

I use it regularly on Fedora too so I don't think there are any variables when working under Xorg.
After this I restart the computer, I start the kernel you posted, when the operating system loads, it first gave me that output that I posted earlier, that error that was seen during loading and consequently it blocked everything, now instead it no longer gives that error output, it also seems to want to activate the Radeon as it does a sort of restart by turning off and restarting, I see it from the Radeon writing that turns off and then after a few seconds it turns on again. It gets to the gray screen that usually appears before the mouse pointer and login but instead of making all these things appear it stays in that screen and everything crashes irreversibly. So unfortunately even if it seems that we have taken a step forward, we still can't get everything to work with the Navi 10. It seems as if that famous bug that continues to persist in the Fedora Kernel from version 5.7 onwards, is also present in this Debian Kernel. I don't know if there are files that the various Kernel of the various distros share in the same way, obviously apart from the GPU drivers, the fact is that even here we have a very similar problem. Having said that I keep pointing out that even when you load this kernel 5.9, during system loading, in the output list that Debian does when it is loading, it always keeps giving me that error of failure to load the Kernel modules. It does this with both the standard 4.19 and this 5.9. I do assume that Debian installed it more than once to always improve installation details, like some options I forgot or whatever, but in general the main installation has always been the standard one that everyone does. I don't know if it's a 10.7 issue or something else, I just know that that output has always been, so there are obvious Kernel problems as a whole on Debian ...

pocock

  • Sr. Member
  • ****
  • Posts: 291
  • Karma: +32/-0
    • View Profile

Thanks for this detailed feedback

The next step may be to try updating the packages for mesa.  This is definitely required for the new RX 6800 family.

Notice that Debian buster (currently stable) only has mesa 18.3.6 but bullseye (the next release, testing) has 20.2.6

Phoronix wrote that mesa 20.2 is the minimum for RX 6000

This article also suggests mesa 19.2 is needed for RX 5700

If I can provide a new mesa package for you, do you want to try it?

To summarize, I think that the combination of these three things might be the solution on Debian:

  • recent kernel
  • 4k page size
  • mesa 19.2 or greater

As Fedora releases are more frequent they already have some coverage for this but not the 4k page size.

You could manually copy the kernel with 4k page size into Fedora and see if it boots or you could try to build a Fedora custom kernel with 4k page size: based on your partial progress with the 4k page size on Debian, this might get you over the line in Fedora.
Debian Developer
https://danielpocock.com

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Yes, if I'm not mistaken it takes mesa 19.2 minimum, I think I've read it around.  Yes, you can provide me with this package as long as you usually give me the exact procedure to install it.  Use this Kernel for Fedora?  I don't know how to install it though, to install a kernel on Fedora I usually use the "rpm" command and install the kernel package and the kernel core package which then carries its dependencies.  Here on Debian I have seen that it doesn't work like that and I don't know how to do it and I'm not able to create a custom Kernel, I'm not a developer like you unfortunately ...

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Pocock, however, I also need to know how to remove a Kernel of these that is not in the list of kernels used by Debian.  If I query the system, it tells me it only has the standard 4.19 kernel and that's it.  How do I remove the 5.9 version I installed at the beginning, the one not posted by you?  And how should I try to install your Kernel on Fedora to do the test?  Is the procedure the same as in Debian?  Thanks

pocock

  • Sr. Member
  • ****
  • Posts: 291
  • Karma: +32/-0
    • View Profile
I put the mesa packages into the build server, it takes time to build but I think they'll be ready tomorrow or Tuesday.

For Fedora: can you please ask on the fedora-devel list if anybody in their kernel team can copy what I did here to simultaneously build both 64k and 4k flavours of the kernel for Debian?

On the Debian system, you can check which kernels are installed like this (notice I begin by checking which kernel is active):

Code: [Select]
$ uname -a
Linux ws3 4.19.0-10-powerpc64le-4k #1 SMP Debian 4.19.132-2 (2020-09-16) ppc64le GNU/Linux
$ dpkg -l | grep linux-image
ii  linux-image-4.19.0-10-powerpc64le-4k                        4.19.132-2                                   ppc64el      Linux 4.19 for Little-endian 64-bit PowerPC (4k page size)

You can remove a kernel package from the system like this but please don't try to remove the kernel that is currently active, you need to reboot into a different kernel before you run the command:

Code: [Select]
$ sudo dpkg --purge linux-image-4.19.0-10-powerpc64le-4k

I'm not a developer like you unfortunately ...

If you play with this platform for long enough you will be a developer too.
Debian Developer
https://danielpocock.com

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Ok thanks, for mesa I will wait for you to finish the job, for the Kernel I know well that I have to keep active one that works of course, currently only 4.19 is running and I certainly do not touch that otherwise I can no longer do anything. I just want to remove the 64k version of 5.9 which doesn't work as you know so no use keeping it installed. I'll try to ask the kernel team if they can do what you tell me ... Thanks for everything

pocock

  • Sr. Member
  • ****
  • Posts: 291
  • Karma: +32/-0
    • View Profile
Do you want me to provide you with a 4k version of the 4.19 kernel?  That is what I am currently running myself, I have the RX 580 GPU so I don't need the 5.x series kernels yet.

Before I give you a command to remove the 5.9 (64k) kernel, can you please show me the output of this command:

Code: [Select]
$ dpkg -l | grep linux-image

The mesa package is now ready, this is how you install it, notice you have to add an additional APT source and use the update command before dist-upgrade:

Code: [Select]
$ sudo -i
# cat >> /etc/apt/sources.list.d/debify.list << EOF
deb http://apt.debify.org/debify debify-buster-backports-mesa main contrib non-free
EOF
# exit
$ sudo apt update
Get:12 http://apt.debify.org/debify debify-buster-backports/main ppc64el Packages [69.4 kB]
27 packages can be upgraded. Run 'apt list --upgradable' to see them.




$ sudo apt -d dist-upgrade
Reading package lists... Done
The following NEW packages will be installed:
  libegl-dev libgl-dev libgles-dev libglx-dev libopengl-dev
The following packages will be upgraded:
  libegl-mesa0 libegl1 libegl1-mesa libegl1-mesa-dev libgbm-dev libgbm1 libgl1 libgl1-mesa-dev libgl1-mesa-dri libglapi-mesa libgles1 libgles2
  libgles2-mesa-dev libglvnd-core-dev libglvnd-dev libglvnd0 libglx-mesa0 libglx0 libopengl0 mesa-common-dev mesa-va-drivers mesa-vdpau-drivers
22 upgraded, 5 newly installed, 0 to remove and 5 not upgraded.
Need to get 15.0 MB of archives.
After this operation, 92.2 MB of additional disk space will be used.
Do you want to continue? [Y/n]

« Last Edit: June 19, 2021, 03:01:07 am by pocock »
Debian Developer
https://danielpocock.com

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Hi Pocock, I followed your last instructions, I installed the mesa graphics libraries in version 20, I rebooted with Kernel 5.9 with 4k format but unfortunately the problem remains ... I still think that there is a conflict between the Kernel files  from version 5.7 onwards and the Navi 10 drivers ... It is not the fault of the page format or at least it is not the only problem ... On the other hand I am noticing that Debian is really behind on everything, its software too old compared to  'current, I don't think I will keep it for long at this point ... Another anomalous thing it does is while it loads the operating system, it resets the GPU and it doesn't seem so normal to me, Fedora doesn't do any of this when  starts the GPU ... I send you the output of the command for the Kernel, what I want to eliminate in the meantime is the 64k one ...

pocock

  • Sr. Member
  • ****
  • Posts: 291
  • Karma: +32/-0
    • View Profile
Can you please share the output of this command too:

Code: [Select]
$ dpkg -l | grep firmware-


Your system might have an old firmware package.  You can download firmware packages directly from the Debian servers, for example, using the links here to find the *.deb files

Did you also try to disable Wayland in your gdm config to see if that makes it work?

To remove the 5.9 kernel with 64k page size:

Code: [Select]
$ sudo dpkg --purge linux-image-5.9.0-0.bpo.2-powerpc64le linux-image-powerpc64le

Debian Developer
https://danielpocock.com

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Re: Linux kernel packages 5.9.6 for Debian buster with 4k page size available
« Reply #10 on: January 04, 2021, 03:22:25 pm »
No I haven't tried to disable Wayland, in fact I don't know if Debian now also enables it by default in fact. I will try to insert that line in that file you are talking about in the discussion dedicated to Wayland and I will try to see the firmware installed, what version must there be to be correct?
Yes I understood that I had to remove the kernel with this command thanks to the information ...

pocock

  • Sr. Member
  • ****
  • Posts: 291
  • Karma: +32/-0
    • View Profile
Re: Linux kernel packages 5.9.6 for Debian buster with 4k page size available
« Reply #11 on: January 04, 2021, 03:26:35 pm »

Wayland: yes, Debian enables it by default.  If you remove the '#' in the config, that disables it

For the firmware, for an RX 5700, I think that you want to make sure it is a 2020 firmware package.  If you have the 2019 firmware package that may not be OK.

For Big Navi, RX 6800 / RX 6900, the 2020 firmware package may not be sufficient, it may require the next firmware package or a manual installation of the firmware from Git.
Debian Developer
https://danielpocock.com

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Re: Linux kernel packages 5.9.6 for Debian buster with 4k page size available
« Reply #12 on: January 05, 2021, 07:15:00 am »
Pocock, while verifying the firmware installed on Debian, I wanted to understand if to try the Kernel 5.9 4K that you compiled on Fedora, you can perform the exact same procedure that is used for Debian ... What can you tell me about it?

pocock

  • Sr. Member
  • ****
  • Posts: 291
  • Karma: +32/-0
    • View Profile
Re: Linux kernel packages 5.9.6 for Debian buster with 4k page size available
« Reply #13 on: January 05, 2021, 07:49:51 am »

For the firmware, can you please show me the output confirming which firmware you already have?

For using the kernel on Fedora: this is not what I would regard as a supported installation, it is a hack.  What you can try to do:

a) unpack the 5.9 Debian kernel package in a temporary location (use dpkg -X)

b) repack it into a tar file

c) copy the tar file into a Fedora system

d) untar the file in Fedora

e) manually copy the files into the correct places on Fedora, for example, copy the vmlinux and initrd file to /boot and copy the modules to /lib/modules, be careful not to overwrite any other files in those places or Fedora may not boot again

f) on the next boot, in petitboot, manually edit the petitboot settings to use the vmlinux and initrd file

This is unsupported from either Debian or Fedora but it may let you test.  In the Fedora environment, everything else will be much newer than in Debian, you will already have newer mesa, newer Xorg, newer firmware, maybe the RX 5700 will work.

Fedora's wiki provides instructions for building the kernel as an RPM, this might be a better way to proceed.  It is not very difficult.  The only thing you need to change in the official package is this one line:

Code: [Select]
CONFIG_PPC_64K_PAGES=n

According to search results people did get the RX 5700 working on Debian buster on x86 / 4k.  One of them mentions firmware.  You can try to download and install the firmware update like this:

Code: [Select]
sudo apt update
sudo apt install -t buster-backports firmware-linux-nonfree
Debian Developer
https://danielpocock.com

MauryG5

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +22/-1
    • View Profile
Re: Linux kernel packages 5.9.6 for Debian buster with 4k page size available
« Reply #14 on: January 05, 2021, 03:05:01 pm »
Pocock here is the output you asked me, I hope it is well readable ...