Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix detection of the ck-generic- kernel variants #137

Merged
merged 4 commits into from
Jul 27, 2023

Conversation

rnestler
Copy link
Owner

Fixes #136

@rnestler
Copy link
Owner Author

@Sacro Can you test this and verify that it works for you?

@Sacro
Copy link

Sacro commented Jul 26, 2023

I'l need to reboot into the CK kernel, it's currently broken for -zen too though!

Kernel
 installed: 6.4.6.zen1-1 (since 26 hours ago)
 running:   6.4.6.zen1.1-zen

@rnestler
Copy link
Owner Author

rnestler commented Jul 26, 2023

I'l need to reboot into the CK kernel, it's currently broken for -zen too though!

Why? The output looks sane, doesn't it? Or what is your current uname -r and pacman -Q linux-zen output?

Edit: Maybe we should improve the wording a bit? I'll definitely add a few log messages were one can see which package was detected etc. We need to do quite some normalization of the uname -r output and the package version to be able to compare them.

@Sacro
Copy link

Sacro commented Jul 26, 2023

Oh sorry, yes it does look sane, Just that running has -zen suffixed, that threw me.

@rnestler rnestler force-pushed the fix/136-ck-generic-v3-kernel branch from fb0fe96 to f38842c Compare July 27, 2023 08:26
@rnestler
Copy link
Owner Author

Oh sorry, yes it does look sane, Just that running has -zen suffixed, that threw me.

Yeah that's the confusing thing: uname -r will report something like 6.4.6.zen1.1-zen (with some dots replaced by -) which then means it's the linux-zen package with the version 6.4.6.zen1-1 (again some . are actually - and vice versa).

So in the code we normalize these before comparing them, but the output is the original package version, but a normalized uname -r output. Definitely confusing 😉

I added some more info messages in #138 which should help debug these issues. Just set RUST_LOG=info to see them:

$ RUST_LOG=info target/debug/reboot-arch-btw
[2023-07-27T08:26:59Z INFO  reboot_arch_btw::kernel] uname -r output: 6.4.4-arch1-1
[2023-07-27T08:26:59Z INFO  reboot_arch_btw::kernel] Detected kernel package: linux
[2023-07-27T08:26:59Z INFO  reboot_arch_btw::kernel] kernel package version: 6.4.6.arch1-1
Kernel
 installed: 6.4.6.arch1-1 (since 53 minutes ago)
 running:   6.4.4.arch1.1
[2023-07-27T08:26:59Z INFO  reboot_arch_btw::critical_packages_check] Checking systemd
systemd updated 2 days ago
Reboot arch btw

@Sacro
Copy link

Sacro commented Jul 27, 2023

[2023-07-27T10:09:05Z INFO  reboot_arch_btw::kernel] uname -r output: 6.4.6-zen1-1-zen
[2023-07-27T10:09:05Z INFO  reboot_arch_btw::kernel] Detected kernel package: linux-zen
[2023-07-27T10:09:05Z INFO  reboot_arch_btw::kernel] kernel package version: 6.4.6.zen1-1
Kernel
 installed: 6.4.6.zen1-1 (since 1 days ago)
 running:   6.4.6.zen1.1-zen
[2023-07-27T10:09:05Z INFO  reboot_arch_btw::critical_packages_check] Checking systemd
[2023-07-27T10:09:05Z INFO  reboot_arch_btw::critical_packages_check] Checking linux-firmware
[2023-07-27T10:09:05Z INFO  reboot_arch_btw::critical_packages_check] Checking amd-ucode
[2023-07-27T10:09:05Z INFO  reboot_arch_btw::critical_packages_check] Checking intel-ucode
[2023-07-27T10:09:05Z WARN  reboot_arch_btw::critical_packages_check] Failed to get package info for intel-ucode
[2023-07-27T10:09:05Z INFO  reboot_arch_btw::critical_packages_check] Checking xorg-server
[2023-07-27T10:09:05Z INFO  reboot_arch_btw::critical_packages_check] Checking xorg-xwayland

@rnestler
Copy link
Owner Author

Thanks looks nice. If you find time to test it with CK kernel it would be appreciated. But if not, I'd just merge it and you could still reopen the issue if problems persist 🙂

@rnestler
Copy link
Owner Author

(Regarding [2023-07-27T10:09:05Z WARN reboot_arch_btw::critical_packages_check] Failed to get package info for intel-ucode: You could explicitly pass --reboot-packages with a list of packages you want to have checked.)

@Sacro
Copy link

Sacro commented Jul 27, 2023

Yeah, I've rebooted for you, though I have OS lockups on 6.4.3 for some reason.

[2023-07-27T12:20:23Z INFO  reboot_arch_btw::kernel] uname -r output: 6.4.3-1-ck-generic-v3
[2023-07-27T12:20:23Z INFO  reboot_arch_btw::kernel] Detected kernel package: linux-ck-generic-v3
[2023-07-27T12:20:23Z INFO  reboot_arch_btw::kernel] kernel package version: 6.4.3-1
Kernel
 installed: 6.4.3-1 (since 14 days ago)
 running:   6.4.3.1-ck-generic-v3
[2023-07-27T12:20:23Z INFO  reboot_arch_btw::critical_packages_check] Checking systemd
[2023-07-27T12:20:23Z INFO  reboot_arch_btw::critical_packages_check] Checking linux-firmware
[2023-07-27T12:20:23Z INFO  reboot_arch_btw::critical_packages_check] Checking amd-ucode
[2023-07-27T12:20:23Z INFO  reboot_arch_btw::critical_packages_check] Checking intel-ucode
[2023-07-27T12:20:23Z WARN  reboot_arch_btw::critical_packages_check] Failed to get package info for intel-ucode
[2023-07-27T12:20:23Z INFO  reboot_arch_btw::critical_packages_check] Checking xorg-server
[2023-07-27T12:20:23Z INFO  reboot_arch_btw::critical_packages_check] Checking xorg-xwayland

@rnestler
Copy link
Owner Author

Nice! Seems to work as expected 🎉

Thanks for testing!

@rnestler rnestler merged commit 22336de into master Jul 27, 2023
3 checks passed
@rnestler rnestler deleted the fix/136-ck-generic-v3-kernel branch July 27, 2023 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doesn't work with ck-generic-v3 kernel
2 participants