Problems with OpenSUSE Leap 15.4 Beta and KDE on Lock Screen/Blank/Sleep on Older Nvidia Card

**Problems with OpenSUSE Leap 15.4 Beta and KDE on Lock Screen/Blank/Sleep on Older Nvidia Card – Driver Issue?

** 20th of March 2020

A friend recently gave me an old laptop. The first thing I did was to install OpenSUSE Leap 15.3 on it. That installed the Nouveau driver by default, and I wasn’t having any problems at all.

Then, because of certain software requirements I had, I decided to upgrade to Leap 15.4 Beta. I also installed the manufacturer’s driver from the Nvidia repo; x11-video-nvidiaG05 was the one I tried first, because I was investigating the possibility of adding CUDA support.

That was when the problems started.

The laptop is an Acer Aspire 5705G model, and it came with an Nvidia GeForce GT520M graphics card; CUDA-capable, and the BIOS is reporting 128Mb of RAM onboard.

Symptoms are, sometimes, but not always, after a lock screen, or a screen blank, or a sleep, KDE locks up/freezes. Input still seems to be working, because the mouse works, and if I type my password and press enter, switch to a TTY terminal, and then switch back, it logs in, but the screen is still frozen. If I am running something in the Konsole, switching between the TTY terminal and KDE, it refreshes the KDE screen. But, it freezes again immediately afterwards. The only solution is to reboot. Both the x11-video-nvidiaG05, and the x11-video-nvidiaG06 drivers both cause this behaviour.

Then, I installed the x11-video-nvidiaG04 driver, and got different behaviour. After a reboot, all I was getting was a blank screen, no mouse cursor, nothing. I could still get a TTY terminal, and if this happens to you, I suggest you follow the Zypper (command-line) uninstallation instructions here, very carefully:

https://en.opensuse.org/SDB:NVIDIA_drivers

I used the above instructions to revert back to the default Nouveau driver. I have also installed the Nouveau experimental 3D driver.

Now I am having a different problem. Sometimes, but not always, when I get a lock screen, I can get back from a sleep to the lock screen, but I can’t get the lock screen to show my profile or the password entry field. Again, the only solution is to reboot. In mitigation, what I have done is turn off the screen locking. Then I have no problems at all. But, I will want to lock this laptop’s security down a bit more tightly before I use it for anything important.

I am running Leap 15.4, with KDE Plasma Version 5.90.0.

I am not sure if this is a Leap bug, a KDE bug, or a driver bug. But I suspect it’s the latter. And so, I am going to be cross-posting this report to all three websites.

In my research trying to troubleshoot this problem, I have seen numerous reports online of people having similar problems with Nvidia cards, and not just with OpenSUSE.

Can anyone give me any advice? Is this something I could fix by myself?

Can anyone give me any advice? Is this something I could fix by myself?

Please open an bugreport, Leap 15.4 is beta.

Thank you, Sauerland!

Bug report here:

https://bugzilla.opensuse.org/show_bug.cgi?id=1197322

Also reported here:

https://forums.developer.nvidia.com/t/problems-with-opensuse-leap-15-4-beta-and-kde-on-lock-screen-blank-sleep-on-older-nvidia-card-driver-issue/208900

https://forum.kde.org/viewtopic.php?f=22&t=174446&sid=f0967bc073e34b08e395e6367e4b2cf1

Also reported here:

               https://www.nvidia.com/en-us/geforce/forums/legacy-products/12/488668/problems-with-opensuse-leap-154-beta-and-kde-on-lo/

Reply from SUSE on bug report:

Stefan Dirsch

GeForce GT520 is only supported in legacy G04 driver. Not sure what you’ve tested when installing G05/G06 drivers with nouveau drivers disabled. Probably unaccelerated fbdev driver. GeForce GT520 has been released in 2011.

Please make sure that all G04 driver packages of the nVidia repository are installed, not only x11-video-nvidiaG04 package. Please provide the output of ‘inxi -aG’ command and attach your /var/log/Xorg.0.log when having this driver installed.

Then possibly I can see something obvious, which could be addressed.

Unfortunately neither nVidia themselves nor the driver community around nouveau are still looking into issues with such old graphics cards, so chances are low, that this issue can still be fixed.

