Xubuntu nvidia: 800x600px after package update

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....

Xubuntu nvidia: 800x600px after package update

Postby peter_b » Mon Mar 18, 2019 5:10 pm

After amost recent update of X11 and kernel packages on a Xubuntu 16.04.6 system, the graphics card setup regressed:
From proper working Dualscreen (FullHD + 1280x1024 resolution) to single monitor at 800x600 pixels :shock: :?

I know that a proprietary Nvidia driver was used before, but I haven't written down which one - in which exact version...
The graphics card is:
01:00.0 VGA compatible controller: NVIDIA Corporation GF119 [GeForce GT 520] (rev a1)

When checking Ubuntu's GUI for handling proprietary drivers, it said that the currently active one is:
NVIDIA legacy binary driver - version 304.135

Checking the package management, it seems that before the regression, version "304.131" was in use (since still existing in package cache):

Seems that nvidia-304 doesn't compile with kernel 4.15.0-46 anymore :(

After removing and re-installing "nvidia-304" package, I get this message in "/var/lib/dkms/nvidia-304/304.135/build/make.log"
DKMS make.log for nvidia-304-304.135 for kernel 4.15.0-46-generic (x86_64)
Mon 18 Mar 13:01:47 CET 2019
NVIDIA: calling KBUILD...
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (^I^I\
echo >&2;^I^I^I^I^I^I^I\
echo >&2 " ERROR: Kernel configuration is invalid.";^I^I\
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it.";^I\
echo >&2 ;^I^I^I^I^I^I^I\
mkdir -p /var/lib/dkms/nvidia-304/304.135/build/.tmp_versions ; rm -f /var/lib/dkms/nvidia-304/304.135/build/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/var/lib/dkms/nvidia-304/304.135/build

I've configured and compiled many kernels in my life, but right now I'm not going down that road.

Luckily. the GeForce GT520 chipset is also supported by the nvidia-340 driver.

And that one installs and builds fine:
Code: Select all
$ apt install nvidia-340

304.135 driver fails to insert on Fedora 26 (4.12.5 kernel)
  • 0

User avatar
Posts: 302
Joined: Tue Nov 12, 2013 2:05 am
Reputation: 3

Additional error messages

Postby peter_b » Mon Mar 18, 2019 6:37 pm

Everything here is optional!
In this posting, I'm just collecting issues I encountered during trying to fix this.
I hope it helps others to find this thread and hopefully the above mentioned solution works for them too :D

# Trying to load the module manually, after install with ubuntu's proprietary-driver-handling GUI (which didn't show me errors):
Code: Select all
$ sudo modprobe nvidia

modprobe: ERROR: ../libkmod/libkmod-module.c:832 kmod_module_insert_module() could not find module by name='nvidia_304'
modprobe: ERROR: could not insert 'nvidia_304': Unknown symbol in module, or unknown parameter (see dmesg)

That was confusing for me, since I knew I just installed nvidia-304. That's why I checked for messages during commandline install.
btw: There was no mention in dmesg.
It's plain and simple: The nvidia-304 module couldn't be built and therefore didn't exist (even though apt thinks it's installed).

# Didn't have the kernel headers installed:
That one's a bit embarrassing, but I didn't have the kernel headers for the new kernel installed.
Error message was:
Module build for the currently running kernel was skipped since the kernel source for this kernel does not seem to be installed.

So I installed them for that kernel version:
Code: Select all
$ sudo apt install linux-headers-4.15.0-46-generic

(Use "$ uname -a" to find out which kernel you're currently running)

# libelf-dev missing
After having installed the missing kernel headers, I got another error when trying to build the driver module:
...please install libelf-dev, libelf-devel or elfutils-libelf-devel

For Debian/Ubuntu the package name is "libelf-dev". So:
Code: Select all
$ apt install libelf-dev

# Error message during driver package install:
Removing and re-installing the 304 driver package to trigger recompilation of the kernel module:
Code: Select all
$ apt remove nvidia-304
$ apt install nvidia-304

Gives this:
Loading new nvidia-304-304.135 DKMS files...
Building only for 4.15.0-46-generic
Building for architecture x86_64
Building initial module for 4.15.0-46-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-304.0.crash'
Error! Bad return status for module build on kernel: 4.15.0-46-generic (x86_64)
Consult /var/lib/dkms/nvidia-304/304.135/build/make.log for more information.
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Processing triggers for initramfs-tools (0.122ubuntu8.14) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-46-generic
  • 0

User avatar
Posts: 302
Joined: Tue Nov 12, 2013 2:05 am
Reputation: 3

Return to Knowledge Base

Who is online

Users browsing this forum: No registered users and 5 guests

Who is online over last 24 hours

Users browsed this forum in the last 24 hours: No registered users and 9 guests

Reputation System ©'