Waydroid broken after kernel update on L5

Waydroid (1.3.3-0pureos0+librem5ci79377.0353512) container can no longer start after I rebooted my L5 phone. The /var/lib/waydroid/waydroid.log ends with the following:

(004769) [12:26:41] % lxc-start -P /var/lib/waydroid/lxc -F -n waydroid -- /init
(004769) [12:26:41] New background process: pid=4845, output=background
lxc-start: waydroid: utils.c: safe_mount: 1204 No such file or directory - Failed to mount "/dev/ashmem" onto "/usr/lib/aarch64-linux-gnu/lxc/rootfs/dev/ashmem"
(004769) [12:26:41] Save session config: /var/lib/waydroid/session.cfg
(004801) [12:26:41] Failed to start Clipboard manager service, check logs
lxc-start: waydroid: conf.c: run_buffer: 314 Script exited with status 126
lxc-start: waydroid: start.c: lxc_end: 958 Failed to run lxc.hook.post-stop for container "waydroid"

It looks similar to the Waydroid issue #631, but suggested solutions seem to be not related, because page size is already 4k and PSI (whatever it is) seems to be already enabled:

$ zcat /proc/config.gz | grep 'PSI'
CONFIG_PSI=y
# CONFIG_PSI_DEFAULT_DISABLED is not set
$ getconf PAGESIZE
4096
$ cat /proc/cmdline 
u_boot_version=2022.10-g956aa590c9 console=ttymxc0,115200 quiet fsck.repair=yes security=apparmor splash plymouth.ignore-serial-consoles vt.global_cursor_default=0

Anyway, according to the /var/log/apt/history.log, the kernel was updated yesterday: linux-image-6.6.0-1-librem5:arm64 (6.6.118pureos1~byz1, 6.6.119pureos1~byz1). Where can I get the binary of the previous kernel build to downgrade it? I need to fix Waydroid ASAP.

I’ve found packages in the GitLab. @dos, are these packages the correct ones? I don’t want to brick the phone completely with a wrong kernel. :melting_face:

The previous kernel should still be on the phone.

Also, for completeness, you should mention whether you are running byzantium or crimson (although I’m sure it is able to be inferred from the information given).

Yes, it is byzantuim.

The /boot/vmlinuz-6.6.0-1-librem5 was replaced by the package update. The old DEB file can no longer be found in /var/cache/apt/archives. Is the previous kernel still somehow flashed as a fallback?

I have just noticed that now there are builds for byzantium in the Waydroid repository, and I still on the old build from https://source.puri.sm/sebastian.krzyszkowiak/waydroid.

At the same time, what fails is the /init binary in the Android image, so I don’t think the problem is with the Waydroid itself…

OK, I thought that in /boot you would find two versions, the current and the previous, but maybe that is not so.

So, I installed linux-image-6.3.0-1-librem5 (6.3.7pureos1) from the repository and executed flash-kernel --force 6.3.0-1-librem5. This version is older than I intended to downgrade (are there significant changes since then?), but now Waydroid is back to life.

Now the question is: What changed between 6.6.118pureos1~byz1 and 6.6.119pureos1~byz1?

2 Likes

I have the same problem and would be happy if there was a proper fix (or at least a temporary workaround) for the problem that does not include downgrading the kernel.

Did anyone escalate this to Purism Support though?

Waydroid works fine for me on the latest kernel. I tried images with Android 10, 11 and 13 and all worked.

Please update your system, install Waydroid 1.6.1 from Librem5 / debs / waydroid Ā· GitLab and try again.

Yes, 2.5 years worth of fixes.

Yes, thank you for reminder.

It is possible that the problem is with an old Android image. One of the Android updates broke sound: anything played from inside of the Android was terribly stuttering, so I reverted to previous version and did not update the Android image since then. I’ll try to update everything and will hope that I’ll be able to recover if anything else breaks… :crossed_fingers:

It is possible, but as I said - my phones have very varied versions of Android images and they all work, so it must be a matter of some particular combination of component versions that you happen to have there.

(audio works correctly with latest Waydroid images in Crimson, BTW)

2 Likes

I will also add that Waydroid works for me on Crimson after I followed the Waydroid installation instructions. Maybe this is an issue only in Byzantium, which I haven’t tried. I doubt Purism’s devs will spend time to investigate or fix issue in Byzantium with Crimson nearing beta release.

If you are able to, could you try updating to Crimson?

Upgrade progress:

  1. Updated Waydroid to 1.6.1-0pureos0+librem5ci167173.8ff8f39. Everything works fine.
  2. Updated Android to latest ā€œsystemā€ and ā€œvendorā€ images. It was a jump from Android 11 to Android 13. Now the sound is stuttering and current playback timestamp in a player (NewPipe) advances faster than it should. And I doubt it is safe to just replace Android images back due to an Android version jump.
  3. Executed flash-kernel to return to the latest Linux kernel (6.6.0-1-librem5). Container fails to start with the same error. :weary_face:

Returned to Linux kernel 6.3.0-1-librem5. Trying to figure out what to do with sound in Android.

It’s a relief to hear others have this same issue following the recent kernel update. For context, I have kept both PureOS and the Android system and vendor image in the container as far updated as possible (without entering betas or pre-releases) which currently is Byzantium and Android 13 (the Lineage variant) respectively.

I did notice that running apt show waydroid shows Version: 1.3.3-0pureos0+librem5ci79377.0353512 instead of 1.6.1 as mentioned. This is even after running sudo apt update && sudo apt upgrade
AND
sudo waydroid upgrade

I am still on Byzantium because it is The latest stable release, even though it is old. It is my daily driver, and I depend on it working properly. Well, now it is not working properly, so I may consider upgrading…

Regarding the upgrade: the last time I checked the only way to do it was to flash a new OS image and erasing the current installation. I fear I would need to spend a vacation configuring everything again from scratch. I’ve just checked, and it seems like the Debian’s usual ā€œapt-get dist-upgradeā€ method has potential problems and is not confirmed to be safe yet.

Waydroid is not (was never?) in the Byzantium repository. To upgrade the waydroid package you would need to grab it from Purism’s GitLab: https://source.puri.sm/Librem5/debs/waydroid/-/jobs/542948/artifacts/browse/debian/output/. Alternatively, there are now official Waydroid repositories for Byzantium and Crimson, but I did not try them.

Anyway, upgrade of the waydroid package did not help me. It seems like there is some kind of incompatibility between recent kernel changes and Android images.

Several people have posted relatively recently that they have successfully upgraded from Byzantium to Crimson using apt. I don’t know the details and am still on Byzantium myself.

1 Like

I just followed the direction of the readme at ā€˜Librem5 / debs / waydroid Ā· GitLab’
which points to ā€˜Install Instructions | Waydroid’ for the installation instructions (following the Ubuntu/Debian and derivatives instructions) which worked for me. Granted this was a year and a half ago when I first installed it, but no issues until the kernel update.

I take it I should download the .deb file at ā€˜debian/output Ā· Artifacts Ā· package-pureos:arm64 (#542948) Ā· Jobs Ā· Librem5 / debs / waydroid Ā· GitLab’ and install/upgrade the package.

But unfortunately it sounds like even if I did upgrade the Waydroid package, the problem would remain, based on what you’ve reported :face_with_diagonal_mouth: