Suspending on Battery and Overheating Shutdowns

Can you tell me how to boot from a previous kernel on the Librem 5? I might try that.

1 Like

No (would have to research by my own), but I’m sure there is someone who knows this.

1 Like

What specific kernel version is that? I think mine is 6.6.0-1-librem5 but I thought it has been on this for some time.

1 Like

Not sure.

Lack of airflow/ventilation.

1 Like

Hello. Thank you for responding. I know this is a support issue but Purism is not really doing support right now, as far as I can tell. Is there a secret to getting them to respond that I am not aware of? I don’t really want to ping the contact person here.

1 Like

Search the internet for “Linux boot from different kernel.”

1 Like

Hello. I did that. It came down to how to access the bootloader or the GRUB menu. I searched forums here and read something about Uboot, etc. I tried holding volume up and pressing the power button while powered off. Nothing happened.

How do I do access the boot menu or Grub on the Librem 5 so that I can ask it to load the older kernel that I downloaded using APT?

2 Likes

My bad, re the bootloader.

Info, @dos?

dpkg --list | grep linux-image shows 3 kernels present for me, by the way.

1 Like

I always remove the old kernels by habit but I did fetch and older kernel in apt.

Now how do I boot it?

2 Likes

No secrets:

2 Likes

When you install a Librem 5 kernel with apt, flash-kernel script runs and installs the kernel, initramfs, and respective devicetree files in the boot location. Its manual page explains why the older version of the kernel is not put in the boot location when a newer version is already installed:

Optionally, it can be passed a version of the kernel to flash; only the highest version will be flashed and other versions will be ignored unless the --force option is used. Kernel and initrd are read from /boot.

The following worked for me. Don’t forget to backup first in case anything goes wrong!

I checked the available kernel versions.

$ LC_ALL=en apt list linux-image-*-librem5
Listing... Done
linux-image-6.2.0-1-librem5/byzantium 6.2.13pureos3 arm64
linux-image-6.3.0-1-librem5/byzantium 6.3.7pureos1 arm64
linux-image-6.5.0-1-librem5/now 6.5.13pureos1~byz1 arm64 [installed,local]
linux-image-6.6.0-1-librem5/byzantium-updates,now 6.6.34pureos1~byz1 arm64 [installed,automatic]

So, I have two kernels installed. If I didn’t have the previous version, I would install its package with apt.

$ ls /usr/lib/linux-image-*-librem5
/usr/lib/linux-image-6.5.0-1-librem5:
freescale

/usr/lib/linux-image-6.6.0-1-librem5:
freescale

Installing the older version:

$ sudo flash-kernel --force 6.5.0-1-librem5
Using DTB: freescale/imx8mq-librem5-r4.dtb
Installing /usr/lib/linux-image-6.5.0-1-librem5/freescale/imx8mq-librem5-r4.dtb into /boot/dtbs/6.5.0-1-librem5/freescale/imx8mq-librem5-r4.dtb
Taking backup of imx8mq-librem5-r4.dtb.
Installing new imx8mq-librem5-r4.dtb.
flash-kernel: forcing install of 6.5.0-1-librem5 instead of 6.6.0-1-librem5.
flash-kernel: WARNING: Installing any new kernel package might override this.
flash-kernel: installing version 6.5.0-1-librem5
Generating boot script u-boot image... done.
Taking backup of boot.scr.
Installing new boot.scr.

Note that --force must go between the command and the kernel version argument.

Before reboot.

$ uname -a
Linux pureos 6.6.0-1-librem5 #1 SMP PREEMPT Sun Jul  7 20:23:17 EDT 2024 aarch64 GNU/Linux

After reboot.

$ uname -a
Linux pureos 6.5.0-1-librem5 #1 SMP PREEMPT Fri Dec  8 19:43:40 UTC 2023 aarch64 GNU/Linux
4 Likes

That looks good to me. Thank you. I will report back.

Edit as of 08/18/2024: the phone runs much cooler and, even better, it suspends again! Thank you very much. Fingers crossed that this continues.

(As an aside, the heating and cooling cause some minor screen tear in my screen. Frustrating. Luckily, I have the ability to buy and install a new screen, if I so choose).

1 Like

linux-image-6.5.0-1-librem5/now 6.5.13pureos1~byz1 arm64 [installed,local]

I hate to be a pain, but where did you get this kernel image. I have linux-image-6.3.0-1-librem5 that I can use but I would rather only only back to 6.5.0-1 if I can.

Did you install it locally? If so, where did you get a copy of that kernel image? Thank you!

1 Like

Any idea why updating the kernel creates different problems for different phones, all of which run the same operating system? I wonder, does my phone have slightly different hardware?

