Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Corvidae

Pages: [1] 2
Here are all of the power management/sleep-related config settings I'm using, for completeness:
Code: [Select]
# CONFIG_PM_DEBUG is not set

The CONFIG_HIBERNATION* settings are what you are looking for.

I too can confirm Suspend to Disk is missing with Fedora 39 (kernel 6.5.0). So I think this feature is not supported *yet*.

I also tried suspend to RAM on Fedora 39 and it works for me.

If that's true, that would be great. If you do a
Code: [Select]
cat /sys/power/mem_sleep command, what does it show? I'm wondering if the "suspend to RAM" you got is actually just s2idle. It's better than nothing, and if you're able to get out of it by pressing a key then you got further than I did when I last tried it.

I really hope I'm wrong and you actually got real suspend to memory, but my outlook towards suspend on POWER is a bit more cynical after finding that the story for power management on this platform is often "no support". As an example - there is no PCIE power management, so it is impossible to safely put devices in a low-power state. You *might* be able to completely cut power with some OPAL command, but it's been a while since I looked. Even then, IIRC the PCIE spec requires the system to put the device in D3Hot (low power) before going into D3Cold (no power), so that doesn't solve the problem.

Edit: One thing that might not look so bleak - I tried turning all of the suspend-related options back on in my kernel config after reading this, and when I do
Code: [Select]
cat /sys/power/state, I *do* see "disk" in there. I know what I'll be trying this weekend...

User Zone / Re: Rough edges and how I work around them (or not)
« on: April 14, 2023, 09:54:17 pm »
My logs when rebooting straight to Petitboot are pretty much the same as when freshly booting after reconnecting power (both cases the audio device works), and I get no related log output at all when booting from shutdown with power still connected (where the audio device is gone). As an experiment, I tried resetting power on the USB port the audio device is on when it is already working, and it came back and worked again as normal. The issue doesn't seem to be as simple as it breaking when losing power. If anyone wants to experiment themselves, I found that the "uhubctl" program worked well for me. Just make sure to carefully read the help output and select the right port(s), as otherwise you might cut power to all USB devices and lose keyboard input.

But it is shown on the schematics, I guess?

It is on the schematic on page 10 of the manual. The schematic seems accurate from what I can tell, but there is no other mention of this port beyond that.

What's probably confusing people about the USB 2.0 port is that generally it is expected to have a USB *header* to connect to front panel USB ports or such (like with the USB 3.0 header), instead of a literal USB port sticking out of the board. The reason for that port existing seems to be that the GL825 USB 2.0 hub can support 4 ports, and the Blackbird design has one spare. If you look at the schematic, on the left side is the GL825 hub. It is connected to the CM6206LX audio device, the front panel (I'm unsure why the front panel ports are connected to both the TI USB 3.0 controller and the GL825 hub - maybe it is for if a USB 2.0 device is plugged into them?), and the spare port.

IIRC, the front panel connectors always carry 2 ports and not 1, which might be why it is a literal USB port in this case. I might be wrong about that, though.

Since the internal USB2.0 header is not detailed anywhere in the manual, does anybody know if there are security or other implications to using this port? For example, if flash storage were attached, it is still behind IOMMU? Does it still connect to the same Texas Instruments USB host controller?

The USB 2.0 port eventually connects back to the TI controller through the GL825 hub. I thought USB didn't have DMA like PCIE and such do, so I'm not sure if the IOMMU has a role here. A *controller* connected over PCIE would interact with the IOMMU, but the GL825 only connects over USB to the TI controller so that isn't an issue here. If anyone that knows more wants to correct me please do, but I don't think there are any additional security concerns with this port compared to the other ports.

Slightly off topic, but one idea I thought of was to make a little USB 2.0 hub expansion board connected to a PCIE bracket for the back of the computer, connected to the lone USB 2.0 port with a USB cable. It wouldn't do anything for USB bandwidth, but would give more USB ports for peripherals and such on the back. There are only 2 ports there now, so having more would bring it more in line with x86 boards.