It was a big help knowing which was the correct driver to use! I followed Stefan’s advice and installed the G04 driver. It installed without any problems.

steven@localhost:~> zypper se -ir NVIDIA
Loading repository data...
Reading installed packages...
 
S  | Name                      | Summary                                                               | Type
---+---------------------------+-----------------------------------------------------------------------+--------
i  | nvidia-computeG04         | NVIDIA driver for computing with GPGPU                                | package
i  | nvidia-gfxG04-kmp-default | NVIDIA graphics driver kernel module for GeForce 400 series and newer | package
i  | nvidia-glG04              | NVIDIA OpenGL libraries for OpenGL acceleration                       | package
i+ | x11-video-nvidiaG04       | NVIDIA graphics driver for GeForce 400 series and newer               | package

Then, I rebooted. I expected the same problem that I had with the G04 driver when I first installed it, but this time, it booted right into KDE, no problem!

Regarding Stefan’s suggestion that I make sure all four drivers were installed, I am pretty sure that’s what I did the first time around, because I used the YaST Software Management tool, and that would have installed all of the dependencies. But, what I recall doing is selecting the G04 driver, which marked the G06 driver for uninstallation when I did that, in the same transaction. So, maybe, the package manager didn’t do a clean rollback of the G06 driver.

What I also recall doing when I was removing the G04 driver from the TTY session, was deleting the 50-nvidia-default.conf file from /etc/modprobe.d/, and reverting back by copying from the 50-nvidia-default.conf.rpmsave file, before I ran mkinitrd.

The nVidia G04 driver seems to be a lot faster than the Nouveau one, but, with this driver, I was still sometimes, but not always, getting the exactly the same problem that I had with the Nouveau driver, where after a sleep and screen lock, I can get back to the lock screen, but I can’t get the lock screen to show my profile or the password entry field!

So, I can only think that this is a new bug caused by the more recent version of KDE.

After the reboot I followed Stefan’s instructions, see below:

steven@localhost:~> inxi -aG
Graphics:  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics vendor: Acer Incorporated ALI
           driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:0116 class-ID: 0300
           Device-2: NVIDIA GF108M [GeForce GT 520M] vendor: Acer Incorporated ALI driver: nvidia v: 390.147
           alternate: nouveau,nvidia_drm bus-ID: 01:00.0 chip-ID: 10de:0df7 class-ID: 0300
           Device-3: Suyin 1.3M HD WebCam type: USB driver: uvcvideo bus-ID: 1-1.3:3 chip-ID: 064e:d250 class-ID: 0e02
           serial: HF1316-A821-HN01-VA-R01.00.02
           Display: x11 server: X.Org 1.20.3 compositor: kwin_x11 driver: loaded: modesetting unloaded: fbdev,vesa
           alternate: intel display-ID: :0 screens: 1
           Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.2x8.0") s-diag: 414mm (16.3")
           Monitor-1: LVDS-1 res: 1366x768 hz: 60 dpi: 101 size: 344x194mm (13.5x7.6") diag: 395mm (15.5")
           OpenGL: renderer: N/A v: N/A direct render: N/A

Another problem I was occasionally getting with this laptop was that I would, after a sleep or hibernate, get the following message:

Message !
from syslogd@localhost at Mar 18 03:45:51 ...
 kernel:  225.157158]    C1] Disabling IRQ #17

Then, my NetworkManager applet would get disabled, and my Wi-Fi connection would be deactivated!

From the Info Centre application, PCI devices section, the following devices use IRQ 17 on this laptop:

00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4) (prog-if 00 [Normal decode])
       Flags: bus master, fast devsel, latency 0, IRQ 17
       Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
       I/O behind bridge: None
       Memory behind bridge: 9fb00000-9fbfffff [size=1]
       Prefetchable memory behind bridge: 00000000d1800000-00000000d18fffff [size=1]
       Capabilities: <access denied>
       Kernel driver in use: pcieport
 
02:00.1 SD Host controller: Broadcom Inc. and subsidiaries BCM57765/57785 SDXC/MMC Card Reader (rev 10) (prog-if 01)
       Subsystem: Acer Incorporated [ALI] Device 0504
       Flags: bus master, fast devsel, latency 0, IRQ 17
       Memory at d1800000 (64-bit, prefetchable) [size=64]
       Capabilities: <access denied>
       Kernel driver in use: sdhci-pci
       Kernel modules: sdhci_pci
 
