Skip to contentSkip to conversation

mouse doesn't work on guest OS

Qemu-devel Amirali Shambayati 4 participants 6 messages May 20, 2011 – May 22, 2011

lore
Share & tools
lore
#0 lore raw

Hello all,
I use Qemu to run ubuntu image(for kernel debugging affairs). I use following command:

sudo qemu -hda ubuntu-qemu-test -append "root=/dev/sda1" -kernel /mnt/build/linux-2.6/arch/x86/boot/bzImage -boot c -net nic -net user

Mouse doesn't work on guest ubuntu.

I googled my problem, and I found two solutions:
adding "-usb -usbdevice tablet"
entering this command before running qemu: "export SDL_VIDEO_X11_DGAMOUSE=0"

But none of them worked for me. any help is appreciated.

Signature · 5 lines
Amirali Shambayati
Bachelor Student
Computer Engineering Department
Sharif University of Technology
Tehran, Iran
#1 lore raw
Quoted 1 line · On Friday 20 May 2011 23:59:25 Amirali Shambayati wrote:

Mouse doesn't work on guest ubuntu.

You need to debug it, as if it was real hardware.

Quoted 1 line

But none of them worked for me. any help is appreciated.

This isn't a very in-depth problem description. Remember that we can't see your screen.

Does qemu not start? Does the kernel not boot? Does it show up in dmesg or /proc? Does it work in text mode but not in X (or vice versa)? Does it work if you use the -device (qdev) approach instead? Does it work if you use the monitor console to "hotplug" the mouse after boot instead of on the command line?

Basically, you need to tell us what debugging you've done, and the results of each part of that debugging.

It might also help to know which version of qemu you are using.

Brad

#2 lore raw

Hi Brad,
Qemu starts, kernel boots and ubuntu's GUI boots. I use "dmesg" in terminal to see printks which I have put in kernel code. My problem is that, mouse is hanged in the middle of the screen. I need mouse to connect to Internet!! if anyway exists to make Internet connection using terminal, I won't need mouse anymore!

I'm newbie with kernel debugging and using qemu. Your help will be so valuable for me.

Quoted 21 lines · Brad Hards
Quoted 1 line · On Friday 20 May 2011 23:59:25 Amirali Shambayati wrote:

Mouse doesn't work on guest ubuntu.

You need to debug it, as if it was real hardware.

Quoted 1 line

But none of them worked for me. any help is appreciated.

This isn't a very in-depth problem description. Remember that we can't see your screen.

Does qemu not start? Does the kernel not boot? Does it show up in dmesg or /proc? Does it work in text mode but not in X (or vice versa)? Does it work if you use the -device (qdev) approach instead? Does it work if you use the monitor console to "hotplug" the mouse after boot instead of on the command line?

Basically, you need to tell us what debugging you've done, and the results of each part of that debugging.

It might also help to know which version of qemu you are using.

Brad

Signature · 5 lines
Amirali Shambayati
Bachelor Student
Computer Engineering Department
Sharif University of Technology
Tehran, Iran
#3 lore raw
Quoted 1 line · Amirali Shambayati

Hi Brad,

Hi.
Please don't "top post" (google for this if you don't understand it).

Quoted 2 lines

Qemu starts, kernel boots and ubuntu's GUI boots. I use "dmesg" in terminal to see printks which I have put in kernel code.

When I wrote "Does it show up in dmesg or /proc?", I meant "Does the mouse connection show up in dmesg output" and "Do you see the mouse in /proc/bus/input/devices?"

Quoted 2 lines

My problem is
that, mouse is hanged in the middle of the screen.

I still don't understand the problem. I'm guessing you see the cursor in the guest, but the host mouse isn't having any effect on that guest cursor.

Quoted 3 lines

I need mouse to
connect to Internet!! if anyway exists to make Internet connection using terminal, I won't need mouse anymore!

I don't understand what you are doing with the mouse, but there are various command line tools (dhclient, ifconfig, etc) that you may be able to use in the client. These are nothing to do with qemu though.

Quoted 2 lines

I'm newbie with kernel debugging and using qemu. Your help will be so valuable for me.

A clear, explicit problem description will make this a lot easier.

You still haven't answered all of my questions, and you still haven't described what you've done to try to debug this problem.