I am also concerned I am not running the most current firmware which I also need to figure-out. I don’t know a lot about this area.

1 Like

Different use cases. I realized in meantime that my heating only happens powered via USB (even if battery is fully charged). Little differences can lead to different situations.

Every device has slightly different hardware btw. Even mass product CPUs of the same charge are different. I remember a test where a lot of exactly same CPUs in the exactly same setup result in different CPU-speed. Just a few percentages, but measurable. But that does not mean that’s the reason for your issue.

I think @dos is the better person to ask about this area. My own knowledge is also very limited.

2 Likes

For starters, identify what causes the abnormal heat. Is the CPU getting busy? Is there an interrupt storm? Does it still happen when the phone stays suspended with all HKS engaged? Is it a software or hardware thing?

My phone gets fairly warm when under active usage and generates some noticeable heat when charging with high current, which is perfectly normal. It stays close to ambient temperature otherwise, plugged in or not. That’s the expected behavior. If what you’re experiencing is different, you need to look closer at what’s going on. There’s tons of reasons why it may happen and it’s hard to tell what could it be without having the device in question in front of you.

3 Likes

I certainly understand all of this. I need some support from Purism and I am not getting it. Which is a bummer. I appreciate your thoughts, time, rants, efforts, etc.

2 Likes

No, I didn’t install the package for that kernel. So, since it is marked as installed (installed), rather than automatically installed (installed,automatic), it must have been present in the PureOS image, which the script selected when I was reflashing my Librem 5 earlier this year. I do not know why the package is not in the apt repository (local).

apt states that the kernel package version is 6.5.13pureos1~byz1 and the homepage is https://source.puri.sm/Librem5/linux. An arbitrary package from the build artifacts of the source code repository cannot be guaranteed to be stable. There is an output that is marked 6.5.13pureos1_byz1 and has a kernel package for download. However, some of the files in the package are not the same as the files installed on my system.

~$ wget https://source.puri.sm/Librem5/linux/-/jobs/430075/artifacts/raw/debian/output/linux-image-6.5.0-1-librem5_6.5.13pureos1~byz1+gitlabci1_arm64.deb
~$ dpkg-deb -x linux-image-6.5.0-1-librem5_6.5.13pureos1~byz1+gitlabci1_arm64.deb testdir
~$ cd testdir
~/testdir$ sha1sum $(find .) | sed 's|\./|/|g' | sort > ~/testfile1
~$ sha1sum $(dpkg -L linux-image-6.5.0-1-librem5) | sort > ~/testfile2
~$ diff ~/testfile1 ~/testfile2
552a553
> 777c9362da02bb513a57a405a9cd90a5d5c4f4e4  /usr/share/doc/linux-image-6.5.0-1-librem5/changelog.Debian.gz
691d691
< 94e8a06233c5d0e6735e99666b7bfd1a2e957941  /usr/share/doc/linux-image-6.5.0-1-librem5/changelog.Debian.gz
984d983
< d16ce14f554fbf72a0c299c9e85e1ea815ab10e0  /boot/vmlinuz-6.5.0-1-librem5
1055a1055
> e130b636a86198f630de31e92b1fb1a35bd25943  /boot/vmlinuz-6.5.0-1-librem5
1160d1159
< f8a1ec132de0ccf4f0a86a98e9dacdc7eb68bc90  /boot/System.map-6.5.0-1-librem5
1179a1179
> fc7b66d88692516e4be421f455b2332d4ae4fb2d  /boot/System.map-6.5.0-1-librem5

Could it be a difference between the released and the unreleased packages?

$ cp /usr/share/doc/linux-image-6.5.0-1-librem5/changelog.Debian.gz changelog1.gz
$ cp ~/testdir/usr/share/doc/linux-image-6.5.0-1-librem5/changelog.Debian.gz changelog2.gz
$ gunzip changelog1.gz
$ gunzip changelog2.gz
$ diff changelog1 changelog2
0a1,6
> linux-librem5 (6.5.13pureos1~byz1+gitlabci1) UNRELEASED; urgency=medium
> 
>   * Gitlab ci build of dff3971eca8b4c3d253f62a370c5bbe667e9c8bc
> 
>  -- root <root@runner-y2ccahwv-project-566-concurrent-2>  Fri, 08 Dec 2023 13:05:31 +0000
> 

The latest code marked as released in that source code repository is for 5.7.19+librem5.1, so I am confused.

Unless there is a clearer way to identify and get a previously released kernel package, I would stick to the packages in the apt repository or available locally.

2 Likes

It’s a different build coming from different infrastructure, but from the same source code.

Old packages get removed from the archive.

3 Likes

Very thorough. I appreciate the time you spent on this very much. I will probably stick with image 6.3.9-1-librem5 for now.

1 Like