Fix “No frame buffer” error in Plan 9
Article Source || GitLab Discussion
Created: 30 July 2022 || Edited: 30 July 2022
Let’s say you installed Plan 9 by Bell Labs on a QEMU/KVM virtual machine by just following the prompts and entering defaults. In certain cases, you might find your install booting to a shell with the errors:
aux/vga: inportl(0xc100): permission denied rio: can't open display: initdisplay: /dev/draw/new: no frame buffer init: rc exit status: rio 31: display open
For some reason, on certain configurations, the
vga) monitor type does not work when booting into Plan 9, even though it works fine during install. The fix is to adjust monitor settings to
In the shell prompt enter
aux/vga -m vesa -l
You should get a cursor and a cleared prompt.
In this “new” shell prompt, enter
You should now get a grey background with the cursor in it.
- You are now in a graphical environment, so technically you can stop here. The other steps are for configuring it so you wont ever have that problem again.
Create a new window (refer to the bullet point for instructions). Enter
this is the configuration file we will be changing.
- How to make a window: right click, hold, hover over “New” and release the right click. Now right click somewhere in the top left, hold, drag to somewhere in bottom right, release.
Now we will be editing the config file with sam, a line editor. Click the green-backgrounded box, the cursor should appear. First select our file:
and click the green-backgrounded box. Then replace
, x/xga/ s/xga/vesa
and click the green-backgrounded box again. We’re almost done here, enter
w, wait a bit, and finally enter
If you want to check whether the file was properly saved, feel free to run
and check that monitor is equal to vesa (you can scroll with the arrow keys, or with left and right mouse buttons, acting as up and down).
The first command opens the
plan9.inifile for editing, and the second command, finds every line that contains
xga(there should probably be only one) and on each matching line replaces
vesa. Refer to the docs for more information.
That’s it, all we have to do is halt our file system with
fshalt(or type out the command in the Qemu installation guide) and Force Reset the virtual machine.
The next time you boot into Plan 9 and into your user, the graphical environment should load fine. Enjoy Plan 9!