GPU Compute / Accelerators / Re: AMD OpenCL / ROCm
« on: March 26, 2023, 01:53:58 pm »
To potentially save someone from sinking tons of time into this when it might be doomed to fail: if you are planning on using a Polaris GPU, ROCm will not work on POWER currently due to the lack of PCIE atomics. According to this issue, Vega+ might be fine without them. I double checked if the lack of PCIE atomics was still an issue in 2023, and I would sadly say so:
Code: [Select]
[   14.145631] amdgpu 0000:01:00.0: amdgpu: PCIE atomic ops is not supported
[   14.811332] kfd kfd: amdgpu: skipped device 1002:67c4, PCI rejects atomics 730<0

User Zone / Re: How to set hwclock (BMC) to correct date?
« on: March 26, 2023, 01:45:30 pm »
Thanks, I just replaced the CMOS battery and checked voltages. The original from factory battery was still at 3.1V. The new one was at 3.12V. I'm not sure that makes much of a difference.

So I went through the BMC web interface and what really did it was checking the "Time Owner" property which was left on "BMC". After I changed it to "Both", I was then able to successfully update and save the RTC time.

I rebooted and for the first time in months, haven't had to manually set the system time through desktop settings. We'll see if it keeps up from here on out 👍 (or if it will forever be in stasis at "March 26, 2023, 11:3...").

I didn't know about the "Time Owner" setting - that explains why my attempts at setting the clock on the host side have failed. Hopefully your system clock keeps ticking!

User Zone / Re: Rough edges and how I work around them (or not)
« on: March 26, 2023, 01:40:44 pm »
It is possible that our issues are just similar yet separate. What happens for me is that sometimes (a minority of bootups) GNOME will only report the existence of my HDMI audio through the GPU with no dropdown option for the usual "CM106 Like Sound Device" or it might just erroneously say "Speakers" (which provide no audio out when tested). Restarting pulseaudio appears to rectify this.

My main board is revision 1.01.

It sounds like that might be the case. The issue I am experiencing is that the audio device never even appears as a connected USB device, so it doesn't even have a chance to get to the audio system. As an example, here is the relevant output of lsusb -tv when I am booted into the host system with the audio device working (I plugged in a flash drive to the board USB port to rule out the hub being bad):
Code: [Select]
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 4: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 05e3:0610 Genesys Logic, Inc. Hub
        |__ Port 3: Dev 8, If 0, Class=Mass Storage, Driver=usb-storage, 480M
            ID 154b:007a PNY Classic Attache Flash Drive
        |__ Port 4: Dev 7, If 0, Class=Audio, Driver=snd-usb-audio, 12M
            ID 0d8c:0102 C-Media Electronics, Inc. CM106 Like Sound Device
        |__ Port 4: Dev 7, If 1, Class=Audio, Driver=snd-usb-audio, 12M
            ID 0d8c:0102 C-Media Electronics, Inc. CM106 Like Sound Device
        |__ Port 4: Dev 7, If 2, Class=Audio, Driver=snd-usb-audio, 12M
            ID 0d8c:0102 C-Media Electronics, Inc. CM106 Like Sound Device
        |__ Port 4: Dev 7, If 3, Class=Human Interface Device, Driver=usbhid, 12M
            ID 0d8c:0102 C-Media Electronics, Inc. CM106 Like Sound Device

But if I shut down the system with power still connected, then boot back into the host system, this is what I get:
Code: [Select]
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 4: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 05e3:0610 Genesys Logic, Inc. Hub
        |__ Port 3: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage, 480M
            ID 154b:007a PNY Classic Attache Flash Drive

The flash drive I plugged into the lone USB port on the board is still present, so it's (probably) not the hub that is having issues.  Checking dmesg output also doesn't have any useful information beyond it just not saying anything relating to the audio device when it is not being detected. Other than the board revision, the only other major difference between our setups is that I'm using pipewire instead of pulseaudio, but given that the USB device is not there in the first place I doubt that is the issue here.

User Zone / Re: How to set hwclock (BMC) to correct date?
« on: March 25, 2023, 01:28:52 pm »
My BMC time was incorrect / not updating when I got my system, it was a while ago but I think this is what I did to get it working:

  • I replaced the CMOS battery that came with the system - the voltage was about on the line between being OK and too low, so I'm not sure if that was neccessary, but it didn't hurt.
  • I set the time sync method to manual as described here, on the BMC command line.
  • I then set the time using hwclock on the BMC command line, and confirmed that it set properly with timedatectl (and that NTP was disabled)

