After reinstalling Windows 7, I set my laptop up to dual boot Xubuntu 18.04. My laptop has an integrated Intel i915 graphics chip and also an Nvidia GeForce GT 330M GPU. This post describes how I set up X11 to use the GPU.
Start by finding out which drivers are in use and available:
% ubuntu-drivers devices
... currently running nouveau
... recommends nvidia-340
Install the recommended driver and reboot:
% sudo apt-get install nvidia-340
...
% sudo shutdown -r now
After the reboot, VT-7 showed a black screen. VTs 1-6 were still available and the machine was otherwise functional. X.org.0.log recorded that the Nvidia driver had set (the graphics) mode to NULL.
To fix:
% sudo apt-get install nvidia-prime
% sudo prime-select nvidia
% sudo shutdown -r now
The X environment came back. To validate:
% inxi -G
Graphics: Card-1: Intel Core Processor Integrated Graphics Controller
Card-2: NVIDIA GT216M [GeForce GT 330M]
Display Server: x11 (X.Org 1.19.6 ) drivers: modesetting,nvidia (unloaded: fbdev,vesa,nouveau)
Resolution: 1920x1080@59.94hz
OpenGL: renderer: GeForce GT 330M/PCIe/SSE2 version: 3.3.0 NVIDIA 340.107
There's a tool to switch between the Nvdia and Intel chips:
Also:
% glxgears -info
...
...
13122 frames in 5.0 seconds = 2624.275 FPS
13039 frames in 5.0 seconds = 2607.778 FPS
13916 frames in 5.0 seconds = 2783.134 FPS
11971 frames in 5.0 seconds = 2394.196 FPS
For comparison and contrast, an even older GPU-less laptop managed about
~60 FPS running glxgears
.
As for Pharo, the OSWindow external operating system window examples, such
as SDL2AthensDrawingExample
, now only run in Nvidia mode and crash
Pharo instantly in Intel mode:
The program 'pharo' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
(Details: serial 100 error_code 2 request_code 154 minor_code 3)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
Tags: Linux
I just upgraded to bionic (old trusty user).
You suggest here to use Nvidia proprietary driver. What if things go wrong (as they did on trusty - I was stuck with nouveau since) how to return to default xserver-xorg-video-nouveau driver ?
I am asking you this, because, many years ago, while I did this move on trusty (32bits) I had a lot of trouble/work to get my system back to normal, and my experience with systemctl is still novice.
My desktop is a GA965P and video GT-610 (GF119)
I am again willing to try because bionic, as you know, is full of bugs, and video HW acceleration is one of them. For whom uses old systems, HW video playback is a must have or die.
Your reply is required for my next step.
Thank you.