Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 1361  / 2 Years ago, sat, august 6, 2022, 1:01:05

I have a single SSD I dual-boot with Windows 7 / Ubuntu 11.10. I switch this drive daily between two computers. One is a laptop with integrated Intel graphics. The other is a desktop with an NVIDIA video card.



I want the correct driver to be used and 3D acceleration to be enabled automatically when I boot into Ubuntu on either computer. How do I achieve this?



When I boot Ubuntu with my laptop most drivers start up normally, but GM965 video driver doesn't load, therefore 3D acceleration remains off. The logs show the NVIDIA driver issuing an error about unavailability (looks like it's forcing the NVIDIA driver).



Is normal that Ubuntu 11.10 & Xorg nowadays don't have the same behavior as Windows 7? When I boot Windows 7 the right driver is loaded by PCI identification, and resolution settings are loaded via DDC from the monitor. I think Xorg can do the same thing like when you boot a live CD.



In order to diagnose I need to know how to configure video driver on modern Xorg deployments that deprecates /etc/X11/xorg.conf



Does anyone have any ideas to help me?



Thanks in advance


More From » drivers

 Answers
0

Bodhi.zazens answer is a step in the right direction, but you'll possibly be unable to use GL capabilities of you Intel card (e.g. desktop effects).



A more polished script that uses the vendor ID of nVidia and corrects the GL library paths is shown below. Before installing this script, you need to save the nvidia xorg configuration to /etc/X11/xorg.conf.nvidia. On the nvidia machine, run the below commands:



sudo nvidia-xconfig
sudo mv /etc/X11/xorg.conf{,.nvidia}


The below script should be saved as /etc/init/auto-gfx-card.conf. When copying, be careful not to put spaces after the trailing backslashes.



description "autoconfigure graphics card settings"
start on (filesystem and (starting lightdm or starting kdm or starting gdm))
script
# If any nVidia device is found, assume it to be a graphics card
if [ -n "$(lspci -d10de:)" ]; then
for arch in x86_64-linux-gnu i386-linux-gnu; do
# since nvidia drivers have a higher priority, it'll
# automatically selected as the best available version
update-alternatives --quiet --force --auto ${arch}_gl_conf || true
done
# create the symlink, overwriting existing links if necessary
ln -sf /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf
else
# restore Intel GL capabilities
for arch in x86_64-linux-gnu i386-linux-gnu; do
update-alternatives --quiet --force --set
${arch}_gl_conf /usr/lib/$arch/mesa/ld.so.conf 2>/dev/null || true
done
# remove the symlink if any
rm -f /etc/X11/xorg.conf
fi
end script


No further commands are necessary to activate this Upstart job.


[#41447] Sunday, August 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
peratingcit

Total Points: 253
Total Questions: 122
Total Answers: 94

Location: Botswana
Member since Sat, Jan 7, 2023
1 Year ago
;