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

Black screen before SDDM session restarts #34

Closed
LuxLucian opened this issue Nov 5, 2023 · 20 comments
Closed

Black screen before SDDM session restarts #34

LuxLucian opened this issue Nov 5, 2023 · 20 comments
Labels
wontfix This will not be worked on

Comments

@LuxLucian
Copy link

LuxLucian commented Nov 5, 2023

I've following the instructions, only skipping the vBIOS stuff and audio.
When I start the VM the screen goes black, I hear my GPU fans turn on for a second, then they turn off before I am returned to my SDDM login screen. I'm not too technical and the error message is unclear so I don't know what's going wrong.

XML: https://pastebin.com/YMiRmxLS
LOG: GPU_Passthrough.log

Hooks:
qemu.txt
start.txt
stop.txt

@QaidVoid
Copy link
Owner

QaidVoid commented Nov 5, 2023

You can try running the commands from start hook manually over SSH to find out if some commands are failing.

Also, you can try moving the command to unload kernel module below and comment the line to unbind the framebuffer as suggested in #9.

@LuxLucian
Copy link
Author

I moved the line in the start hook and nothing changed. Error log gave the same issue, "shutting down, reason=failed"
I will look into figuring out how SSH works and see if I can find out anything usefull.

@LuxLucian
Copy link
Author

Turns out I was being a big goober and forgot the enable the default network. This is the new log, it black screened and hung until I did a hard shutdown.
GPU_Passthrough.log

@LuxLucian
Copy link
Author

LuxLucian commented Nov 6, 2023

I did some more stuff and removed Display Spice, but the same issue occurs, and the log looks identical.
image
Does the name need to match my GPU or does the "whatever" value not matter at all?
EDIT: putting in my vendor id didn't change anything

@LuxLucian
Copy link
Author

LuxLucian commented Nov 6, 2023

Running an SSH session as root and running "echo efi-frambuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind" gives a permission error, and I cannot get around this by directly using vim or anything

EDIT: Noticed something odd with the permissions in dolphin

The efi framebuffer permissions
image

Compared to the vtcon ones which do work fine
image

@QaidVoid
Copy link
Owner

QaidVoid commented Nov 6, 2023

it black screened and hung until I did a hard shutdown.

I guess the VM is working (seeing at the log, it didn't terminate) but you aren't getting any display.

Can you provide the log after removing Display Spice?

Noticed something odd with the permissions

Those permissions are fine. You don't have to worry about permissions on /sys.

@LuxLucian
Copy link
Author

LuxLucian commented Nov 6, 2023

Here is the new log with Display Spice gone
GPU_Passthrough.log

Those permissions are fine. You don't have to worry about permissions on /sys.

Gotcha, I was worried since the efi-framebuffer command kept giving permission errors

@QaidVoid
Copy link
Owner

QaidVoid commented Nov 8, 2023

Not really sure what's the issue.
Check status of libvirtd with systemctl status libvirtd (over SSH) after launching the VM. It might provide some information.

@LuxLucian
Copy link
Author

❯ systemctl status libvirtd
● libvirtd.service - libvirt legacy monolithic daemon
Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; preset: disabled)
Active: active (running) since Mon 2023-11-13 20:55:24 EST; 52s ago
TriggeredBy: ● libvirtd-ro.socket
● libvirtd.socket
● libvirtd-admin.socket
Docs: man:libvirtd(8)
https://libvirt.org/
Main PID: 6473 (libvirtd)
Tasks: 24 (limit: 32768)
Memory: 358.7M
CPU: 3.364s
CGroup: /system.slice/libvirtd.service
├─ 912 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
├─ 913 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
└─6473 /usr/bin/libvirtd --timeout 120

