Monday, August 27, 2012

qemu-kvm spice features

Spice is one of my favorite playgrounds for a long time. Even though it doesn't have lots of features (yet) it's already quite stable and while things like clipboard sharing and window re-sizing are not new, they are new to me.
Recently iv'e started to try out those features, especially clipboard sharing is something which i really wanted to have.

Host settings:
Basically it's pretty simple. First, you'll need to add following to your start command of qemu-kvm:
 -device virtio-serial -chardev spicevmc,id=vdagent,name=vdagent -device virtserialport,chardev=vdagent,name=com.redhat.spice.0  

Guest settings:
Secondly, it's really important that you enable the consolekit useflag for your window manager (except windows clients). In order that other programs can use it too i enabled it system-wide in make.conf.
Furthermore you have to install the spice vdagent. There is a package in gentoo (app-emulation/spice-vdagent) which does the job.
 emerge -av spice-vdagent  

Afterwards you just have to start the said agent with:
 /etc/init.d/spice-vdagent start  
 rc-update add spice-vdagent default  

Usually you don't have to change anything in the config of the agent as long as you don't change anything at the start command.
However, depending on your Window Manager it can happen that the spice vdagent doesn't work.

So far i found out that it doesn't work with awesome. Xfce, lxde, gnome, kde, razorqt and even windows 7 (with the corresponding driver) are working flawless. I think the reasons is consolekit. The window manager has to be build with consolekit support, otherwise the agent would be useless.

Monday, August 13, 2012

kde unable to mount usb sticks

ck-list-session shows my session as inactive

Recently i could fix another problem on my system which i had since i set it up. I wasn't able to mount usb-sticks. I always got the messages: Not authorized, and since i had no knowledge about udisks i had to look again how to fix it. I was surprised how long i could live without mounting usb sticks.

Basically mounting devices should work without any special configuration changes but my system had a difference compared with other systems. I didn't use an login-manager like kdm. I'm used to go into kde with the startx command. Because of that my session wasn't active and therefore udisks didn't allowed me to mount devices.
The change was simple and was done in:

In the section "Mount a device" i had to change a "no" into "yes" in the line "allow_inactive":
  <action id="org.freedesktop.udisks.filesystem-mount">  
   <description>Mount a device</description>  
   <message>Authentication is required to mount the device</message>  

Easy fix and now i'm able to mount usb-stick's again :)

Thursday, August 9, 2012

gentoo/xen part two

For some time now kernel 3.5 is out. I tested many rc's with xen and i also encountered quite a few problems. Mostly kernel panics. I found the rc5 the most stable of the rc's. Now i'm using the official gentoo unstable version and so far i didn't get any kernel panics.

My ATI card with the latest drivers

I had some time now to test and since i like to game i really test alot. Besides that there was the steam summer sale, which means i have now 50+ games. I finished playing Half-Life, Half-Life 2, Episode One, Episode Two and Tomb Raider: Legend.

Now i'm playing Borderlands with my brother in coop mode. I also tried games like Spec Ops: The Line, Diablo 3, Team Fortress 2, L4D2, Tera, Dead Island, RFIT, Unreal Tournament and  Need for Speed: Hot Pursuit 2.
All of them running fluently with mostly max details on. Windows itself also runs without problems. No single BSOD or anything else:

  • Driver update in Windows for the graphic card worked perfectly.
  • However, turning off windows and starting again still don't work with xen-4.2. I still have to reboot the whole system.
  • Another detail worth to mention is, when i played Rift, every time i played i had to unlock my account, because it though i played from a new PC. Steam on the other side don't have any problems.


On the linux side it's bit differently. I had problems, but mainly with the kernel which i can't judge since i always tried unstable release candidates which are known to have bugs. After all, the final gentoo 3.5 kernel works again perfectly.

Udev on the other side still makes me headaches. Right now i stuck with udev-182-r3 which is not even in portage anymore. Once i update to a newer version, xen won't start any guest anymore. I think it's because of broken udev rules which is described here. I didn't test that much yet but i have holiday now and hope i can find a solution.

Besides some kernel panic's with rc's and the udev thing there aren't any bugs to report. Other updates didn't influence xen at all, even though i'm on ~amd64 and update the system at least once a week.

Gentoo and kde working flawless and fluently. Though i can see that kde responses a bit faster when i start linux without xen, but that's not noteworthy.
xl dmesg

I've also upgraded to gcc-4.6 and xen-4.2. GCC-4.6 didn't change anything particular within xen, while with xen-4.2 i could finally try out gfx_passthrough in the config. However i couldn't get it to work, even though i don't get any error messages too. With xen-4.2 there are also alot of new function in the xl toolstack. I also found a nice solution to turn off the guest from the linux system:
xl shutdown -F 1

The number is the xen-id of the guest system. The "-F" means it sends an ACPI power event. While this isn't something particular new it's nice to know.

Another change i made in my win7x64.cfg:
 # This gives the vm exclusive access to the 4,5,6 and 7 cpu.  


While kernel 3.5 seems to be a good kernel, 3.6 will be another one worth to try out. If you reading the blog post at xen, 3.6 will get some nice performance improvements. Guess this time i'll wait until the final kernel get released :)
I'm also looking forward too steam for linux. Even though xen is working quite good, native playing games on linux would be awesome.

Finally i'm showing you another demonstration video while playing borderlands. This time in a better quality. Hope you'll like it.

Tuesday, August 7, 2012

lightdm greeter selection

Lightdm is a new lightweight display manager which can replace kdm or gdm and also brings greeters for both of them.
Recently i've tried that new display manager on a virtual machine. There is a nice wiki entry at which helped me installing lightdm. Unfortunately i failed which was because lightdm always started the gtk+ version.
When i forced the kde version, lightdm crashed. That was because of that issue.

After all, at the wiki there is a important configuration possibility missing. It's not shown how to change the greeter in the configuration file.
That is done with following statement in lightdm.conf:

lightdm-kde-greeter would start the qt/kde greeter, while lightdm-gtk-greeter would start the gtk version. For both you have to download the corresponding packages first. I mentioned that at the irc channel and i hope they add that.

Monday, August 6, 2012

kdesu won't start apps in superuser mode

For a long time i had a really annoying bug in kde. This weekend i updated to kde-4.9 and found out that it's still present. The problem was when you press ALT+F2 and type "kdesu systemsettings" (or another program) the password prompt showed up but than nothing happen. I found a few topics about this, most notably here and here.

I had some time and since i could reproduce this problem in my virtual machines too i've started to track down the problem.
After a few hours of searching i finally found it. The reason was because dbus wasn't build with the useflag X enabled.
Adding the X useflag to dbus solved the problem.
 echo "sys-apps/dbus X" >> /etc/portage/package.use  

After creating a bug report on devs also mentioned that if you're using a desktop/kde profile you shouldn't hit the problem because there dbus would be build with X enabled anyway.
I never though about that but it's true, i'm using a default amd64 profile. The desktop/kde profile do enable to much for me.
Anyway, i also found another issue. ligthdm-kde also need dbus with X enabled otherwise it wont start.