Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Very slow graphics #271

Open
mxlgv opened this issue Apr 7, 2023 · 3 comments
Open

Very slow graphics #271

mxlgv opened this issue Apr 7, 2023 · 3 comments

Comments

@mxlgv
Copy link

mxlgv commented Apr 7, 2023

Recently I ran the latest release in VirtualBox and noticed that the graphics are running unbearably slow. Although it seemed to me that it was faster before. I allocated a lot of resources to the virtual machine, but this did not give positive results. Maybe this is due to the incorrect configuration of the virtual machine. But I'm wondering if you are using the WC (write combined) flag for the Framebuffer memory area. I didn't really understand the source code. According to some developers, this mechanism allows you to speed up vesa graphics in KolibriOS. However, KolibriOS uses MTRR for this, but it seems there is a way to do this via PAT.

@klange
Copy link
Owner

klange commented Apr 7, 2023

This is very likely a misconfiguration in VirtualBox.

There should be an icon in the VirtualBox statusbar that shows the CPU utilization of the VM. Hovering over this icon should provide details of the execution environment, including the virtualization interface being used and whether functionality like nested paging is enabled. Can you try to get a screenshot of that tooltip?

Screenshot_2023-04-08_07-55-40

ToaruOS does use PAT to provide write-combining and this is enabled for graphics framebuffers. MTRRs are an older method. You can view the configuration for the page attribute table via procfs, though there's no easy way to check the table index for any given page.

toaru_screen_2023-04-08_07_51_38

@klange
Copy link
Owner

klange commented Apr 8, 2023

By the way, if the icon in the tray with the CPU meter has a turtle icon, you know you're in for a bad time - that's an indicator that some critical piece of the virtualization stack is not functioning. VirtualBox used to be pretty loud in the 5.x and 6.x days about missing functionality and would usually refuse to launch VMs at all under those conditions, but I've found 7 will happily give you a horribly broken experience instead - with that turtle as your only confirmation that something is wrong.

If you're on a Windows host, this usually means Hyper-V is mucking things up - running VirtualBox alongside WSL2, for example, is prone to issues. For macOS, VirtualBox does not work correctly with HVF (and I strongly recommend QEMU, which does fully support HVF virtualization - and I worked with the team to fix an issue with the memory mapping for some of the virtual graphics devices ToaruOS supports). For Linux hosts, VirtualBox does not play well with other KVM users.

@mxlgv
Copy link
Author

mxlgv commented Apr 12, 2023

Yes, apparently the problem is really in my VirtualBox configuration. I don't have access to this computer right now to check. However, on my other computer, the graphics are relatively fast. Please don't close this yet. I'll try to test on another PC soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants