Switching IntelGPU NvidiaGPU on Live iso experiment

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
wangjih
Level 1
Level 1
Posts: 46
Joined: Sun Aug 02, 2015 8:08 am

Switching IntelGPU NvidiaGPU on Live iso experiment

Post by wangjih »

Marying nvidia with linux has always triggered problems ,rants....We take the opportunity of current LiveManjaro as

the only liveiso capable of running soft switch nvidia without hassle to create exercises using uniquely live running .

and in particular a "not too complicated" switch between XorgDisplayOnIntelGPU and XorgDisplayOnNvidiaGPU with the live manjaro.

All exercises are done on Acer laptop 4GB ram with "live manjaro" using bash'ish common linux commands .

link https://sourceforge.net/projects/toysbo ... cCards.pdf

https://sourceforge.net/projects/toysbo ... x86_64.iso

we hope someone will do the same for linuxmint live iso.


inxi
CPU: Quad Core Intel Core i7-4720HQ (-MT MCP-)
speed/min/max: 798/800/3600 MHz Kernel: 4.14.30-1-MANJARO x86_64 Up: 15:47
Mem: 1547.8/3869.7 MiB (40.0%) HDD: 931.51 GiB (16.4% used)
Graphics:
Card-1: Intel 4th Gen Core Processor Integrated Graphics Controller
driver: i915 v: kernel
Card-2: NVIDIA GM107M [GeForce GTX 860M] driver: N/A
Display Server: N/A driver: intel unloaded: modesetting tty: 80x24

benchmarks

[XorgDisplayOnNvidia]$ glxgears
26207 frames in 5.0 seconds = 5241.297 FPS
optirun glxgears
4367 frames in 5.0 seconds = 873.224 FPS

geek3D's GpuTest:
XorgOnNvidia Plot3D Score:16442 points (FPS:274)
optirun Plot3D score: 784 points (FPS: 13)

optirun glxspheres64
131.829567 frames/sec - 147.121797 Mpixels/sec

[XorgDisplayOnNvidia]$ glxspheres64
829.373942 frames/sec - 925.581319 Mpixels/sec

unigine_heavenBenchmark-XorgOnNvidiaLive
fps 33
geforce gtx 860m
graphics 1097MHz
memory 2505MHz
Temp 87C

XorgOnNvidia optirun ./heaven
fps 33 fps 16
time 128s
frame 4500
fps min 10.4 fps min 5
fps max 44.6 fpd max 22
scene 16/26


Have fun
wangji

updated june 16th In fact mint sylvia as well as ubuntu xenial can be switched to nvidia very easily on live iso ! Here is a very simple experiment on live Mint-18.3

Recipe

boot mint Sylvia live
in desktop's terminal:

apt install nvidia-384 nvidia-prime
ctrl-f2
in VT2 console terminal:
mint "Return" ; sudo su

systemctl stop lightdm
rmmod nouveau
modprobe bbswitch
prime-select nvivia
systemctl start nvidia

in new desktop's terminal : glxgears

On my Acer VN7 791 glxgears operates at 6000 fps fairly similar to manjaro-17.1.7 results.

while xubuntu-16.04.4 gives around 13000 fps



mint mint # apt install nvidia-384 nvidia-prime
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
bbswitch-dkms lib32gcc1 libc-dev-bin libc6 libc6-dbg libc6-dev libc6-i386
xserver-xorg-legacy
Suggested packages:
bumblebee glibc-doc
Recommended packages:
nvidia-settings libcuda1-384 nvidia-opencl-icd-384
The following NEW packages will be installed:
bbswitch-dkms lib32gcc1 libc6-i386 nvidia-384 nvidia-prime
xserver-xorg-legacy
The following packages will be upgraded:
libc-dev-bin libc6 libc6-dbg libc6-dev
4 upgraded, 6 newly installed, 0 to remove and 348 not upgraded.
Need to get 84.5 MB of archives.
After this operation, 325 MB of additional disk space will be used.


First Installation: checking all kernels...
Building only for 4.10.0-38-generic
Building for architecture x86_64
Building initial module for 4.10.0-38-generic

mint@mint ~ $ lsmod | grep nv
nvidia_uvm 671744 0
nvidia_drm 45056 3
nvidia_modeset 860160 2 nvidia_drm
nvidia 13156352 88 nvidia_modeset,nvidia_uvm
drm_kms_helper 151552 2 i915,nvidia_drm
drm 352256 7 i915,ttm,nvidia_drm,drm_kms_helper

mint@mint ~ $ inxi -b
System: Host: mint Kernel: 4.10.0-38-generic x86_64 (64 bit)
Desktop: MATE 1.18.0 Distro: Linux Mint 18.3 Sylvia
Machine: System: Acer (portable) product: Aspire VN7-791 v: V1.10
Mobo: Acer model: Aspire VN7-791 v: V1.10
Bios: Insyde v: V1.10 date: 11/27/2014
CPU: Quad core Intel Core i7-4720HQ (-HT-MCP-) speed/max: 1099/3600 MHz
Graphics: Card-1: Intel 4th Gen Core Processor Integrated Graphics Controller
Card-2: NVIDIA GM107M [GeForce GTX 860M]
Display Server: X.Org 1.18.4 driver: nvidia
Resolution: 1920x1080@60.02hz
GLX Renderer: GeForce GTX 860M/PCIe/SSE2
GLX Version: 4.5.0 NVIDIA 384.130
Network: Card-1: Qualcomm Atheros AR9462 Wireless Network Adapter
driver: ath9k
Card-2: Broadcom NetLink BCM57780 Gigabit Ethernet PCIe driver: tg3
Drives: HDD Total Size: 1000.2GB (28.9% used)
Info: Processes: 249 Uptime: 20 min Memory: 1091.0/3871.9MB
Client: Shell (bash) inxi: 2.2.35

mint@mint ~ $ ldd /usr/bin/glxgears
linux-vdso.so.1 => (0x00007ffd733ae000)
libGL.so.1 => /usr/lib/nvidia-384/libGL.so.1 (0x00007faa434a9000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007faa431a0000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007faa42e66000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007faa42a9b000)
libnvidia-tls.so.384.130 => /usr/lib/nvidia-384/tls/libnvidia-tls.so.384.130 (0x00007faa42897000)
libnvidia-glcore.so.384.130 => /usr/lib/nvidia-384/libnvidia-glcore.so.384.130 (0x00007faa409db000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007faa407c8000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007faa405c4000)
/lib64/ld-linux-x86-64.so.2 (0x0000559525329000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007faa403a2000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007faa4019d000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007faa3ff97000)

mint@mint ~ $ glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
36733 frames in 5.0 seconds = 7346.327 FPS
29551 frames in 5.0 seconds = 5910.106 FPS
35314 frames in 5.0 seconds = 7062.758 FPS
31280 frames in 5.0 seconds = 6255.795 FPS
34836 frames in 5.0 seconds = 6967.161 FPS

Why do I get 13000fps in xubuntu on same hardware with nvidia-384 ?
The ldd results shows clearly a full use of proprietary nvidia libraries not nouveau's ones.

have fun
Last edited by wangjih on Sat Jun 16, 2018 5:08 am, edited 1 time in total.
deepakdeshp
Level 20
Level 20
Posts: 12334
Joined: Sun Aug 09, 2015 10:00 am

Re: Switching IntelGPU NvidiaGPU on Live iso experiment

Post by deepakdeshp »

If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
wangjih
Level 1
Level 1
Posts: 46
Joined: Sun Aug 02, 2015 8:08 am

Re: Switching IntelGPU NvidiaGPU on Live iso experiment

Post by wangjih »

Hi,
I should have stressed many serious points

1 this is done on live iso -so as to always be possible to reproduce ,even volontary bugs for learning. And it does not concern only "soft switch" as in all install recipes currently in use .
Is it possible to install nvidia on live iso with the ppa method and get it running without installing of course ? If yes then it coresponds to my desire posting here : to get linuxmint-live iso with nvidia for fun.
2 compare benchmark -on same hardware of course- using optirun with respect to XorgDisplayOnNvidia results are then meaningful. see huge 3Dplot difference ! This is why the posting for triggering people curiosity
3 I would greatly appreciate someone reproduce Dr Jekyll & Mr Hyde exercise with installed linuxmint (what I showed on live iso )

Of course your work on ppa nvidia is really really useful for most of us. (with installed linux)
User avatar
trytip
Level 14
Level 14
Posts: 5366
Joined: Tue Jul 05, 2016 1:20 pm

Re: Switching IntelGPU NvidiaGPU on Live iso experiment

Post by trytip »

i miss the good old days when nvidia/amd drivers were automatically loaded in live systems. there are still a few distributions that do this but now drivers are built on boot (longer boot if you choose non-free drivers) instead of already having them included in live system already
Image
wangjih
Level 1
Level 1
Posts: 46
Joined: Sun Aug 02, 2015 8:08 am

Re: Switching IntelGPU NvidiaGPU on Live iso experiment

Post by wangjih »

Here is a live iso xubuntu-bionic with nvidia-390.48 and prime from MatheuGras-TimRichardson

It switched correctly on live testing with Acer VN7 laptop 4GB

https://sourceforge.net/projects/toysbo ... nvidia.iso

Screenshots + Logs are on the site

xubuntu@xubuntu:~$ cat /proc/cmdline BOOT_IMAGE=(loop)/casper/vmlinuz iso-scan/filename=/iso/xubuntu-18.04-4.15.0-24-nvidia0.iso file=/cdrom/preseed/xubuntu.seed waitusb=5 boot=casper

xubuntu@xubuntu:~$ uname -a
Linux xubuntu 4.15.0-24-generic #26-Ubuntu SMP Wed Jun 13 08:44:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

xubuntu@xubuntu:~$ inxi -G
Graphics:
Card-1: Intel 4th Gen Core Processor Integrated Graphics Controller
Card-2: NVIDIA GM107M [GeForce GTX 860M]
Display Server: x11 (X.Org 1.19.6 ) drivers: modesetting,nvidia (unloaded: fbdev,vesa,nouveau) Resolution: 1920x1080@60.02hz
OpenGL: renderer: GeForce GTX 860M/PCIe/SSE2 version: 4.6.0 NVIDIA 390.48

xubuntu@xubuntu:~$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x23a cap: 0x1, Source Output crtcs: 0 outputs: 0 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x44 cap: 0x6, Sink Output, Source Offload crtcs: 3 outputs: 2 associated providers: 1 name:modesetting
this shows nvidia_card1 as source output (rendering,graphic computation...) and intel_card as sink input display previous output to screen : optimus

xubuntu@xubuntu:~$ glxinfo | grep NVIDIA
server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation
OpenGL core profile version string: 4.6.0 NVIDIA 390.48
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL version string: 4.6.0 NVIDIA 390.48
OpenGL shading language version string: 4.60 NVIDIA
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 390.48

xubuntu@xubuntu:~$ glxgears
Running synchronized to the vertical refresh. The framerate should be approximately the same as the monitor refresh rate.
69297 frames in 5.0 seconds = 13859.334 FPS
68090 frames in 5.0 seconds = 13617.823 FPS

xubuntu@xubuntu:~$ glxspheres64 Polygons in scene: 62464 (61 spheres * 1024 polys/spheres) Visual ID of window: 0xa8 Context is Direct OpenGL Renderer: GeForce GTX 860M/PCIe/SSE2
1914.953887 frames/sec - 2137.088538 Mpixels/sec
1964.035952 frames/sec - 2191.864122 Mpixels/sec
have fun
wangjih
Level 1
Level 1
Posts: 46
Joined: Sun Aug 02, 2015 8:08 am

Re: Switching IntelGPU NvidiaGPU on Live iso experiment

Post by wangjih »

Hi all
I am glad to announce a true live running latest nvidia-450.57 on linuxmint-Tricia-19.3-mate

for those who do not want to get burdens with black screen or multiple greeting login looping around but still want to play games on nvidia
or to get hands on cuda for experimenting nbody computation, deep learning .....with pure liveiso.

https://sourceforge.net/projects/toysbo ... 450.57.iso ready to use

The ax200 was includes so that thix iso could run on recent intel's wifi i.e. Acer Nitro5 gtx1650 .

The site describes recipe for nvidia's driver installation on livecd with screenshots and bechmarks

enjoy
hoan
Post Reply

Return to “Tutorials”