Nov 13 20:55:32 serpentbox libvirtd[6473]: this function is not supported by the connection driver: virConnectGetAllDomainStats
Nov 13 20:55:34 serpentbox libvirtd[6473]: End of file while reading data: Input/output error
Nov 13 20:55:34 serpentbox libvirtd[6473]: End of file while reading data: Input/output error
Nov 13 20:55:36 serpentbox libvirtd[7002]: 2023-11-14 01:55:36.433+0000: 7002: info : libvirt version: 9.9.0
Nov 13 20:55:36 serpentbox libvirtd[7002]: 2023-11-14 01:55:36.433+0000: 7002: info : hostname: serpentbox
Nov 13 20:55:36 serpentbox libvirtd[7002]: 2023-11-14 01:55:36.433+0000: 7002: warning : virSecurityValidateTimestamp:205 : Invalid XATTR timestamp detected on /var/lib/libvirt/qemu/domain-1-GPU_Passthrough/mas>
Nov 13 20:55:36 serpentbox libvirtd[7019]: 2023-11-14 01:55:36.967+0000: 7019: info : libvirt version: 9.9.0
Nov 13 20:55:36 serpentbox libvirtd[7019]: 2023-11-14 01:55:36.967+0000: 7019: info : hostname: serpentbox
Nov 13 20:55:36 serpentbox libvirtd[7019]: 2023-11-14 01:55:36.967+0000: 7019: warning : virSecurityValidateTimestamp:205 : Invalid XATTR timestamp detected on /Data/Storage/VM/win10.qcow2 secdriver=dac
Nov 13 20:55:36 serpentbox libvirtd[7019]: 2023-11-14 01:55:36.968+0000: 7019: warning : virSecurityValidateTimestamp:205 : Invalid XATTR timestamp detected on /var/lib/libvirt/qemu/nvram/GPU_Passthrough_VARS.f>

@QaidVoid
Copy link
Owner

Not sure why it's failing.. I tried to reproduce Input/output error, but couldn't.. Also, figured out you only need to kill the DE/WM and unload GPU modules to passthrough (atleast on NVIDIA)..

Try simplifying the start script to:

#!/bin/sh
set -x

systemctl stop display-manager
systemctl --user -M lucian@ stop plasma*

modprobe -r amdgpu

@LuxLucian
Copy link
Author

Result is a black screen which hangs until I reboot.

@QaidVoid
Copy link
Owner

QaidVoid commented Dec 3, 2023

No idea what might be the issue as log has no error..
Try including this at the top of start script..

exec 19>/home/YOUR_USERNAME/startlog
BASH_XTRACEFD=19
set -x

This should create startlog file incl. the status of each command..

@LuxLucian
Copy link
Author

LuxLucian commented Dec 7, 2023

startlog.txt
Same thing happens, black screen that hangs until I force a shutdown. Perhaps it might be a an issue with the guest and not the VM? My GPU fans do spin up to 100% which also happens when I boot my pc, and stops after I get past the post screen.

@QaidVoid
Copy link
Owner

The commands seem to be working as expected. Not sure what's causing the issue..
I'd guess Input/output error is the culprit, but not sure why it's only showing in service status but not in log..

@LuxLucian
Copy link
Author

I might reinstall a fresh linux soon, Wayland Plasma has been occasionally hard crashing when I play games recently. There could be something wrong with my install and I'm not tech savvy enough to diagnose it. I'll update this issue if/when I'm on a new install.

Copy link

stale bot commented Feb 27, 2024

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix This will not be worked on label Feb 27, 2024
@LuxLucian
Copy link
Author

I'm currently busy, if I have to time to try this again I can reopen the issue or open another one. Thank you for your help.

@LuxLucian LuxLucian reopened this Mar 26, 2024
@LuxLucian
Copy link
Author

I've have a new install on EndeavorOS with Plasma Wayland, and I still cannot get the vm to work. I wonder if having a DP monitor is part of it? I also have a second HDMI screen, both are plugged into my GPU.

@LuxLucian
Copy link
Author

Using the simplified start script I get a new issue.
[ 206.039575] EXT4-fs (nvme0n1p2): shut down requested (2)
[ 206.040240] Aborting journal on device nvme0n1p2-8

It just hangs on this now

@LuxLucian
Copy link
Author

LuxLucian commented Mar 27, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants
@QaidVoid @LuxLucian and others