Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

Which display type should I use in a VM with libvirt?

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
14 posts • Page 1 of 1
Author
Message
leyvi
l33t
l33t
Posts: 719
Joined: Fri Sep 08, 2023 1:22 pm

Which display type should I use in a VM with libvirt?

  • Quote

Post by leyvi » Wed May 14, 2025 12:43 am

Which display type should I use? I've been using QXL, but that shows up as a VGA device on the guest, and I'm not sure if it's using that or the GPU I provided...
Top
yaslam
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 103
Joined: Wed May 08, 2024 10:06 pm
Location: Scotland, UK
Contact:
Contact yaslam
Website

Re: Which display type should I use in a VM with libvirt?

  • Quote

Post by yaslam » Sun May 18, 2025 8:23 am

leyvi wrote:Which display type should I use? I've been using QXL, but that shows up as a VGA device on the guest, and I'm not sure if it's using that or the GPU I provided...
Need more information, are you using a passed through GPU? Or just QXL?
CPU: 6-core AMD Ryzen 5 5600 (-MT MCP-) speed/min/max: 3426/550/4468 MHz
Kernel: 6.12.31-gentoo-yaslam x86_64 Up: 7h 50m Mem: 4.05/31.27 GiB (13.0%)
Storage: 2.95 TiB (51.5% used) Procs: 394 Shell: fish inxi: 3.3.38
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56100
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun May 18, 2025 11:05 am

leyvi,

Code: Select all

lspci -nnk
from the guest would be good. That will tell about your available GPUs.

If Xorg is running, Xorg.0.log will tell which one is in use for your GUI.
dmesg will show which GPU is used for the console.
Both of those are too big for for a post. They need to be pastebins.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
leyvi
l33t
l33t
Posts: 719
Joined: Fri Sep 08, 2023 1:22 pm

Re: Which display type should I use in a VM with libvirt?

  • Quote

Post by leyvi » Sun May 18, 2025 1:23 pm

yaslam wrote:
leyvi wrote:Which display type should I use? I've been using QXL, but that shows up as a VGA device on the guest, and I'm not sure if it's using that or the GPU I provided...
Need more information, are you using a passed through GPU? Or just QXL?
I'm using passthrough, with the iGPU on my CPU, since I have a dGPU that I can use for the host. I'm using SPICE to view it.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56100
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun May 18, 2025 1:29 pm

leyvi,

That sounds wrong. Please answer the qustions, so we don't have to guess.

I would expect you to connect a display to the passed through GPU and use it as if it wer e neced to a real hardware system.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
leyvi
l33t
l33t
Posts: 719
Joined: Fri Sep 08, 2023 1:22 pm

  • Quote

Post by leyvi » Sun May 18, 2025 1:57 pm

NeddySeagoon wrote:leyvi,

Code: Select all

lspci -nnk
from the guest would be good. That will tell about your available GPUs.

If Xorg is running, Xorg.0.log will tell which one is in use for your GUI.
dmesg will show which GPU is used for the console.
Both of those are too big for for a post. They need to be pastebins.
Alright, I'll check as soon as I'm able.
Top
yaslam
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 103
Joined: Wed May 08, 2024 10:06 pm
Location: Scotland, UK
Contact:
Contact yaslam
Website

Re: Which display type should I use in a VM with libvirt?

  • Quote

Post by yaslam » Sun May 18, 2025 3:31 pm

leyvi wrote:Which display type should I use?
When doing GPU passthrough the display type should be set to none, as Neddy said you connect a monitor to the passed through GPU.
CPU: 6-core AMD Ryzen 5 5600 (-MT MCP-) speed/min/max: 3426/550/4468 MHz
Kernel: 6.12.31-gentoo-yaslam x86_64 Up: 7h 50m Mem: 4.05/31.27 GiB (13.0%)
Storage: 2.95 TiB (51.5% used) Procs: 394 Shell: fish inxi: 3.3.38
Top
leyvi
l33t
l33t
Posts: 719
Joined: Fri Sep 08, 2023 1:22 pm

  • Quote

