当前位置: 首页 > news >正文

进入xwindows后挂起键盘鼠标没有响应@FreeBSD

问题:

在升级pkg包后,系统无法进入xfce等xwindows,表现为黑屏和看见鼠标,左上角有一个白字符块,键盘鼠标没有反应,整个系统卡住。但是可以ssh登录,内部的服务一切正常。

表现

处理过程:

输入xrandr

报错can't open display

现在的问题就是解决么有display的问题,大约是在某个时间段,FreeBSD修改了xwindows的某个部件。。。。

用ssh登进去测试:

startx

xauth:  file /home/skywalk/.serverauth.7188 does not exist

/usr/local/libexec/Xorg.wrap: Only console users are allowed to run the X server

xinit: giving up

xinit: unable to connect to X server: Connection refused

xinit: server error

安装wayfile试试

# pkg install wayfire wf-shell alacritty swaylock-effects swayidle wlogout kanshi mako wlsunset

照旧

咨询bing

You could do this (if your DISPLAY is :0):

export DISPLAY=:0

xrandr --listmonitors

xrandr your_command

输入set DISPLAY=:0

xrandr --listmonitors

还是Can't open display

重新学习FreeBSD手册

pciconf -lv|grep -B4 VGA
vgapci0@pci0:0:2:0:	class=0x030000 rev=0x09 hdr=0x00 vendor=0x8086 device=0x1616 subvendor=0x17aa subdevice=0x2226vendor     = 'Intel Corporation'device     = 'HD Graphics 5500'class      = displaysubclass   = VGA

查看是否biso还是uefi

sysctl machdep.bootmethod
machdep.bootmethod: UEFI

intel

pkg install drm-kmod
sysrc kld_list+=i915kms

降低intel显卡的cpu占用

pkg install libva-intel-driver mesa-libs mesa-dri

Xorg配置

Xorg Configuration

Xorg supports most common video cards, keyboards, and pointing devices.

Video cards, monitors, and input devices are automatically detected and do not require any manual configuration. Do not create xorg.conf or run a Xorg -configure step unless automatic configuration fails.

sudo Xorg -configure
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE) 
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 
(EE) 
Please consult the The X.Org Foundation support at http://wiki.x.orgfor help. 
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.

 intel显卡配置

Example 1. Select Intel® Video Driver in a File

/usr/local/etc/X11/xorg.conf.d/20-intel.conf

Section "Device"Identifier "Card0"Driver     "intel"
EndSection

pciconf -lv | grep -B3 display
vgapci0@pci0:0:2:0:	class=0x030000 rev=0x09 hdr=0x00 vendor=0x8086 device=0x1616 subvendor=0x17aa subdevice=0x2226vendor     = 'Intel Corporation'device     = 'HD Graphics 5500'class      = display

X -config

执行测试

sudo X -config /root/xorg.conf.new
密码:
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE) 
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 
(EE) 
Please consult the The X.Org Foundation support at http://wiki.x.orgfor help. 
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.

执行startx

重新删除Xorg和xfce包,重新安装,执行startx

报错no screens 

生成的X配置文件

cat /root/xorg.conf.new 
Section "ServerLayout"Identifier     "X.org Configured"Screen      0  "Screen0" 0 0InputDevice    "Mouse0" "CorePointer"InputDevice    "Keyboard0" "CoreKeyboard"
EndSectionSection "Files"ModulePath   "/usr/local/lib/xorg/modules"FontPath     "/usr/local/share/fonts/misc/"FontPath     "/usr/local/share/fonts/TTF/"FontPath     "/usr/local/share/fonts/OTF/"FontPath     "/usr/local/share/fonts/Type1/"FontPath     "/usr/local/share/fonts/100dpi/"FontPath     "/usr/local/share/fonts/75dpi/"FontPath     "catalogue:/usr/local/etc/X11/fontpath.d"
EndSectionSection "Module"Load  "glx"
EndSectionSection "InputDevice"Identifier  "Keyboard0"Driver      "kbd"
EndSectionSection "InputDevice"Identifier  "Mouse0"Driver      "mouse"Option	    "Protocol" "auto"Option	    "Device" "/dev/sysmouse"Option	    "ZAxisMapping" "4 5 6 7"
EndSectionSection "Monitor"Identifier   "Monitor0"VendorName   "Monitor Vendor"ModelName    "Monitor Model"
EndSectionSection "Device"### Available Driver options are:-### Values: <i>: integer, <f>: float, <bool>: "True"/"False",### <string>: "String", <freq>: "<f> Hz/kHz/MHz",### <percent>: "<f>%"### [arg]: arg optional#Option     "Accel"              	# [<bool>]#Option     "AccelMethod"        	# <str>#Option     "Backlight"          	# <str>#Option     "CustomEDID"         	# <str>#Option     "DRI"                	# <str>#Option     "Present"            	# [<bool>]#Option     "ColorKey"           	# <i>#Option     "VideoKey"           	# <i>#Option     "Tiling"             	# [<bool>]#Option     "LinearFramebuffer"  	# [<bool>]#Option     "HWRotation"         	# [<bool>]#Option     "VSync"              	# [<bool>]#Option     "PageFlip"           	# [<bool>]#Option     "SwapbuffersWait"    	# [<bool>]#Option     "TripleBuffer"       	# [<bool>]#Option     "XvPreferOverlay"    	# [<bool>]#Option     "HotPlug"            	# [<bool>]#Option     "ReprobeOutputs"     	# [<bool>]#Option     "XvMC"               	# [<bool>]#Option     "ZaphodHeads"        	# <str>#Option     "VirtualHeads"       	# <i>#Option     "TearFree"           	# [<bool>]#Option     "PerCrtcPixmaps"     	# [<bool>]#Option     "FallbackDebug"      	# [<bool>]#Option     "DebugFlushBatches"  	# [<bool>]#Option     "DebugFlushCaches"   	# [<bool>]#Option     "DebugWait"          	# [<bool>]#Option     "BufferCache"        	# [<bool>]Identifier  "Card0"Driver      "intel"BusID       "PCI:0:2:0"
EndSectionSection "Screen"Identifier "Screen0"Device     "Card0"Monitor    "Monitor0"SubSection "Display"Viewport   0 0Depth     1EndSubSectionSubSection "Display"Viewport   0 0Depth     4EndSubSectionSubSection "Display"Viewport   0 0Depth     8EndSubSectionSubSection "Display"Viewport   0 0Depth     15EndSubSectionSubSection "Display"Viewport   0 0Depth     16EndSubSectionSubSection "Display"Viewport   0 0Depth     24EndSubSection
EndSection

这样一通,启动后报错:no screens found 

至少不会卡死了,现在解决这个报错

解决no screens found 报错问题

装驱动试试

sudo pkg install libva-intel-media-driver

startx后同样报错

试试

intel-compute-runtime-llvm13

问题照旧

总结

一顿操作猛如虎,现在至少每次startx的时候,系统不会卡住了。

no screens found的问题,单开一篇,记录以后解决的步骤。

http://www.lryc.cn/news/451220.html

相关文章:

  • CentOS7.9 snmptrapd更改162端口
  • 模糊测试SFuzz亮相第32届中国国际信息通信展览会
  • CMake学习
  • 书生·浦语大模型全链路开源开放体系
  • PHP安装swoole扩展无效,如何将文件上传至Docker容器
  • Web3.0 应用项目
  • Linux 学习笔记(十六)—— 重定向与缓冲区
  • 828华为云征文|WordPress部署
  • 华为开源自研AI框架昇思MindSpore应用案例:计算高效的卷积模型ShuffleNet
  • 《C++ 小游戏:简易飞机大战游戏的实现》
  • SpringCloud源码:服务端分析(二)- EurekaServer分析
  • 插槽slot在vue中的使用
  • 针对考研的C语言学习(定制化快速掌握重点2)
  • [C++][IO流][流输入输出][截断理解]详细讲解
  • 阿里云部署1Panel(失败版)
  • 九、设备的分配与回收
  • 单片机的原理及应用
  • Python数据分析篇--NumPy--入门
  • OJ在线评测系统 后端 判题机模块预开发 架构分析 使用工厂模式搭建
  • linux 目录文件夹操作
  • (Linux驱动学习 - 4).Linux 下 DHT11 温湿度传感器驱动编写
  • 前端登录页面验证码
  • 【鸿蒙】HarmonyOS NEXT应用开发快速入门教程之布局篇(上)
  • 使用 Nginx 和 Gunicorn 部署 Flask 项目详细教程
  • linux中bashrc和profile环境变量在Shell编程变量的传递作用
  • 数据结构-4.2.串的定义和基本操作
  • fastzdp_redis第一次开发, 2024年9月26日, Python操作Redis零基础快速入门
  • 文件名:\\?\C:\Windows\system32\inetsrv\config\applicationHost.config错误:无法写入配置文件
  • Optiver股票大赛Top2开源!
  • Maven 实现依赖统一管理