Quoted 23 lines · Brad Hards
Quoted 22 lines · On Friday 20 May 2011 23:59:25 Amirali Shambayati wrote:
Quoted 1 line

Mouse doesn't work on guest ubuntu.

You need to debug it, as if it was real hardware.

Quoted 1 line

But none of them worked for me. any help is appreciated.

This isn't a very in-depth problem description. Remember that we can't see your screen.

Does qemu not start? Does the kernel not boot? Does it show up in dmesg or /proc? Does it work in text mode but not in X (or vice versa)? Does it work if you use the -device (qdev) approach instead? Does it work if you use the monitor console to "hotplug" the mouse after boot instead of on the command line?

Basically, you need to tell us what debugging you've done, and the results of each part of that debugging.

It might also help to know which version of qemu you are using.

Brad

#4 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Update to lastest Xorg and/or change mouse protocol in Xorg configuration.

The default protocol is not emulated (at all, or well enough) by QEMU and while it detects a mouse it does not work, lastest Ubuntu version does not show this problem

man xorg.conf or google it

No information on how to configure a PS/2 mouse protocol in X11 is inside the scope of this mailing list.

Regards,
Natalia Portillo

Quoted 23 lines · Brad Hards
Quoted 1 line · Amirali Shambayati

Hi Brad,

Hi.
Please don't "top post" (google for this if you don't understand it).

Quoted 2 lines

Qemu starts, kernel boots and ubuntu's GUI boots. I use "dmesg" in terminal to see printks which I have put in kernel code.

When I wrote "Does it show up in dmesg or /proc?", I meant "Does the mouse connection show up in dmesg output" and "Do you see the mouse in /proc/bus/input/devices?"

Quoted 2 lines

My problem is
that, mouse is hanged in the middle of the screen.

I still don't understand the problem. I'm guessing you see the cursor in the guest, but the host mouse isn't having any effect on that guest cursor.

Quoted 3 lines

I need mouse to
connect to Internet!! if anyway exists to make Internet connection using terminal, I won't need mouse anymore!

I don't understand what you are doing with the mouse, but there are various command line tools (dhclient, ifconfig, etc) that you may be able to use in the client. These are nothing to do with qemu though.

Quoted 32 lines
Quoted 2 lines

I'm newbie with kernel debugging and using qemu. Your help will be so valuable for me.

A clear, explicit problem description will make this a lot easier.

You still haven't answered all of my questions, and you still haven't described what you've done to try to debug this problem.

Quoted 23 lines · Brad Hards
Quoted 22 lines · On Friday 20 May 2011 23:59:25 Amirali Shambayati wrote:
Quoted 1 line

Mouse doesn't work on guest ubuntu.

You need to debug it, as if it was real hardware.

Quoted 1 line

But none of them worked for me. any help is appreciated.

This isn't a very in-depth problem description. Remember that we can't see your screen.

Does qemu not start? Does the kernel not boot? Does it show up in dmesg or /proc? Does it work in text mode but not in X (or vice versa)? Does it work if you use the -device (qdev) approach instead? Does it work if you use the monitor console to "hotplug" the mouse after boot instead of on the command line?

Basically, you need to tell us what debugging you've done, and the results of each part of that debugging.

It might also help to know which version of qemu you are using.

Brad

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org

iF4EAREIAAYFAk3YpMcACgkQv/wfOsykIRTAVAD/XalIs5B9hNbCXiT6mBX3CU1a D5nzg1XgRSOAIAMZ5+sA/2WNgkCG1WZCwwIKN4i5g4rwknlKiFixEvWH8yGaMd1p =ttaL
-----END PGP SIGNATURE-----

#5 lore raw
In reply to Brad Hards
Quoted 5 lines · Brad Hards
Quoted 3 lines

My problem is
that, mouse is hanged in the middle of the screen.

I still don't understand the problem. I'm guessing you see the cursor in the guest, but the host mouse isn't having any effect on that guest cursor.

I do :-)

I'm pretty sure that this is a problem whereby the mouse is advertising both absolute and relative positioning to Xorg, but is actually only sending absolute events -- which Xorg is ignoring.

Check /var/log/Xorg.0.log (or whatever Xorg is logging to) and look for "mouse" or "evdev" or "ignor". If I'm right then you need to amend the config of the X server. I don't have the details to hand, but it's in the Xorg man page. Or just google for the relevant message you find in the log file.

jch