Post by leyvi » Sun May 18, 2025 3:33 pm

Ah... I only have one monitor. Is there any way to accelerate graphics with a GPU, then send the frames over SPICE?
Top
yaslam
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 103
Joined: Wed May 08, 2024 10:06 pm
Location: Scotland, UK
Contact:
Contact yaslam
Website

  • Quote

Post by yaslam » Sun May 18, 2025 3:39 pm

leyvi wrote:Ah... I only have one monitor. Is there any way to accelerate graphics with a GPU, then send the frames over SPICE?
SPICE with VirGL enabled does only OpenGL acceleration using the host GPU, but it only works on Linux guests.
CPU: 6-core AMD Ryzen 5 5600 (-MT MCP-) speed/min/max: 3426/550/4468 MHz
Kernel: 6.12.31-gentoo-yaslam x86_64 Up: 7h 50m Mem: 4.05/31.27 GiB (13.0%)
Storage: 2.95 TiB (51.5% used) Procs: 394 Shell: fish inxi: 3.3.38
Top
leyvi
l33t
l33t
Posts: 719
Joined: Fri Sep 08, 2023 1:22 pm

  • Quote

Post by leyvi » Sun May 18, 2025 3:41 pm

I've done that before, and while it does work, it's a little stutter-y. Is there no other way?
Top
yaslam
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 103
Joined: Wed May 08, 2024 10:06 pm
Location: Scotland, UK
Contact:
Contact yaslam
Website

  • Quote

Post by yaslam » Sun May 18, 2025 3:47 pm

leyvi wrote:Is there no other way?
Not that I know of, no.
CPU: 6-core AMD Ryzen 5 5600 (-MT MCP-) speed/min/max: 3426/550/4468 MHz
Kernel: 6.12.31-gentoo-yaslam x86_64 Up: 7h 50m Mem: 4.05/31.27 GiB (13.0%)
Storage: 2.95 TiB (51.5% used) Procs: 394 Shell: fish inxi: 3.3.38
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56100
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun May 18, 2025 4:32 pm

leyvi,

This is very hacky but it may work.
The problem you face is that the GPU can only render into the GPU pixel buffer. There is normally no way to get the pixel buffer out.
However, VNC has a 'screen scraper' mode,where it does just that. By default, the VNC server uses a chunk of main memory as its pixel buffer.

Step 1 is to get the passed through GPU to work - you will need to use a monitor to check.
Step 2 is to run a VNC Server in the guest and a VNC client on the host and check that out. This VNC server will use a chunk of main guest RAM as its pixel buffer.

Now you have the bits (almost) working individually. Now the tricky bit.
Make Xorg work in the guest when there is no display connected. The passed through GPU will not be able to read the EDID data, so you will need some xorg.conf.d/ fragments to overcome that.
Check that you can connect the display after Xorg has started and its working the way you want.

Reconfigure the VNC Server in the guest to serve 'screen scraper' mode.

Enjoy accelerated graphics from the guest in the VNC client. Well, sort of. Its going to be pushing a lot of data of the host/client network link. The VNC data link normally runs compression and reduced colour depth to get the frame rate up. Many years ago I used VNC over a 56k dial up link. :)
In practice, the bottleneck is going to move to a different place. I don't know if the performance will be any better than Spice.
A 1920x1080@60Hz (FHD) uncompressed video stream needs over 1Gbit/sec
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
leyvi
l33t
l33t
Posts: 719
Joined: Fri Sep 08, 2023 1:22 pm

  • Quote

Post by leyvi » Sun May 18, 2025 4:36 pm

NeddySeagoon:
This looks very cool, and also very time consuming :)
I will check it out when I can.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56100
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun May 18, 2025 4:44 pm

leyvi,

It need not be time consuming if you make all the bits work separately before you put then together.
Keep your problem space small.

Its possible to run the VNC server and client both on you host for testing. That would let you test 'screen scraper' mode too.
Its has as much practical value as

Code: Select all

ssh localhost
but you get to test the configuration.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Post Reply

14 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic