About resetting graphics

I got a situation where it seemed black lines were painted over part of screen, eventually covering the whole screen when the other parts had to be repainted.

I did:

  • hit Ctrl+Alt+Backspace 2x: it took me to the login screen
  • login: it got stuck on a spinner
  • Ctrl+Alt+F1, then Ctrl+Alt+F7: nothing changed
  • Ctrl+Alt+F1: noticed kwin_x11 was using 200% CPU (how?!?), tried kill $pid, killall kwin_x11, it refused
  • systemctl reboot: ok

How could I have handled it in the first place? I got these black lines a couple times on Windows, to which a keyboard shortcut was able to reset graphics.

And how to effectively kill kwin if I get to that again?


$ inxi -GMS
System:    Kernel: 5.5.7-1-default x86_64 bits: 64 Desktop: KDE Plasma 5.18.2 
           Distro: openSUSE Tumbleweed 20200305 
Machine:   Type: Desktop System: Dell product: XPS 8920 v: 1.0.20 
           Mobo: Dell model: 0VHXCD v: A03 UEFI: Dell v: 1.0.20 date: 06/20/2019 
Graphics:  Device-1: Intel HD Graphics 630 driver: i915 v: kernel 
           Device-2: NVIDIA GP107 [GeForce GTX 1050 Ti] driver: nvidia v: 440.64 
           Display: x11 server: X.Org 1.20.7 driver: modesetting,nvidia unloaded: fbdev,nouveau,vesa 
           resolution: 2560x1440~60Hz, 2560x1440~60Hz 
           OpenGL: renderer: GeForce GTX 1050 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 440.64 

Thanks!

You can use CTRL-ALT-F1 to get to a virtual console. Login there as root.

Then use:

telinit 3

to revert to init level 3 (i.e. to disable the graphic interface)

Next, use

telinit 5

to restart the graphic interface.

Note, however, that sometimes this does not work and I have to reboot anyway.

You can try a second instance of kwin, it might work.

kwin_x11 --replace

You need running using Alt-F2
not in the terminal so it won’t stop if you leave the terminal.

Thanks, I’ll take note.

I did the --replace command as well, it didn’t work, but what you said makes sense. I’ll try that too next time.

Most forum visitors using an NVidia GPU as new as yours seem to be using NVidia’s driver, but I see not you from your inxi output. Those with dual graphics are usually using suse-prime or bumblebee. Are you? Either could be the cause because of some bug not observed by others because not using the default modesetting DDX instead of NVidia. Gxx instead of just G inxi switch will add the PCI IDs that otherwise are omitted. I have two desktop PCs with the same Intel HD Graphics 630 as yours playing just fine with current TW and one 2560x1440, plus a 1920x1200, plus a 1680x1050. OTOH, I just reported yesterday upstream black lines video corruption for old Radeons, so I had to double check for possible relationship, which I do not see evident.

Hum, I thought inxi was reporting that I am indeed using nvidia’s driver v440.64. Before I installed the driver it was showing nouveau as the driver.

$ zypper search suse-prime bumblebee
Loading repository data...
Reading installed packages...

S | Name                             | Summary                                                                       | Type   
--+----------------------------------+-------------------------------------------------------------------------------+--------
  | bumblebee                        | NVidia Optimus support for GNU/Linux aimed at stability                       | package
  | bumblebee-status                 | Modular, theme-able status line generator for the i3 window manager           | package
  | bumblebee-status-module-cmus     | Widget to show information about the current song in cmus                     | package
  | bumblebee-status-module-dnf      | Widget to display DNF package update information                              | package
  | bumblebee-status-module-mocp     | Widget to display information about the current song in moc                   | package
  | bumblebee-status-module-mpd      | Widget to display information about the current song in mpd                   | package
  | bumblebee-status-module-redshift | Widget to display the current color temperature of redshift                   | package
i | plasma5-applet-suse-prime        | Plasma 5 applet for controlling SUSE Prime                                    | package
i | suse-prime                       | GPU (nvidia/intel) selection for NVIDIA optimus laptops                       | package
  | suse-prime-bbswitch              | GPU (nvidia/intel) selection for NVIDIA optimus laptops with bbswitch support | package