From what I have found, hwclock in a booted system does not work for setting the time. IPMI also didn't work for me, but I might have just been using that incorrectly. Lastly, I keep the BMC disconnected from the network (I use serial to connect to it), not sure if that makes any difference.

User Zone / Re: Rough edges and how I work around them (or not)
« on: March 25, 2023, 01:18:41 pm »
I have found that instead of rebooting, it is possible to just restart the pulseaudio service (for those of us using pulseaudio and systemd):

Code: [Select]
systemctl --user restart pulseaudio
Always corrects the issue within seconds. Maybe a script that runs this a minute or two after login would automate the problem away.

Are you saying your audio device doesn't drop off the USB bus completely? If I do a "hot reboot", i.e. OS -> Petitboot -> OS, the audio device is fine and works straight away. If I do a proper shutdown that turns off the CPU, status light turns orange, etc, then if I start the system again the audio device is completely gone from the USB subsystem until I completely remove all power from the system.

If it is working for you, I'd be curious to know what revision Blackbird board you have - I wonder if that makes a difference here (I have 1.02).

User Zone / Re: Rough edges and how I work around them (or not)
« on: March 14, 2023, 08:57:56 pm »
When rebooting sometimes restarts without onboard audio available
   complete reboot removing power from the board is required to rectify this situation

Apologies for bumping this, but has anyone figured out why this happens? I'm running into this constantly, and everything I've tried to avoid having to do a full power cycle has failed. I tried powering off the individual ports of the hub (the only Genesys Logic hub on the board, GL852 I believe) it is connected to, powering off the entire hub that it is connected to (not just individual ports), and even powering off the TI USB Hub that pretty much the entire system uses, but none of them bring the audio device back.

I have to put the machine into some low-power state almost daily by request of people I live with, and since there is still no suspend support, the only option is turning the entire thing off...

I tried looking for this CONFIG_SUSPEND option you told me about but I couldn't find it in the various entries while compiling the new 6.0.1 Kernel. Under which menu is this item located? Thank you

Sorry for not responding to this earlier! It should be under kernel options -> suspend to RAM and standby

User Zone / Re: Void Linux thread
« on: November 01, 2022, 07:16:09 pm »
Regarding Void's (and Chimera's) use of 4k pages, how is this used with Qemu & virt-manager? Virt-manager is nice since it creates the XML for libvirt, but I run into the issue where Qemu complains about wanting 64k pages, but not being able to do so on 4k pages.

The Void PPC doc has an entry regarding this:
Which specifies to use -machine pseries,cap-hpt-max-page-size=4096.

How is this specified in the virt-manager or libvirt XML? Looking at, the closest I could find is using <qemu:commandline>, but that doesn't help, nor does adding the page size flag to machine="pseries".

Something like this should work:

    <hpt resizing="required">
      <maxpagesize unit="KiB">4</maxpagesize>

It's not mentioned in any libvirt documentation I could find - I think I had to end up reading through the unit tests to find where this option was.

Operating Systems and Porting / Re: Petite boot and encrypting /boot
« on: October 19, 2022, 11:40:14 am »
so is there no option for hard drive encryption when installing your OS?

You can still encrypt part of your disk without the patched firmware, but you will need to have an unencrypted bootloader (like GRUB), since something needs to decrypt the rest of the drive. Having Petitboot able to decrypt drives makes things a bit simpler and also means the entire drive can be encrypted (and you can even have Petitboot be the bootloader too).

This isn't the best solution because it requires recompiling the kernel, but if you disable CONFIG_SUSPEND in the kernel config it should make it impossible for it to happen. From what I can tell, the s2idle state linux provides when suspend is enabled "works" in that it enters that state, but wakeup sources don't seem to work, so you can never get out of it.

Operating Systems and Porting / Re: suspend, sleep, hibernate and resume?
« on: September 12, 2022, 11:50:42 am »
My Blackbird appears to be revision 1.02 according to the silkscreen text on the board. However, reading /sys/firmware/devicetree/base/model says it is revision 1.01 - maybe the firmware just wasn't updated yet?

Pages: [1] 2