# 4.3.X gentoo sources and nvidia-drivers

## Roman_Gruber

It seems newest gentoo sources does not like the nvidia-drivers

My second question is about nvidia-settings. Is there a new tool, because last time i tried to use the latest nvidia-drivers version, it wanted to unmerge nvidia-settings, which seems to be kinda useful tool.

```
ASUS-G75VW roman # eix nvidia-sett

[I] media-video/nvidia-settings

     Available versions:  340.58 (~)340.58-r1 (~)355.11 {examples gtk3}

     Installed versions:  355.11(11:45:46 28.10.2015)(gtk3 -examples)

     Homepage:            http://www.nvidia.com/

     Description:         NVIDIA Linux X11 Settings Utility

ASUS-G75VW roman # eix nvidia-driv

[I] x11-drivers/nvidia-drivers

     Available versions:  [M]96.43.23-r1(0/96)^msd [M]173.14.39-r1(0/173)^msd 304.128-r1(0/304)^msd 340.93-r1(0/340)^msd 346.96-r1(0/346)^msd 352.41-r1(0/352)^msd (~)352.55(0/352)^msd 355.11-r2(0/355)^msd [m](~)358.09(0/358)^msd {+X acpi custom-cflags gtk gtk2 gtk3 +kms multilib pax_kernel (+)tools uvm KERNEL="FreeBSD linux"}

     Installed versions:  355.11-r2^msd(09:24:12 30.10.2015)(X acpi gtk2 gtk3 multilib tools uvm -pax_kernel KERNEL="linux -FreeBSD")

     Homepage:            http://www.nvidia.com/

     Description:         NVIDIA Accelerated Graphics Driver

```

Which was the reason why i masked

```
grep nvidia /etc/portage/package.mask

#>=x11-drivers/nvidia-drivers-341

#=media-video/nvidia-settings-355.11:0/0::gentoo

>=x11-drivers/nvidia-drivers-358.09:0/358::gentoo

>=media-video/nvidia-settings-358.0

ASUS-G75VW roman # grep gentoo-sourc /etc/portage/package.mask

=sys-kernel/gentoo-sources-4.3.0
```

I assumed after some weeks we got a newer nvidia-settings in portage, but we do not as of now.

I am sorry if this was already asked recently ...

----------

## j2brown

Apparently this is a known/expected issue:

 * Gentoo supports kernels which are supported by NVIDIA

 * which are limited to the following kernels:

 * <sys-kernel/gentoo-sources-4.3

 * <sys-kernel/vanilla-sources-4.3

Hopefully that means that it will be addressed, either here or upstream/NVIDIA.

----------

## Roman_Gruber

well nvidia-settings is one version behind. I wonder about htat too, is there a replacement for that tool for the current binary driver?

I have an issue with the linux kernel pending and therfore i am in need for a driver which works with latest kernel.org kernel. 

So I can update my bug report and get it maybe fixed, when Santa grants me that wish.

----------

## Buffoon

I'm not sure if there is a separate nvidia-settings package for latest driver, I think it is bundled.

----------

## davidm

 *Buffoon wrote:*   

> I'm not sure if there is a separate nvidia-settings package for latest driver, I think it is bundled.

 

Yes, I don't use nvidia but rather nouveau but just going from memory I think I read here on the forums that it now gets pulled in from the tools use flag from x11-drivers/nvidia-drivers and that this is the proper way to build it now.  Someone please correct me if I'm wrong.  :Smile: 

----------

## AaylaSecura

 *davidm wrote:*   

>  *Buffoon wrote:*   I'm not sure if there is a separate nvidia-settings package for latest driver, I think it is bundled. 
> 
> Yes, I don't use nvidia but rather nouveau but just going from memory I think I read here on the forums that it now gets pulled in from the tools use flag from x11-drivers/nvidia-drivers and that this is the proper way to build it now.  Someone please correct me if I'm wrong. 

 

It does but it doesn't seem to work with conky - the nvidia-settings package in addition installs some header files; I tried fooling conky by putting nvidia-settings into package.provided and installing the nvidia-settings binary via the tools USE flag in nvidia-drivers but conky configuration phase fails because it can't find those .h files... Maybe someone knows of a workaround to use the latest nvidia drivers AND be able to display temp via conky's nvidia variable?

----------

## ct85711

I noticed with conky, that you don't necessarily need the NVIDIA use flag set and still get the GPU information.

For my system, I ended up removing the nvidia-settings package and removed the nvidia USE flag from conky, but yet my conky has no problem  retrieving my GPU's temp and memory usage with no issues.

Personally, I am starting to think the issue isn't that the nvidia-settings is one version behind, more of the devs are not updating the ebuild along with the drivers...  As the new version of the nvidia-settings file from nvidia has been available, since Oct 9th  (there's a bug report, but no activity on it... #563724

 *ftp://download.nvidia.com/XFree86/nvidia-settings/ wrote:*   

> File:nvidia-settings-358.09.tar.bz            21535 KB     	10/09/2015 	06:58:00 AM

 

----------

## AaylaSecura

 *ct85711 wrote:*   

> I noticed with conky, that you don't necessarily need the NVIDIA use flag set and still get the GPU information.
> 
> 

 

Hmm you're right - I just tried that trick again (package.provided) and it works. I think I may have disabled the nvidia USE flag for conky last time I tried. In which case what's the use of the separate nvidia-settings package then?

Also, oddly enough now the nvidia drivers compile fine for kernel 4.3.0 (even though the error "invalid kernel configuration" is still there), I don't know what changed, I don't think there was an update to them.

----------

## Roman_Gruber

I always wondered if there is any real benefit to update to every version of those nvidia-drivers.

I doubt it really has any benefits, except maybe a newer kernel release is supported and maybe some newer cards.

AFAIK 4.2.X is the longterm supported kernel. so upgrading to 4.3 is only to show the linux kernel devs that my kernel bug / acpi / EC / bios bug still exists, so i can just bump the bug. Hole ASUS bios cross over several hardware has similar issue, and is known since 3 yeras what i saw ... and all the fixes which i saw, do nothing here.

----------

## ct85711

I don't know what use the nvidia-settings package provides, as everything that I need is provided with the regular nvidia driver package.  I've never needed to use the package.provided file yet, as the nvidia USE flag doesn't affect conky from pulling from nvidia's tool directly.

Generally, when ever I see a "invalid kernel configuration" error, it's due to you unmerging the running kernel's sources or /usr/src/linux != the current running kernel (based off of uname -a)

----------

## swimmer

 *ct85711 wrote:*   

> I don't know what use the nvidia-settings package provides, as everything that I need is provided with the regular nvidia driver package.  I've never needed to use the package.provided file yet, as the nvidia USE flag doesn't affect conky from pulling from nvidia's tool directly.

 

May I ask you how you configure conky to achieve that?

TIA

swimmer

----------

## TigerJr

 *tw04l124 wrote:*   

> I always wondered if there is any real benefit to update to every version of those nvidia-drivers.
> 
> I doubt it really has any benefits, except maybe a newer kernel release is supported and maybe some newer cards.
> 
> AFAIK 4.2.X is the longterm supported kernel. so upgrading to 4.3 is only to show the linux kernel devs that my kernel bug / acpi / EC / bios bug still exists, so i can just bump the bug. Hole ASUS bios cross over several hardware has similar issue, and is known since 3 yeras what i saw ... and all the fixes which i saw, do nothing here.

 

If you get the newer card every drivers update, i will think that you are bill gates, but what are you doing on linux forum - thats the question....

----------

## ct85711

this is my .conkyrc that I am using

```
ct85711@Oate ~ $ cat .conkyrc 

# Conky, a system monitor, based on torsmo

#

# Any original torsmo code is licensed under the BSD license

#

# All code written since the fork of torsmo is licensed under the GPL

#

# Please see COPYING for details

#

# Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen

# Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)

# All rights reserved.

#

# This program is free software: you can redistribute it and/or modify

# it under the terms of the GNU General Public License as published by

# the Free Software Foundation, either version 3 of the License, or

# (at your option) any later version.

#

# This program is distributed in the hope that it will be useful,

# but WITHOUT ANY WARRANTY; without even the implied warranty of

# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License

# along with this program.  If not, see <http://www.gnu.org/licenses/>.

#

alignment top_right

background yes

use_xft yes

xftalpha 0.5

border_width 1

cpu_avg_samples 2

default_color white

default_outline_color white

default_shade_color white

draw_borders no

draw_graph_borders yes

draw_outline no

draw_shades no

xftfont DejaVu Sans Mono:size=12

gap_x 30

gap_y 60

minimum_size 300 1000

net_avg_samples 2

no_buffers yes

out_to_console no

out_to_stderr no

extra_newline no

# Create own window instead of using desktop

own_window yes

own_window_class Conky

own_window_type desktop

#own_window_argb_visual yes

own_window_transparent yes

own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Update interval in seconds

update_interval 3.0

stippled_borders 0

uppercase no

use_spacer none

show_graph_scale no

show_graph_range no

# Use double buffering (reduces flicker, may not work for everyone)

double_buffer yes

# Force UTF8? note that UTF8 support required XFT

override_utf8_locale yes

TEXT

Kernel:  ${alignr}${kernel}

CPU: ${cpu cpu0}% ${alignr} 

RAM: $memperc% ${alignr}${membar 8,60}

Uptime: ${alignr}${uptime}

$hr

${color grey}Processes:$color $processes  ${color grey}Running:$color $running_processes

CPU Temp:${alignr}${execi 8 sensors | grep 'CPU temp' | cut -c18-24}

CPU Fan:${alignr}${execi 8 sensors | grep 'CPU fan' | cut -c16-23}

System Temp: ${alignr}${execi 8 sensors | grep 'System temp' | cut -c18-24}

GPU Temp: ${alignr}${execi 8 nvidia-smi -q -d "TEMPERATURE" | grep 'Current' | cut -c39-42}

GPU Memory Usage: ${alignr}${execi 8 nvidia-smi -q -d "MEMORY" | grep -A 1 -m 1 'Total' | cut -c39-42 | tail -n1}/2047

$hr

${color grey}Networking:

Up:$color ${upspeed eth0} ${color grey} -            Down:$color ${downspeed eth0}

Upload: ${alignr}${totalup eth0}

Download: ${alignr}${totaldown eth0}

$hr

${color grey}Name              PID   CPU%   MEM%

${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}

${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}

${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}

${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}

```