This is a PC not a laptop. I looked for the the applet and placed on the desktop. It says I’m currently using Intel. Which is unexpected given the installation of nvidia driver fixed previous issues I was having with the nouveau driver.

I’ll take the opportunity to ask, when should I use each one? With the current setting there’s just one issue left: scrolling a page on the browser sometimes it looks like lines being painted on different frames. Which is no big deal. I just switched OpenGL from 3.1 to 2.0 to see if it makes a difference. Tearing prevention is set to automatic.

Here we go:

$ inxi -Gxx
Graphics:  Device-1: Intel HD Graphics 630 vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:5912 
           Device-2: NVIDIA GP107 [GeForce GTX 1050 Ti] vendor: Dell driver: nvidia v: 440.64 bus ID: 01:00.0 
           chip ID: 10de:1c82 
           Display: x11 server: X.Org 1.20.7 driver: modesetting,nvidia unloaded: fbdev,nouveau,vesa alternate: intel,nv 
           compositor: kwin_x11 resolution: 2560x1440~60Hz, 2560x1440~60Hz 
           OpenGL: renderer: GeForce GTX 1050 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 440.64 direct render: Yes 

Above is a big mistake I made from misreading this string in the OP:

X.Org 1.20.7 driver: modesetting,nvidia
I apologize for it and my statements based upon it. I would want to rewrite my reply if permitted.

Hi
@awerlang, is the intel GPU disabled in the system BIOS and/or set to use the PCIe card first?

There’s no option for that in the BIOS. I recall reading about this machine design (Dell XPS 8920) that Intel Graphics is disabled once you have a discrete GPU installed. I don’t know if it makes a difference, but I’m using ports from the NVIDIA card.

I’ve found a post supporting this:

Or will it always be that the PCIe 16x takes priority?

And another quite confusing:

You can’t disable intel Graphics because its INSIDE the CPU not external to the CPU.

So you can’t disable it, but it doesn’t matter because you can’t really use it?!

In the first above the OP mention a usecase for that (which I too was wondering in a previous post):

I understand why you might think that but the issue is when using the machine as a virtual host, i.e. say ESXI or QEMU. You want the host to use the Intel HD graphics so that you can pass through the PCI-E Nvidia card to a virtual machine.

Otherwise the host holds onto the NVidia card and you cannot pass it through.

Hi
I use the Intel card here, 3 Nvidia GPU’s for cuda and one swaps out for gpu passthrough. So as indicated you could allocate the intel gpu ‘out’ of the system if you want?


pinxi -Gxxz
Graphics:  Device-1: Intel Xeon E3-1200 v2/3rd Gen Core processor Graphics driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:016a 
           Device-2: NVIDIA GK208B [GeForce GT 710] vendor: ZOTAC driver: nvidia v: 440.64 bus ID: 02:00.0 chip ID: 10de:128b 
           Device-3: NVIDIA GK208B [GeForce GT 710] vendor: ZOTAC driver: nvidia v: 440.64 bus ID: 05:00.0 chip ID: 10de:128b 
           Device-4: NVIDIA GK208B [GeForce GT 710] vendor: ZOTAC driver: nvidia v: 440.64 bus ID: 06:00.0 chip ID: 10de:128b 
           Display: x11 server: X.Org 1.20.7 driver: modesetting,nouveau unloaded: fbdev,vesa alternate: intel,nv,nvidia 
           compositor: gnome-shell resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics P4000 (IVB GT2) v: 4.2 Mesa 20.0.2 compat-v: 3.0 direct render: Yes 

There are a few options and configuration to be done if you want to go that route?

I’ll probably stick with the nvidia atm, but I can see reasons to switch to Intel:

  • VMs: pass-through nvidia, otoh this machine is powerful enough to not need it
  • Wayland/Sway: I’d like to explore the idea of tiling wm’s, otoh there’s wm’s that should run on nvidia

Depending on the complexity I’d like to at least know how to do it, yes.

Hi
Have a read here: Running Windows 10 on Linux using KVM with VGA Passthrough - Heiko's Blog

I actually have a secondary SATA controller (in the mini PCIe slot) which I use as well so my virtual machines are on there own disks, no images :wink:

Hey thanks @malcolmlewis! I’ll take a look at the article and see if I want/need that.

Hi
It’s what I used here, just tweaked for my hardware, but once sorted works a treat…