Re: Cannot get sound in Qemu/KVM vm
On Tue, May 09, 2023 at 03:14:14PM -0700, Unknown wrote: > Hello. I have a Parabola linux x64 host and a Parabola Linux 32-bit > guest. Parabola is an Arch-based distro. I also have a Windows 7 x64 > guest that lacks audio. > > lspci in the > host tells me that I have an Intel 100 Series/C230 Series Chipset > Family HD Audio Controller and an NVIDIA GM107 High Def Audio > Controller. > Perhaps it will clarify things if you use the following command in the host system to see which of them you are actually using: pactl list short sinks Ideally, do that for both headphones and whatever else you are using to hear the audio. My point is that you seem to have at least two HDMI audio output devices, and perhaps one or two analogue outputs. > The host always has sound. The guest used to have sound, but I'd > continually lose sound after a few days until I restarted the VM. Then > the guest lost sound completely; I don't know why. Media players, > youtube videos, etc. seem to play normally, but I simply cannot hear > anything, with or without headphones. Alsa and pulseaudio are installed > in the guest. > I note that 'headphones' usually means the sort you plug in to a 2.5mm (described as 1/8" in America) socket, but there are variations. And 'without headphones' *could* be a different output (e.g. analogue audio to headphones, HDMI audio to a TV). Now please try thati pactl command in the linux guest (*with* pulseaudio installed). You can select a specific sink from the available sinks with pacmd set-default-sink > I've tried setting QEMU_AUDIO_DRV (to alsa) on the host. I've tried > all of the sound device settings in libvirt (ICH6, ICH9, and AC97). > I've tried deleting pulseaudio from the guest. I've tried maxing out the > volume on both the guest (with alsamixer and pavucontrol) and the host > (with alsamixer). > Alsa tends to be problematic because it can "own" the audio and prevent other applications producing sound. From time to time on a non-qemu host I've recently lost audio after suspend, but listing and setting the sinks has restored it. Worst case it may be necessary to stop and start an application (killall -HUP whatever). > Any suggestions? I have read that audio is some sort of ongoing problem > with KVM. Is this true? > It certainly used to be, but I've been too busy on other things (and short of disk space) to try recent versions of qemu. I think I had working audio with pulse in host and client a year or so ago, but I'm not 100% sure. The AC97 controller on real hardware was ancient, seems unlikely to be what is needed unless the guest is really old linux. For variants of HDMI (ICH6, ICH9 I suppose) I tend to enable *all* of the kernel HDMI variations in a linux guest. I will suggest that getting sound working in the linux guest is the first step (you might need to compile your own kernel). For a Windows 7 64-bit guest I'm afraid I have no idea what would be required. ĸen -- ARTHUR: I am your king! WOMAN: Well, I didn't vote for you. -- Monty Python and The Holy Grail
migrating between OS with different default PAGE_SIZE configured
Hello community experts, I am trying to migrating virtual machine from one machine to another. The host machine has the same specs, the only difference is the operating system. For one OS, it configured with page_size to be 64K, for another it is 4KB. When I try to execute the migration, migration failed, complaining acpi table-loader size is different. So my question is how to work around this constraint and allow live migration? Thank you very much for the help! -- Best Regards, Jiatong Shen The error log is "Length too large: /rom@etc/table-loader: 0x1 > 0x1000: Invalid argument"
RE: How should I build u-boot for qemu_arm64_defconfig and run it on arm64 qemu virt machine?
Hi all, Hope someone who know this top reads this. I made the pflashs.img with u-boot-spl and used it as the flash memory (from address 0x ~). So the u-boot-spl program runs. And I guess I have to load (using qemu command option) a kind of image that contains u-boot proper and make the u-boot-spl to load u-boot proper at another address from that image and jump to that address. How can I make that image using mkimage if I have the u-boot.bin file? I think the command should start like 'mkimage -O u-boot -T ... ' but I don't know what type I should give for -T option. I will be very much grateful If anyone tells me how to do it. By the way, I want to check pci_init function once u-boot proper runs and I found pci_init is called in board_init_r when u-boot proper runs. Thank you! Chan Kim -Original Message- From: "Chan Kim" To: "U-Boot Mailing List" ; ; Cc: Sent: 2023-05-08 (월) 18:40:49 (UTC+09:00) Subject: How should I build u-boot for qemu_arm64_defconfig and run it on arm64 qemu virt machine? Hello experts, Today I tried this test from scratch. In my environment, CROSS_COMPILE=aarch64-none-elf. Under u-boot directory, when I do 'make CROSS_COMPILE=aarch64-none-elf- qemu_arm64_defconfig' and 'make -j28', I see this error at the end. aarch64-none-elf-ld.bfd: invalid length for memory region .sram after examining it, I added in include/configs/qemu-arm.h, #define CONFIG_SPL_MAX_SIZE value to 0x40 After fixing it, I got another similar error for .sdram and I added in include/configs/qemu-arm.h, #define CONFIG_SPL_BSS_START_ADDR 0x4080 #define CONFIG_SPL_BSS_MAX_SIZE 0x10 Now I can do 'make -j28' with no error. But I found I have both 'u-boot' and 'spl/u-boot-spl' generated and I realized for this qemu_arm64_defconfig, CONFIG_SPL=y and I get both u-boot proper and u-boot spl. (SPL: secondary program loader, proper: main bootloader. SPL runs first and the proper runs next). Until now I did objcopy of the u-boot(proper) and then extended it to 0x40 byte. (the pflash size of the virt machine which starts at address 0x). $ aarch64-none-elf-objcopy -O binary u-boot.v2022.07/u-boot pflashp.img $ dd if=/dev/zero of=pflashp.img bs=1c count=1 seek=67108863 And the qemu command is : $ qemu-6.2.0/build/aarch64-softmmu/qemu-system-aarch64 -machine virt,gic-version=max,secure=on,virtualization=true -cpu max -drive if=pflash,file=pflashp.img -m 2G -nographic -device loader,file=linux-5.15.68/arch/arm64/boot/Image,addr=0x8020 The qemu virt machine has RAM from 0x4000 until 0xbfff. And I could see u-boot runs and it waits input for 3 seconds and outputs the u-boot prompt. This is running u-boot (proper) from address 0 but since I have u-boot-spl too, I should run it from u-boot-spl first, shouldn't I? How am I supposed to run u-boot-spl and u-boot on this qemu machine? (from lds files, it looks like they both start at address 0). (qemu machine is arm64 virt machine, qemu 6.2.0). Thank you. Chan Kim