In short, I am having conky run the nvidia-smi command, and parse that output for what I need.  Most of my conky script was copied from someone else's script, modified to work for me.

**Note:  My process is no way efficient, but it gets what I need done.  I know my parsing could be improved upon, but I not that skilled on that.

----------

## Roman_Gruber

 *TigerJr wrote:*   

> If you get the newer card every drivers update, i will think that you are bill gates, but what are you doing on linux forum - thats the question....

 

funny, lol

I hardly saw any benefits over the years wiht my 9800m gts (was class 1 for years than class 2 ), now gtx 660m, hard to see any difference.

If I were Bill, I would not be here and enjoy a safari.

----------

## TigerJr

 *tw04l124 wrote:*   

>  *TigerJr wrote:*   If you get the newer card every drivers update, i will think that you are bill gates, but what are you doing on linux forum - thats the question.... 
> 
> funny, lol
> 
> I hardly saw any benefits over the years wiht my 9800m gts (was class 1 for years than class 2 ), now gtx 660m, hard to see any difference.
> ...

 

4 year i used WinFast 7600 GT card even with ePSXe emulator and not faced any problems. Until i wanted to use PCSX2 emulator, when i buy GTX 570 card. I see difference with fps on 1920x1080 resolution, now i can use two displays...

What's up to drivers, for 4 years i reinstall only twice, when was a bug with a game, solved after changing vendor driver on nvidia drivers and after reinstalling whole the operating system.

PS

All the cards costs about 180-220 $

----------

## AaylaSecura

 *ct85711 wrote:*   

> I don't know what use the nvidia-settings package provides, as everything that I need is provided with the regular nvidia driver package.  I've never needed to use the package.provided file yet, as the nvidia USE flag doesn't affect conky from pulling from nvidia's tool directly.

 

It should (and it does on my system) - from the ebuild:

```
nvidia? ( media-video/nvidia-settings )
```

 *ct85711 wrote:*   

> Generally, when ever I see a "invalid kernel configuration" error, it's due to you unmerging the running kernel's sources or /usr/src/linux != the current running kernel (based off of uname -a)

 

This was not the case in my case, I checked all the sources were there and prepared.

 *ct85711 wrote:*   

> In short, I am having conky run the nvidia-smi command, and parse that output for what I need.  Most of my conky script was copied from someone else's script, modified to work for me.

 

Yes, you can always do that, but that was not my point. I wanted to "benefit" from using the inbuilt nvidia variable and that requires the nvidia USE flag, hence the need to package.provided.

----------

## ct85711

I never seen any documentation or even example conky configs that used the nvidia variable, to know what all it gives.  At least with my way, it doesn't rely on the nvidia-settings package.

----------

## AaylaSecura

 *ct85711 wrote:*   

> I never seen any documentation or even example conky configs that used the nvidia variable, to know what all it gives.  At least with my way, it doesn't rely on the nvidia-settings package.

 

What do you mean, it's in the manual... + all the available arguments for the different quantities (temp, freq, etc)

----------

## saellaven

patch for the original problem in the thread:

```

--- kernel/nvidia/nv-procfs.c.orig   2015-11-07 20:22:44.937383656 -0500

+++ kernel/nvidia/nv-procfs.c   2015-11-07 20:24:20.755353556 -0500

@@ -360,7 +360,8 @@

     registry_keys = ((nvl != NULL) ?

             nvl->registry_keys : nv_registry_keys);

 

-    return seq_printf(s, "Binary: \"%s\"\n", registry_keys);

+    seq_printf(s, "Binary: \"%s\"\n", registry_keys);

+    return 0;

 }

 

 static ssize_t

@@ -560,7 +561,8 @@

     void *v

 )

 {

-    return seq_puts(s, s->private);

+    seq_puts(s, s->private);

+    return 0;

 }

 

 NV_DEFINE_PROCFS_SINGLE_FILE(text_file);

```

save to /etc/portage/patches/x11-drivers/nvidia-drivers-355.11-r2/procfs-linux-4.3.patch

----------

## nobody13

 *saellaven wrote:*   

> patch for the original problem in the thread:

 

Thanks, that was easier than i thought it was going to be.

----------