03:00.0 Network controller: Qualcomm Atheros AR9287 Wireless Network Adapter (PCI-Express) (rev 01)
       Subsystem: Foxconn International, Inc. T77H167.00
       Flags: bus master, fast devsel, latency 0, IRQ 17
       Memory at d1900000 (64-bit, non-prefetchable) [size=64]
       Capabilities: <access denied>
       Kernel driver in use: ath9k
       Kernel modules: ath9k, wl

From my research, it is not possible to change the interrupt settings from the operating system. My laptop’s BIOS also doesn’t have this capability. And, because this is a laptop with a lot of integrated circuits, it’s not a simple matter of changing the jumper on the network card either!

I am not sure if it’s the nVidia card causing this behaviour, but note from the above that the main PCI bridge also uses this IRQ, so the nVidia card might be causing this problem.

What I have done to mitigate these problems is to go into the System Settings app, and changed the following settings from the defaults:

  • In Workspace Behaviour - Screen Locking: turn off both lock settings.

[/size][/size][/size] - In Energy Saver – AC Power: turn off the suspend session setting.

Everything seems to be working fine now, and I can use the laptop with these new settings. My main concern now is that I won’t really be able to secure my laptop against local access.

I have done some brief testing of the G04 driver by using Kodi. I played some music with the ProjectM visualiser, and I also played a video with Kodi. No problems with either!

A friend of mine, who also as a laptop with an older nVidia card, gave me the following advice:

  • This is definitely nVidia-related.

  • It conflicts with sleep and hibernate.

  • The Nouveau driver causes screen flicker with certain graphical applications like visualisation and video playback. (I never got around to testing that, though.)

  • It is better to use the nVidia drivers.

  • Don’t use sleep/suspend or hibernate! Leave it on or shut it down.

  • My friend also asked me to test the driver with GNOME, that way I would know for certain if it is actually KDE causing these problems. But I still haven’t gotten around to doing that yet.

  • Also, something I noticed from the OpenSUSE documentation is that there is no more CUDA support for the G04 driver, as of 18 January 2022.

In short, this is probably the best I can do with this laptop, if I want to run Linux/ OpenSUSE on it, unless either nVidia or the Nouveau community decides to fix either the GO4 or the Nouveau driver, which seems unlikely, from what Stefan said.

I will be posting this as a comment everywhere I posted the original issue, for anyone else out there that is using the same or similar old hardware, and runs into the same problems.[/size]

Steven, from my reading here and in your postings elsewhere, I found no mention of the alternate FOSS display driver, modesetting DIX, until Stefan’s mention in the bug report around 16+ hours ago. There are two very different nouveau “drivers”. For more info about what modesetting and nouveau are and mean, please read this primer.

I’ve been hoping to possibly provide some help here from use of my GT 630 since the thread was first started, but Plasma won’t start, segfaulting in klauncher and ksplashqml before a session completes startup. IceWM starts OK, but then messages about Plasma crashes keep popping up. Why Plasma thinks it should be doing anything from an IceWM session I have no idea.

System:
  Kernel: 5.14.21-150400.11-default arch: x86_64 bits: 64 compiler: gcc
    v: 7.5.0 parameters: root=LABEL=39s154 ipv6.disable=1 net.ifnames=0 noresume
    mitigations=auto consoleblank=0 5
  Desktop: IceWM v: 1.4.2 info: icewmtray wm: kwin_x11 vt: 7 dm: TDM
    Distro: openSUSE Leap 15.4 Beta
Graphics:
  **Device**-1: NVIDIA GF108 [GeForce GT 630] vendor: Gigabyte **driver: nouveau**
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 16 ports:
    active: DVI-I-1,HDMI-A-1 empty: VGA-1 bus-ID: 01:00.0 chip-ID: 10de:0f00
    class-ID: 0300
  **Display**: x11 server: X.Org v: 1.20.3 compositor: kwin_x11 **driver: X:
    loaded: modesetting** unloaded: fbdev,vesa **alternate: nouveau**,nv,nvidia
    **gpu: nouveau** display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x1200 s-dpi: 120 s-size: 812x254mm (31.97x10.00")
    s-diag: 851mm (33.5")
  Monitor-1: DVI-I-1 pos: primary,left model: NEC EA243WM serial: <filter>
    built: 2011 res: 1920x1200 hz: 60 dpi: 94 gamma: 1.2
    size: 519x324mm (20.43x12.76") diag: 612mm (24.1") ratio: 16:10 modes:
    max: 1920x1200 min: 640x480
  Monitor-2: HDMI-A-1 mapped: HDMI-1 pos: right model: Samsung built: 2009
    res: 1920x1080 hz: 60 dpi: 305 gamma: 1.2 size: 160x90mm (6.3x3.54")
    diag: 184mm (7.2") ratio: 16:9 modes: max: 1920x1080 min: 720x400
  OpenGL: renderer: NVC1 v: 4.3 Mesa 21.2.4 direct render: Yes
# cat .xsession-errors
Environment variable $XAUTHORITY not set, ignoring.
/etc/X11/xim: Checking whether an input method should be started.
sourcing /etc/sysconfig/language to get the value of INPUT_METHOD
INPUT_METHOD is not set or empty (no user selected input method).
Trying to start a default input method for the locale en_US.UTF-8 ...
There is no default input method for the current locale.
Dummy input method "none" (do not use any fancy input method by default)
gpg-connect-agent: no gpg-agent running in this session
gpg-connect-agent: no gpg-agent running in this session
KCrash: Application 'ksplashqml' crashing...
KCrash: Attempting to start /usr/lib64/libexec/drkonqi
KCrash: Application 'klauncher' crashing...
kdeinit5: Communication error with launcher. Exiting!
KCrash: Attempting to start /usr/lib64/libexec/drkonqi
KCrash: Application 'org_kde_powerdevil' crashing...
KCrash: Attempting to start /usr/lib64/libexec/drkonqi
Unable to start Dr. Konqi
Re-raising signal for core dump handling.
Unable to start Dr. Konqi
Re-raising signal for core dump handling.

@mrmazda, thank you for your interest and attempts to help, and also for your primer, that was interesting! Fortunately, I have found a a workaround. Please see below:

Stefan Dirsch:

Oh well. This is a system with an Intel Sandybridge GT2/nVidia GeForce GT 520 combo. This looks like an early Optimus system, where you might use the nVidia card as a rendering device for hardware acceleration. For this, you would need to install suse-prime package and run ‘prime-select nvidia’.

But, I would try first if you could disable one of the GPUs in your BIOS/firmware. And then just use ‘modesetting’ X driver for Intel GPU with nvidia driver packages uninstalled (x)or nvidia X driver for nVidia GPU keeping the G04 driver packages.

Good day, Stefan!

Apologies for the delay in getting back to you, I have been busy, and haven’t had the chance to play with my laptop until now.

Thank you very much for your info and suggestions!

Firstly, I tried all of your suggestions.

Unfortunately, my BIOS seems to be quite minimal, in that there are not many options there that I can play with.

The only GPU setting I found was this one:

Graphic mode: [Switchable], [Integrated]

Switchable is the default, so I left it at that. I tried both, and neither one resolved my screen lockout/freeze issue. There also was nothing definitive I could find online, and conflicting opinions about which is the best to use. Maybe you could let me know what these options are for?

I was also reluctant to disable one of my graphics cards, even were it possible, because my laptop has two video ports, an HDMI one and a VGA one. I have a spare monitor and I tested it with that on the HDMI port. It works perfectly! I don’t have another monitor that I can use at the moment, but maybe one day I will get a second one. It looks like I should be able to connect this laptop up to two external monitors at the same time, which would be really great!

I didn’t try installing the modesetting X driver, partly because I have a working nVidia driver, and my friend said that was my best option, and partly because I found a workaround for the nVidia one that solved most of my problems; more about that later.

I also tried your suggestion about the suse-prime package. It was already installed:

steven@localhost:~> sudo zypper in suse-prime
[sudo] password for root: 
Loading repository data...
Reading installed packages...
'suse-prime' is already installed.
No update candidate for 'suse-prime-0.8.6-150400.1.1.noarch'. The highest available version is already installed.
Resolving package dependencies...
Nothing to do.

And then:

steven@localhost:~> sudo prime-select nvidia
nvidia catched
nvidia driver already in use!

I am not sure what these messages mean, perhaps that the nVidia driver has already been selected?

Secondly, after fiddling around with the KDE System Setting a bit more, I found some new things out.

In Energy Saving:

  1. With the Suspend session option with the Lock Screen, Automatically after 10 minutes option set, and the Screen Energy Saving (Switch off after) option off, the behaviour is that the screen locks but doesn’t freeze, but the lock screen is always on and displayed – this more secure, but it could cause screen burn-in if you leave it like that for a long time.

  2. With the Suspend session option off, and the Screen Energy Saving, switch off after 10 minutes option on, the screen switches off but doesn’t freeze, however, because there is no lock screen, anyone can access your computer while you are away – this is not ideal because it is insecure, someone who has local access to the laptop could get in.

But there seems to be no way to get both a KDE screen lock and have the screen shut off at the same time, without KDE freezing!

So, I decided to think laterally, and wondered if I could use a screensaver for this, which brings me to my third solution:

  • I set both lock screen options off in Workspace Behaviour / Screen Locking.
  • In both Energy Saving AC Power and Activity Power Settings - Use separate settings (advanced users only), I set Suspend session off, Screen Energy Saving off, and I also set the Dim screen option to on after 5 minutes in both. In Activity Power Settings – I set Wireless on, and I set Wi-Fi to Leave unchanged, and Mobile Broadband and Bluetooth - both set to Turn off. (My laptop doesn’t actually have either mobile broadband or Bluetooth.)
  • Then I used xscreensaver, which was already installed. Follow the setup guide below:

https://www.pclinuxos.com/forum/index.php?topic=138037.0

Then I ran:

xscreensaver-demo

The screensavers are really cool, but I left my laptop running overnight, and woke up to hear the CPU fan on, and when I felt the case, it was hot.

So I ran

xscreensaver-demo

again, and set the following settings:

  • Blank Screen Only,
  • Blank After 10 minutes
  • Lock Screen After 0 minutes

In Advanced, make sure Power Management Enabled is off – this is the default setting.

Now, the hotkey or inactivity then causes immediate screensaver screen lock. The display goes blank, but does not switch off, and the LED backlighting is still on. (If it did switch off, it might also cause a screen freeze.) This method uses the screensaver lock screen instead of the KDE one. It might still cause wear and tear on the screen, but this is the best compromise I could find for saving wear and tear on my hardware, (and for saving energy/power as well), while still having the ability to secure my laptop against local access.

I tend to leave my machines running all the time.

This mostly works the way I want it to, I can secure my laptop, it doesn’t knock out my network connection, and the only things I can’t do are sleep/suspend or hibernate.

Just a note, here in South Africa, we have long power outages, both planned and unexpected, and often. I tested my battery; it doesn’t last long. So, if I leave my laptop on AC power all the time, the battery should last long enough for me to save my work and do a clean shutdown in the case of an outage.

I still haven’t tested my laptop with GNOME, but I like KDE!

I had a useful reply from Stefan Dirsch on my ticket:

So you were already using your nVidia card for rendering purposes. :wink:

BIOS/Firmware:
Switchable: Intel + nVidia
Integrated: Only Intel

If you try “Integrated” also uninstall nvidia driver packages and better also suse-prime package.

It’s rather likely that you won’t have to enable nVidia GPU for having external outputs (VGA + HDMI). We can check this with
the command ‘xrandr’ when you’re running in “Integrated” (Intel only) mode.

Yeah, xscreensaver still exists and just works. So why not use it, if it fixes your issue. Well done.

If you want to save power I suggest to try with “Integrated” (Intel only) setting. Probably it’s just good enough for your needs.

I think with that you can make use of this machine. Can we close this ticket?

My response:

Hi Stefan!

Sure, close the ticket, and thank you for all your help and advice! :slight_smile:

Power conservation is not my primary concern. I would like to have my GPU running fast when I needed it. I think nVidia drivers would be best for that. I just don’t want to stress my laptop and hardware too much when I am not using it.

The solution I have right now works well enough for my purposes, and I am happy with the result!

Thanks again!

I am going to repost this everywhere, because I am sure that many people have similar problems, or will do when Leap 15.4 becomes stable.