[SOLVED] Nvidia driver not working until x restart on LM 20.0 cinnamon

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Post Reply
mintlol
Level 1
Level 1
Posts: 5
Joined: Wed Aug 05, 2020 12:16 pm

[SOLVED] Nvidia driver not working until x restart on LM 20.0 cinnamon

Post by mintlol »

Hay, first post on here after about 4 years of using linux mint. If this is a wrong section sorry just tell me where to post and i will. So the problem is that when i boot most of the time i am stuck in 640x480 res and i have a driver error from driver manager. Then when i restart x server with sudo service lightdm restart or just by loging out, everything works perfectly fine until next reboot. Also sometimes pc boots perfectly fine (like 1 out of 10 times). I already tried to blacklist nouveau and purge and reinstall nvidia drivers with no positive results, so any idea whats going on?
Last edited by mintlol on Tue Aug 11, 2020 4:08 pm, edited 1 time in total.
Rehdon
Level 3
Level 3
Posts: 172
Joined: Tue Nov 29, 2011 9:18 am

Re: Nvidia driver not working until x restart on LM 20.0 cinnamon

Post by Rehdon »

Hi there,
I had a similar problem in Linux Mint Cinnamon 19.3: booting up in a 1024x768 screen with no graphics drivers (apparently) active and the suggestion to install them. I found out that the problem was Secure Boot, activated after installing LM 20, and that I had to create a key and sign the nVidia module for it to work. Maybe your problem is different, but this forum thread has a wealth of information about installing nVidia drivers, look for the (lengthy) post by user roblm » Sun Apr 13, 2014 11:02 pm:

viewtopic.php?f=59&t=154932&start=20

Hope it helps!

R
User avatar
SMG
Level 7
Level 7
Posts: 1833
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Nvidia driver not working until x restart on LM 20.0 cinnamon

Post by SMG »

That does sound like a driver issue. If Rehdon's suggestion doesn't help, then we would need more info about your computer setup to be able to help.

In a terminal, enter this command:

Code: Select all

inxi -Fxxxrz
Enclose the results between [ⅽode] and [/ⅽode] code markers by selecting </> from the mini toolbar above the textbox where you type your reply.

You could also check the release notes for mention of NVIDIA drivers to see if that helps.
LM20.0 Cinnamon
mintlol
Level 1
Level 1
Posts: 5
Joined: Wed Aug 05, 2020 12:16 pm

Re: Nvidia driver not working until x restart on LM 20.0 cinnamon

Post by mintlol »

Sorry for not replaying quicker but i wanted to try Rehdon's fix first, i noticed that in my UEFI secure boot is on and cant be disabled but its set to "other os" option. I tried to sign nvidia driver but when i got to "sudo mokutil --import MOK.der" command i got "EFI variables are not supported on this system". I think that may be because my boot drive is MBR so i use UEFI legacy mode, i am not sure if secure boot even works in this mode. So right now i am right back at the start. Also i use nvidia ppa and i had same problem on drivers 435, 440 and 450. And again the really weird thing is that after x restart it works perfectly i even game on wine. SMG my inxi -Fxxxrz output is:

Code: Select all

System:
  Kernel: 5.4.0-42-generic x86_64 bits: 64 compiler: gcc v: 9.3.0
  Desktop: Cinnamon 4.6.6 wm: muffin dm: LightDM 1.30.0
  Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal
Machine:
  Type: Desktop System: ASUS product: All Series v: N/A serial: <filter>
  Mobo: ASUSTeK model: X99-A/USB 3.1 v: Rev 1.xx serial: <filter>
  UEFI [Legacy]: American Megatrends v: 1801 date: 05/15/2015
Battery:
  Device-1: hidpp_battery_0 model: Logitech Performance MX serial: <filter>
  charge: 5% (should be ignored) rechargeable: yes status: Discharging
CPU:
  Topology: 6-Core model: Intel Core i7-5820K bits: 64 type: MT MCP
  arch: Haswell rev: 2 L2 cache: 15.0 MiB
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  bogomips: 79342
  Speed: 1850 MHz min/max: 1200/3600 MHz Core speeds (MHz): 1: 1202 2: 1202
  3: 1202 4: 1203 5: 1202 6: 1202 7: 1202 8: 1202 9: 1202 10: 1203 11: 1203
  12: 1202
Graphics:
  Device-1: NVIDIA GM204 [GeForce GTX 970] vendor: Gigabyte driver: nvidia
  v: 450.57 bus ID: 01:00.0 chip ID: 10de:13c2
  Display: x11 server: X.Org 1.20.8 driver: nvidia
  resolution: 1920x1080~60Hz
  OpenGL: renderer: GeForce GTX 970/PCIe/SSE2 v: 4.6.0 NVIDIA 450.57
  direct render: Yes
Audio:
  Device-1: Intel C610/X99 series HD Audio vendor: ASUSTeK
  driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:8d20
  Device-2: NVIDIA GM204 High Definition Audio vendor: Gigabyte
  driver: snd_hda_intel v: kernel bus ID: 01:00.1 chip ID: 10de:0fbb
  Sound Server: ALSA v: k5.4.0-42-generic
Network:
  Device-1: Intel Ethernet I218-V vendor: ASUSTeK driver: e1000e v: 3.2.6-k
  port: f020 bus ID: 00:19.0 chip ID: 8086:15a1
  IF: eno1 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 3.87 TiB used: 1.81 TiB (46.9%)
  ID-1: /dev/sda vendor: Samsung model: SSD 850 EVO 250GB size: 232.89 GiB
  speed: 6.0 Gb/s serial: <filter> rev: 1B6Q scheme: MBR
  ID-2: /dev/sdb vendor: Western Digital model: WD30EZRZ-00Z5HB0
  size: 2.73 TiB speed: 6.0 Gb/s rotation: 5400 rpm serial: <filter>
  rev: 0A80 temp: 33 C scheme: GPT
  ID-3: /dev/sdc vendor: Western Digital model: WD10EARS-00Y5B1
  size: 931.51 GiB speed: 3.0 Gb/s serial: <filter> rev: 0A80 temp: 33 C
  scheme: MBR
Partition:
  ID-1: / size: 18.33 GiB used: 9.14 GiB (49.9%) fs: ext4 dev: /dev/sda2
Sensors:
  System Temperatures: cpu: 36.5 C mobo: 32.0 C gpu: nvidia temp: 35 C
  Fan Speeds (RPM): fan-1: 536 fan-2: 554 fan-3: 529 fan-4: 582 fan-5: 609
  fan-6: 0 gpu: nvidia fan: 50%
  Voltages: 12v: N/A 5v: N/A 3.3v: 3.36 vbat: 3.30
Repos:
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/additional-repositories.list
  1: deb https://dl.winehq.org/wine-builds/ubuntu/ focal main
  2: deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian focal contrib
  Active apt repos in: /etc/apt/sources.list.d/fish-shell-release-3-focal.list
  1: deb http://ppa.launchpad.net/fish-shell/release-3/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/graphics-drivers-ppa-focal.list
  1: deb http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/libreoffice-ppa-focal.list
  1: deb http://ppa.launchpad.net/libreoffice/ppa/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
  1: deb http://packages.linuxmint.com ulyana main upstream import backport #id:linuxmint_main
  2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
  3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
  4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
  5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6: deb http://archive.canonical.com/ubuntu/ focal partner
  Active apt repos in: /etc/apt/sources.list.d/otto-kesselgulasch-gimp-focal.list
  1: deb http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/stebbins-handbrake-releases-focal.list
  1: deb http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu focal main
Info:
  Processes: 302 Uptime: 4h 09m Memory: 15.54 GiB used: 2.69 GiB (17.3%)
  Init: systemd v: 245 runlevel: 5 default: 2 Compilers: gcc: 9.3.0 alt: 7/9
  Shell: fish v: 3.1.2 running in: tilix inxi: 3.0.38
i also put next directories in tmpfs to lessen ssd writes and speed up my system using fstab. Not sure if that can be a problem, it wasn't seance mint 18.1
dirs:

Code: Select all

/tmp	
/var/tmp	
/var/spool	
/var/log	
/dev/shm	
/home/lindmin/.cache	
/var/cache/apt/archives	
And thanks for all the help :)
User avatar
SMG
Level 7
Level 7
Posts: 1833
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Nvidia driver not working until x restart on LM 20.0 cinnamon

Post by SMG »

You are using the driver (450) that NVIDIA recommends using for the GeForce GTX 970 and the nvidia driver is showing as being loaded. Is the 450 driver the one that is showing in X Server?

I don't have NVIDIA on my LM20 laptop, but someone I was helping in a different thread was also having issues with X server after having driver installation issues. In his case the 440 driver was showing in X Server even though the 450 driver was loaded. (His problems with X Server are slightly different than what you are having.)

Maybe someone else can help as I don't yet have the skills to troubleshoot X Server issues.
LM20.0 Cinnamon
mintlol
Level 1
Level 1
Posts: 5
Joined: Wed Aug 05, 2020 12:16 pm

Re: Nvidia driver not working until x restart on LM 20.0 cinnamon

