Using QEMU on Troubleshooting: Difference between revisions

From OLPC
Jump to navigation Jump to search
(fix linewrap problem on line warning about nano linewrapping! ;-))
m (Reverted edits by 211.39.150.104 (Talk) to last version by Walter)
 
(8 intermediate revisions by 7 users not shown)
Line 1: Line 1:
#REDIRECT [[Emulating the XO/Help and tips]]
More often than not, technology manages to get us 95% of the way... being the last 5% a mix of magical incantations, rituals and other esoteric activities only clear to the initiated. This page tries to take some of the magic away from the ''sufficiently advanced science''

If you want to use '''nano''' for system file edits,
make sure line wrap is disabled by '''Alt-L''' .

== My emulator is very slow ==
Are you using the kqemu or qvm accelerator modules? You do have to have administrator rights to install the services. QEMU manager (in Windows) knows to start these services according to your profile settings.
See [http://www.h7.dion.ne.jp/~qemu-win/ Qemu on Windows] and [http://fabrice.bellard.free.fr/qemu/download.html QEMU Home Page]

Does the version of the QEMU support KQEMU? Type ctrl+alt+2 and type '''info kqemu'''. Use ctrl+alt+1 to return to OLPC screen.

== Configuring X ==

* In some builds X is configured to load the Geode driver by default. You need to modify it to load the frame buffer driver instead. In '''/etc/X11/xorg.conf''', go to the "Device" section and change the Driver setting from "amd" to "fbdev"

* You can then change '''XKbLayOut''' in the same file to ''your keyboard code'' with for example '''nano''' text editor by

nano /etc/X11/xorg.conf


== Setting Framebuffer resolution ==

'''NOTE:''' If you don't set the VGA kernel parameter to <tt>'''0x317'''</tt> (in order to get a 1024x768 with 64k colors) you will NOT be able to view / use [[Etoys]] properly.

In order to set the framebuffer's VGA kernel parameter you must edit <tt>/boot/grub/grub.conf</tt> according to the following table:

<tt>
{|align=center border="1" style="text-align: center;"
|+VGA kernel color / resolution table
!Colors!!640x480!!800x600!!1024x768!!1280x1024
|-
!256
|0x301||0x303||0x305||0x307
|-
!32k
|0x310||0x313||0x316||0x319
|-
!64k
|0x311||0x314||style="background:green"|0x317||0x31A
|-
!16M
|0x312||0x315||0x318||0x31B
|-
|}
</tt>

== Sound ==

Latest images add support of sound. Emulation does not work properly with Tam-Tam, yet, even with kqemu at 2 GHz Pentium4 (performance or insufficient emulation issue?). Maybe somebody could install Csound in host and pipe sound over the virtual network?
Windows version can be found in [http://www.studioimaginaire.com/~tamtam/Cecilia/ Cecilia and Csound for Windows installer]
--[[User:Tonyv|Tonyv]]

== Keyboard and Mouse ==

A typical case is that their keyboard and mouse don't work. A solution to the problem is:
#Make sure the the window has the focus (label should say <tt>QEMU - Press Ctrl-Alt to exit grab</tt>).
#Press <tt>Alt + Ctrl + 1</tt> (or <tt>Alt + Ctrl + 3</tt>) to enter the terminal mode of the OLPC. Notice that QEMu seems to respond better to by pushing first down Ctrl, after Alt and finally the number.
#Make sure that you're logged in.
#*If not, just hit <tt>enter</tt> and it'll ask you to.
#*Login as <tt>root</tt> (no password is required)
#Type <tt>modprobe i8042</tt> (oddly, you may need to try this multiple times before it works, so ''keep trying!'')
[[Image:Tty1_ps.PNG]]
#Press <tt>Alt + Ctrl + 7</tt> to return to the graphical mode of the OLPC.
#Your keyboard and mouse should be working fine.
#*Usually the result is a continuous series of 1's will flow (as if the key is stuck)
#*Just hit any key (to stop it) and delete the offending 1's
Alternatively you can use the developers console and <tt> su </tt> command. I have not been able to bring up the terminal in most images. Quote from [[BTest-1_Release_Notes]] :

The terminal (activity) does not appear on the Frame, but can be launched by typing Alt-Shift-F11.
(F11 is found in the 3rd position from the left in the Volume Slider key.)
Note that on some newer builds, the terminal window (Memphis) is launched by typing Alt-Shift-F12.
In even more recent builds, e.g., '''Build 224, Memphis is launched by typing
Alt-View_Source or Alt-F12'''.

See also [[Sugar_Instructions#Terminal_.28linux_prompt.29|Sugar Instructions:Terminal]]
--[[User:Tonyv|Tonyv]] 01:24, 13 January 2007 (EST)

== Network ==

Chances are that the network will not be enabled. Following are two possible ways to enable it.

=== Enabling the Network Alternative #1 ===
When the emulator is starting GRUB boot loader, press a key.
#Choose then the Qemu line with arrow keys.
#Press ''E''
#Move to the 'Kernel' line and press ''End''
#Add Space ''1'' to end of the line
#Press ''Enter''
#Press ''B''

You will be automaticaly log in as superuser in terminal (in single user mode).

You can start network and put your local keyboard layout command there like this (using tabulator key to complete the filenames):

echo ifup eth0: >> /etc/rc.local
or
#(change '''ONBOOT''' from "no" to '''"yes"''')
nano '''/etc/sysconfig/network-scripts/ifcfg-eth0'''
#(disable NetworkManager)
mv /etc/rc5.d/S98NetworkManager /etc/rc5.d/K98NetworkManager

Put your own keyboard layout for text terminals

echo loadkeys ''Your_two_letter_country_code'' >> /etc/rc.local
. /etc/rc.local

Type '''Ctrl-D''' to continue normal boot.

Keyboard layout and network should work automatically every time you start the QEMU image.
--[[User:Tonyv|Tonyv]] 01:52, 13 January 2007 (EST)

=== Enabling the Network Alternative #2 ===
Make sure the the window has the focus (label should say <tt>QEMU - Press Ctrl-Alt to exit grab</tt>).
If the following keys do not work try pushing also the Shift key down to exit the Sugar environment.
If it does not work see the sendkey method of Alternative #3
#
#Press <tt>Alt + Ctrl + 1</tt> to enter the terminal mode of the OLPC.
#Make sure that you're logged in.
#*If not, just hit <tt>enter</tt> and it'll ask you to.
#*Login as <tt>root</tt> (no password is required)
#Type <tt>dhclient</tt>
#Press <tt>Alt + Ctrl + 7</tt> to return to the graphical mode of the OLPC.
#Your browser / network connection should be working fine.


=== Enabling the Network Alternative #3 ===

The steps below work on QEmu regardless of which operating system you are running.

'''If you are having trouble getting an internet connection inside QEmu:'''

Get the image running in QEmu so that you can see the normal view with the XO icon in the middle.
[[Image:Empty_no_apps_no_frame.png|300px]]

Make sure your mouse is active in QEmu, then press ctrl+alt+2 together.

This will bring up a screen like a command line, called the QEmu monitor.

Type the following:

sendkey ctrl-alt-f1

And press return.

Then with the keyboard hold down the following keys: '''ctrl+alt+7'''

Another text based screen will appear, asking you to log-in. Sometimes there can be an extra "1" after the word "Login:", just delete it. Type '''root''' and press return

Then type:

dhclient

or

ifup eth0:

You should see the screen fill with text.
[[Image:QEmu_running_dhclent.png|400px]]

Some of the numbers have been removed from the screenshot above - they're not important.

Then hold down the following keys on the keyboard: '''ctrl+alt+2'''

and type the following:

sendkey ctrl-alt-f7

Then using the keyboard, hold down the following keys: '''ctrl+alt+1'''

Now open the browser and you should have internet access.

[[Image:Sugar_browser_with_frame_google_home_page.png|300px]]
[[Image:OLPC_20070104.png|300px]]

[[Category:Emulation]]
[[Category:Feedback]]
[[Category:OS]]
[[Category:Developers]]

Latest revision as of 06:12, 17 December 2008