Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
VMWare, running native gentoo as VM
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
redgsturbo
Apprentice
Apprentice


Joined: 24 Jun 2005
Posts: 283

PostPosted: Fri Jan 21, 2011 2:18 pm    Post subject: VMWare, running native gentoo as VM Reply with quote

Hey...

Currently have OSX 10.6, Windows 7 ultimate, Ubuntu, Gentoo, and a fully hardened Gentoo running on a macbook pro... all natively.
Currently they all boot natively, and they all boot within VMWare... what I would like to do, is have gentoo start open-vm-tools when booting into vmware, and not when its not. Likewise, I'd like it to use vmware video driver or nvidia driver when appropriate, and disable hardware sensors when in a vm environment.

To boil it down, is there a way to do conditional service starting, driver selection, and possibly applets in gnome? Any nice clean way to get this done?
Back to top
View user's profile Send private message
redgsturbo
Apprentice
Apprentice


Joined: 24 Jun 2005
Posts: 283

PostPosted: Fri Jan 21, 2011 3:20 pm    Post subject: Reply with quote

also, when I <ctrl-command> to release the curser in the VM, gentoo makes it switch to the next lowest virtual console. This is annoying. This doesn't happen in ubuntu, or when I'm booted in a gentoo livecd so I know its a config issue... but no clue what to change
Back to top
View user's profile Send private message
hirakendu
Guru
Guru


Joined: 24 Jan 2007
Posts: 386
Location: san diego

PostPosted: Fri Jan 21, 2011 8:02 pm    Post subject: Reply with quote

I can say something about the automatic gpu detection part. You can use some of the gpu-configuration scripts in Sabayon Linux distribution for automatic gpu detection. I modified it a little bit and here is how to use it.

1. Copy the following files (scripts and configs) to appropriate places.

1.1. Copy the xorg.conf files for each gpu to /etc/X11/ from here.

1.2. Copy the init scripts that calls the gpu-configuration scripts to /etc/init.d/ from here.

1.3. Copy the actual gpu-configuration scripts to /usr/sbin/ from here.

2. Add the copied init script in Step 1.2 to startup:
Code:
rc-update add x-setup default


3. At this stage, it should be ready to go. At every startup, the x-setup init script runs and copies the appropriate xorg.conf to /etc/X11/ and also runs "eselect opengl set nvidia" or "eselect opengl set xorg-x11" and links appropriate hardware 3d acceleration libraries. To manually select the driver, you may run for example
Code:
xconf-nvidia # for nvidia-driver

or
Code:
xconf-nouveau # for nouveau-driver
. It is also possible to pass the kernel command line option like "xdriver=xorg" or "xdriver=nvidia" to the bootloader.

4. Potentially you need to create a new section for vmware in the gpu-configuration script and a specialiized xorg.conf too. I might be doing it sometime in future, although I don't use vmware a lot.
_________________
Helium Sources || Gentoo Minimal Livecd
Back to top
View user's profile Send private message
redgsturbo
Apprentice
Apprentice


Joined: 24 Jun 2005
Posts: 283

PostPosted: Mon Jan 24, 2011 7:18 pm    Post subject: Reply with quote

Is there a way to make udev load the nvidia driver at boot, and the vmware? If I can get away without using an xorg.conf that would be ideal.
Back to top
View user's profile Send private message
hirakendu
Guru
Guru


Joined: 24 Jan 2007
Posts: 386
Location: san diego

PostPosted: Mon Jan 24, 2011 8:24 pm    Post subject: Reply with quote

Potentially, there should be a way to load nvidia-drivers without xorg.conf, using just udev, similar to how other drivers like radeon and intel are loaded. If I remember correctly, xorg did have support for loading even the proprietary drivers using hal, but was removed at some time. Regardless, you may end up writing udev rules for specific hardware id's, and is essentially the same as the script(s) mentioned above.

So did you try the scripts I mentioned above. If so, did it work?
_________________
Helium Sources || Gentoo Minimal Livecd
Back to top
View user's profile Send private message
redgsturbo
Apprentice
Apprentice


Joined: 24 Jun 2005
Posts: 283

PostPosted: Mon Jan 24, 2011 8:31 pm    Post subject: Reply with quote

hirakendu wrote:
Potentially, there should be a way to load nvidia-drivers without xorg.conf, using just udev, similar to how other drivers like radeon and intel are loaded. If I remember correctly, xorg did have support for loading even the proprietary drivers using hal, but was removed at some time. Regardless, you may end up writing udev rules for specific hardware id's, and is essentially the same as the script(s) mentioned above.

So did you try the scripts I mentioned above. If so, did it work?


Well I do thank you for the help of course... I actually went through them thoroughly and started modifying them so they were more generic, then packaging them in an ebuild so the solution to my problem can be reused more easily by others, and then I said to myself... why isn't udev doing this for me (the config part of course)?
Back to top
View user's profile Send private message
redgsturbo
Apprentice
Apprentice


Joined: 24 Jun 2005
Posts: 283

PostPosted: Mon Jan 24, 2011 9:25 pm    Post subject: Reply with quote

Another issue I'm having, is that open-vm-tools is installed and running (mouse does not lock in an X session), but resizing the window does not adjust resolution of the screen itself... just changes its size while keeping the ratio locked. Any idea why this isn't working? Its only in gentoo. Ubuntu works fine :/
Back to top
View user's profile Send private message
hirakendu
Guru
Guru


Joined: 24 Jan 2007
Posts: 386
Location: san diego

PostPosted: Tue Jan 25, 2011 12:53 am    Post subject: Reply with quote

I never specifically looked for an ebuild, but after searching around, I found that Sabayon Linux does have a package called sys-apps/gpu-detector and is in the portage overlay "sabayon".
_________________
Helium Sources || Gentoo Minimal Livecd
Back to top
View user's profile Send private message
redgsturbo
Apprentice
Apprentice


Joined: 24 Jun 2005
Posts: 283

PostPosted: Tue Jan 25, 2011 3:09 pm    Post subject: Reply with quote

hirakendu wrote:
I never specifically looked for an ebuild, but after searching around, I found that Sabayon Linux does have a package called sys-apps/gpu-detector and is in the portage overlay "sabayon".

Yeah I saw that, but it is doing far more than your script... I emerged it and it pulled in a bunch of sabayon livecd tools, and was a totally different gpu-detector script
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Wed Jan 26, 2011 2:41 am    Post subject: Re: VMWare, running native gentoo as VM Reply with quote

redgsturbo wrote:
Hey...

Currently have OSX 10.6, Windows 7 ultimate, Ubuntu, Gentoo, and a fully hardened Gentoo running on a macbook pro... all natively.
Currently they all boot natively, and they all boot within VMWare... what I would like to do, is have gentoo start open-vm-tools when booting into vmware, and not when its not. Likewise, I'd like it to use vmware video driver or nvidia driver when appropriate, and disable hardware sensors when in a vm environment.

To boil it down, is there a way to do conditional service starting, driver selection, and possibly applets in gnome? Any nice clean way to get this done?


Try writing a script and editing /etc/conf.d/local.start.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum