Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
X server hangs when switching TTYs or shutdown
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Pyro MX
n00b
n00b


Joined: 19 Oct 2007
Posts: 27
Location: Canada

PostPosted: Sat Feb 20, 2016 4:32 pm    Post subject: X server hangs when switching TTYs or shutdown Reply with quote

Hello all,

I have a bit of a special problem that appeared recently, maybe after an update. The system was running smoothly for a while.

So here's the thing: X runs on VT7. If I switch to a different VT (ex VT1) and try to come back to VT7, the system freezes.

Now, I tried some combinations and here's what I found out so far: unless I shutdown from a logged in KDE session, X will never stop. If I shutdown from VT{1-6}, X hangs. If I shutdown from the LightDM greeter, X hangs. I tried Alt+Sysrq+O - the signals gets registered, nothing happens. I was running KDM, I switched to LightDM, didn't change anything. The XDM service doesn't get stopped, init reports the service not stopping and it just waits there forever.

Where it gets more interesting: if I run htop as root inside VT{1-6} and try to kill (with SIGKILL) the X server, I will be able to interact with the terminal for about a couple seconds. After that, X will take 100% of the CPU (although it seems to be 100% of one of the 6 cores) and all input will freeze. Htop still runs and gets updated on screen. Keys seem to register, but with a very very very long delay. The keyboard is plugged on the PS/2 port.

Does that ring a bell to anybody?

Machine information:

* Arch is amd64
* GPU is Nvidia, running with the latest stable proprieraty driver
* Kernel 4.1.15-gentoo-r1, initramfs generated with genkernel stable
* KDE 4 desktop environment (stable)

Thanks! :D
_________________
Pyro MX
Back to top
View user's profile Send private message
C5ace
Guru
Guru


Joined: 23 Dec 2013
Posts: 472
Location: Brisbane, Australia

PostPosted: Sun Feb 21, 2016 8:59 am    Post subject: Reply with quote

I updated from kernel 4.1.12 to 4.1.15-gentoo-r1, Genkerne, Nvidia, Xfce, Slim. grub-static. Result was no video on Vt1 ~ Vt12. Same thing on a Toshiba laptop with Intel video. Both have no EFI or UEFI hardware

Reverted back kernel 4.1.12.

Kernel 4.1.15-gentoo-r1 works on a new HP latop with EFI and UEFI hardware, both disbled, Radeon viedeo. otherwise the same as above.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sun Feb 21, 2016 3:17 pm    Post subject: Re: X server hangs when switching TTYs or shutdown Reply with quote

Pyro MX wrote:
Does that ring a bell to anybody?

It's a problem inherent to having two different drivers fighting over one piece of hardware - and also the reason why, years and years ago, everything else switched to KMS.

Nvidia has had this bug since long before then. The solution is: don't do that.
Back to top
View user's profile Send private message
Pyro MX
n00b
n00b


Joined: 19 Oct 2007
Posts: 27
Location: Canada

PostPosted: Sun Feb 21, 2016 3:43 pm    Post subject: Reply with quote

I double-checked my kernel configuration. DRM is activated, but there are no compiled-in drivers in the kernel itself. The proprietary NVidia driver is the only one I have. Maybe it's something with the framebuffer...
_________________
Pyro MX
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sun Feb 21, 2016 8:27 pm    Post subject: Reply with quote

Framebuffer/VGA console are also hardware drivers. Any framebuffer console in particular is NOT safe to use with nvidia.ko.
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2158
Location: Berlin, Germany

PostPosted: Sun Feb 21, 2016 11:17 pm    Post subject: Reply with quote

Do you have IOMMU support enabled in your kernel? That is known to cause problems with the proprietary NVidia driver.

If so, try to disable CONFIG_INTEL_IOMMU in genkernel --menuconfig or set the intel_iommu=off kernel parameter.
Back to top
View user's profile Send private message
Pyro MX
n00b
n00b


Joined: 19 Oct 2007
Posts: 27
Location: Canada

PostPosted: Mon Feb 22, 2016 1:52 am    Post subject: Reply with quote

I happen to have two framebuffer drivers enabled - Userspace (uvesafb) and EFI. Since I don't use EFI, I'm going to disable this one first. I also have INTEL_IOMMU. I'm going to try without the EFI driver first, see if corrects the problem. If it does, we'll be able to pinpoint the option causing conflicts. If not, I'll also try disabling INTEL_IOMMU.
_________________
Pyro MX
Back to top
View user's profile Send private message
Pyro MX
n00b
n00b


Joined: 19 Oct 2007
Posts: 27
Location: Canada

PostPosted: Mon Feb 22, 2016 2:19 am    Post subject: Reply with quote

Well, still no luck. I disabled both the EFI framebuffer and the Intel IOMMU option, still have the same behaviour as before. I also tried removing the "video" line altogether from the kernel command line to prevent the system from enabling fbcondecor, no effect. It makes me want to switch to nouveau,all of a sudden :wink: .
_________________
Pyro MX
Back to top
View user's profile Send private message
perlovka
n00b
n00b


Joined: 04 Aug 2004
Posts: 16
Location: Israel

PostPosted: Sat Mar 26, 2016 3:17 am    Post subject: Reply with quote

Same trouble: when trying to switching VTs or to stop xdm, video and input subsystems hangs (still available to connect via ssh and reboot properly)

This message appears in system logs:
Code:
kernel: nvidia-modeset: ERROR: GPU:0: Idling EVO timed out: 0x0000917d:0:0:0x00000040


Seems like it is related to new KMS functionality in nvidia-drivers.
I've solved it this way:

Code:
cat /etc/portage/package.mask/all
>=sys-kernel/vanilla-sources-4.3
>=x11-drivers/nvidia-drivers-358
>=x11-base/xorg-server-1.18
>=x11-base/xorg-drivers-1.18
>=x11-drivers/xf86-input-evdev-2.10

Code:
eix -Ic xorg\|nvidia\|evdev
...
[I] x11-base/xorg-drivers (1.17@03/26/2016): Meta package containing deps on all xorg drivers
[I] x11-base/xorg-server (1.17.4@03/26/2016): X.Org X servers
[I] x11-drivers/nvidia-drivers (355.11-r4@03/26/2016): NVIDIA Accelerated Graphics Driver
[I] x11-drivers/xf86-input-evdev (2.9.2@03/26/2016): Generic Linux input driver
...

Intel IOMMU is on:
Code:
grep -i intel_iommu /usr/src/linux/.config
CONFIG_INTEL_IOMMU=y
CONFIG_INTEL_IOMMU_DEFAULT_ON=y
CONFIG_INTEL_IOMMU_FLOPPY_WA=y

Framebuffer settings:
Code:
grep -i '^config_framebuffer\|^config_fb' /usr/src/linux/.config
CONFIG_FB=y
CONFIG_FB_CMDLINE=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_UVESA=y
CONFIG_FRAMEBUFFER_CONSOLE=y

Code:
uname -a
Linux 4.1.20 #1 SMP PREEMPT Sat Mar 26 05:47:43 IDT 2016 x86_64 Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz GenuineIntel GNU/Linux


Good luck! =)
Back to top
View user's profile Send private message
Pyro MX
n00b
n00b


Joined: 19 Oct 2007
Posts: 27
Location: Canada

PostPosted: Tue Apr 12, 2016 12:56 am    Post subject: [SOLVED] X server hangs when switching TTYs or shutdown Reply with quote

Thanks for the info, perlovka :)

I did some tests on my side and here's what happened:

After the update to Plasma 5, sddm failed to start because it wasn't in the video group. But not knowing the cause initially, I switched to the nouveau driver. Using the nouveau driver, everything worked including the framebuffer, but no 3D firepower here.

I then re-switched to the nvidia driver, this time disabling all the framebuffer drivers. Here's what I did:


  • emerge with "newuse" considering the VIDEO_CARD option changed in make.conf, making sure to rebuild all the necessary packages
  • Unmerge v86d
  • Remove all the framebuffer drivers (including the Userspace Vesa VGA driver), but leave framebuffer support on
  • Remove the v86d initramfs reference from the kernel configuration
  • Remove all video-related kernel command line options from GRUB
  • Remove splashutils and disable the themes from the genkernel configuration
  • Remove the kernel, rebuild the initramfs, reinstall the kernel in /boot
  • Update GRUB2 configuration
  • Add the sddm user to the video group (for any users here who may just have upgraded to Plasma 5 :wink: )
  • Reboot


I no longer have any framebuffer console decorations, but I can freely switch to any VT without any freezing. From what I gather, there are troubles with the new proprietary nvidia drivers and uvesafb. I'll have to do some more testing in the future, but I'll mark this as solved as there are a couple of options here to circumvent the problem.

Thanks everybody for all your help! :D
_________________
Pyro MX
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum