Page 1 of 1

bochs becomes extremly slow on ubuntu 16.04

Posted: Sat Apr 29, 2017 12:52 am
by miaowei
Today, i installed ubuntu 16.04 and i found bochs becomes extremly slow.
I compiled it with: ./configure --enable-gdb-stub --enable-disasm.
In fact, i found this problem last year already, and at that time, i gave up 16.04 and reinstalled 15.04. Bochs run very smoothly under that version.
And this is my .bochsrc:
romimage: file=$BXSHARE/BIOS-bochs-latest
cpu: model=core_duo_t2400_yonah, count=1, ips=50000000, reset_on_triple_fault=1, ignore_bad_msrs=1, msrs="msrs.def"
cpu: cpuid_limit_winnt=0
memory: guest=1024, host=512
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
vga: extension=vbe, update_freq=5
floppya: 1_44=/dev/fd0, status=inserted
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
ata2: enabled=0, ioaddr1=0x1e8, ioaddr2=0x3e0, irq=11
ata3: enabled=0, ioaddr1=0x168, ioaddr2=0x360, irq=9
ata0-master: type=disk, mode=flat, path="400m.img"
boot: disk
clock: sync=none, time0=local # Now (localtime)
floppy_bootsig_check: disabled=0
log: bochsout.txt
panic: action=ask
error: action=report
info: action=report
debug: action=ignore
parport1: enabled=1, file="parport.out"
private_colormap: enabled=0
pci: enabled=1, chipset=i440fx
gdbstub: enabled=1, port=1234, text_base=0, data_base=0, bss_base=0
I already spent time trying following this post: http://f.osdev.org/viewtopic.php?f=1&t=31358, but it not works.
Who can help me? Very thanks!
BTW, may be the word "extremly" is not so accurate, but the bochs becomes slow under new version ubuntu, to a unbearable degree. I am sure. And, the screen of bochs is not smooth, it appears bochs's virtual VGA is rending(or say, scanning, updating) in a slow frequency.

Re: bochs becomes extremly slow on ubuntu 16.04

Posted: Sat Apr 29, 2017 2:12 am
by Ankeraout
I have the exact same issue under Ubuntu 16.04 here.
Bochs runs between 0,8 and 0,017 IPS on my computer under Ubuntu, and about 500 MIPS under Windows.

The only thing I found is that when Bochs is running, xorg seems to be eating all the CPU power.

Re: bochs becomes extremly slow on ubuntu 16.04

Posted: Sat Apr 29, 2017 5:01 am
by Octacone
I was having that issue on Ubuntu 16.10, not 16.04. Try changing your Bochs VGA "driver/emulator".

Edit: my bad, couldn't remember what was it called, it's a graphics library

Re: bochs becomes extremly slow on ubuntu 16.04

Posted: Sat Apr 29, 2017 5:25 am
by xenos
Which graphics library do you use? I had a similar issue once with X11, and so I switched to SDL2, which works fine.

Re: bochs becomes extremly slow on ubuntu 16.04

Posted: Sat Apr 29, 2017 5:36 am
by miaowei
octacone wrote:I was having that issue on Ubuntu 16.10, not 16.04. Try changing your Bochs VGA "driver/emulator".
Could you explain your solution in detail ?
"driver/emulator" ... I'am sorry i can't find a clue in my .bochsrc.
Thanks!

Re: bochs becomes extremly slow on ubuntu 16.04

Posted: Sat Apr 29, 2017 6:14 am
by miaowei
XenOS wrote:Which graphics library do you use? I had a similar issue once with X11, and so I switched to SDL2, which works fine.
Thanks :) The problem disappeared after i recompiled my bochs with SDL.
Run:
make dist-clean
sudo apt-get install libsdl-dev xorg-dev libgtk2.0-dev
./configure --enable-gdb-stub --enable-disasm --with-sdl
make
sudo make install
Note, libraries should be installed before running 'configure'.
I didn't try sdl2.
Really nice.

Re: bochs becomes extremly slow on ubuntu 16.04

Posted: Sat Apr 29, 2017 6:19 am
by miaowei
Ankeraout wrote:I have the exact same issue under Ubuntu 16.04 here.
Bochs runs between 0,8 and 0,017 IPS on my computer under Ubuntu, and about 500 MIPS under Windows.

The only thing I found is that when Bochs is running, xorg seems to be eating all the CPU power.
Thank you, Ankeraout.
As for such confusing problem, i feel better when i know another person also meets it :) Even we both don't know how to solve it.