Post by mintlol »

I was pocking around and i think this is some weird timing or order of loading issue. Because when put nosplash and noquiet in my grub to see errors if any, it slowed down my boot by about 10 seconds and issue was gone. I think that that additional 10 second gave time for everything to load before x started. It makes sense to me because that would explain why restarting x works (everything is loaded). What do you think, is something like that possible? How would i fix it if it is? Also SMG how do i check my driver version in X server?
Thanks for your help :)
User avatar
SMG
Level 7
Level 7
Posts: 1833
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Nvidia driver not working until x restart on LM 20.0 cinnamon

Post by SMG »

The "slowdown" working makes me think there is some kind of interference happening. Maybe there's one driver loaded and it's working to load a different one? I honestly don't have enough knowledge at the present time to help troubleshoot that.

My LM20 laptop does not have an NVIDIA card, so perhaps this link would help you get the driver information from the X server. You might need to check it twice for us to determine if there's some type of loading interference happening. By twice I mean the two examples you mentioned in your first post:
1) when i am stuck in 640x480 res and i have a driver error from driver manager.
2) when i restart x server with sudo service lightdm restart or just by loging out, everything works perfectly fine until next reboot.
LM20.0 Cinnamon
mintlol
Level 1
Level 1
Posts: 5
Joined: Wed Aug 05, 2020 12:16 pm

Re: Nvidia driver not working until x restart on LM 20.0 cinnamon

Post by mintlol »

I finally managed to fix this with help form the link SMG provided. There i found about /var/log/Xorg.0.log which i did not know exists. There i found that my nvidia driver module does not exists on first boot. After some searching i found about this error where linux looks at the wrong place for nvidia driver and thus cant load it. I found some good info on this link.
And then i modified the solution there for my version of Mint. Finlay i fixed the problem by adding following code to my /etc/X11/xorg.conf file.

Code: Select all

Section "Files"
    ModulePath      "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
    ModulePath      "/usr/lib/xorg/modules"
EndSection
Btw, there is already nvidia.conf file in /usr/share/X11/xorg.conf.d with a path to the driver but for some reason it did not work for me, but adding this line to xorg.conf fixes everything.
Thanks for all the help and how do i mark this post as solved :D
User avatar
SMG
Level 7
Level 7
Posts: 1833
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Nvidia driver not working until x restart on LM 20.0 cinnamon

Post by SMG »

Glad it is working and thanks for posting the links so I can learn more.
mintlol wrote:
Tue Aug 11, 2020 4:27 am
Thanks for all the help and how do i mark this post as solved :D
Go to the first post in the thread and click the edit button and add [SOLVED] to the beginning of the subject/title and then submit the post.
LM20.0 Cinnamon
User avatar
Tater
Level 2
Level 2
Posts: 84
Joined: Sun Sep 16, 2018 9:28 am
Location: PEBCAK

Re: [SOLVED] Nvidia driver not working until x restart on LM 20.0 cinnamon

Post by Tater »

mintlol, I apparently have the same issue going on. Logging out and in again fixed the display which I consider verification enough.

I'm trying to apply your solution but I don't have an "/etc/X11/xorg.conf" file. Did you create that file? I get the impression from your post that it was preexisting and that you amended it.

Thank you for helping me figure out the problem.

Edit:

After I posted this I went poking around and searching about some more. I was looking at ancient documents from nVidia when it occurred to me to look at the nVidia X Server Settings and see what it could tell me about “the X config file” as referenced in the linked document.

There I found under "X Server Display Configuration" an option to "Save to X Configuration File". That creates the "/etc/X11/xorg.conf" file that mintlol edited by adding

Code: Select all

ModulePath      "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
ModulePath      "/usr/lib/xorg/modules"
to the file in the Section "Files" that is there (but has no information in it) as created by the nVidia X Server Settings app.

I saved the X Configuration File and then rebooted. The display issue persisted. I logged out and in again to get a usable interface, added the module path to the file and rebooted. Normal display has been restored.

I am now experiencing delayed mounting of some disks, though. Is it possible that LM20 has been tweaked to speed up boot and that these are the side effects?

Thank you very much for finding and publishing the solution to this issue. I hope my added information will be of help to someone..
Current victims:
Mint 20 Cinnamon on an HP 505B AMD Athlon II x4 645 / 3.1 Ghz w/ 8 GB Ram

Mint 19 Mate on a Dell Latitude D830 Intel Core 2 Duo T7250 / 2 GHz w/ 4 GB Ram

OS Reinstall Counter is set at 6
Post Reply

Return to “Cinnamon”