Re: HP Laptop freezes while using Xorg sporadically.

From: Jin Guojun[VFF] <jguojun_at_gmail.com>
Date: Tue, 15 Jul 2025 19:48:30 UTC
You can't just have a Section "ServerLayout" in the xorg.conf file, you 
need a completed xorg.conf file generated from command

     X -configure

By looking the dmesg, it look like that you have xf86-video-amdgpu 
driver installed by pkg. AMD video on laptops has more issues in xorg.

There are a few separated configurations below you may try:
(1) Since the laptop has only 1366x768 resolution, you may not need a 
GPU driver (for higher resolution display).
     pkg delete xf86-video-* (replace * with all installed video driver 
names)
     pkg delete drm-* (ditto)
     rm /etc/X11/xorg.conf

     restart laptop and run X

     This should work. If not, try #2
     If this works, you may also try #2 to get higher resolution if 
possible.

(2) Try different AMD video driver xf86-video-ati-19.1.0_7,1 with 
drm-515-kmod-5.15.160.1402000_6
     and run X -configure to generate a /root/xorg.conf.new, add Option 
"AllowEmptyInput" "false" to Section "ServerLayout"
     then move it to /etc/X11/xorg.conf

    This is usually a problem for amd video on laptops.
     You may try different combination of amd video drivers (2) and drm- 
(2), so total 4 configurations.
     You already tried one, so only three left there to try.

On 7/14/25 18:20, Mauricio wrote:
> > I had similar issue on an old HP laptop, but not sure if it is the same
> > cause as yours.
> >
> > Please try to set Option "AllowEmptyInput" "false" in 
> /etc/X11/xorg.conf
> > (uncomment the line in Section Serverlayout)
>
> > Section "ServerLayout"
> >         Identifier     "X.org Configured"
> >         Screen      0  "Screen0" 0 0
> >         InputDevice    "Mouse0" "CorePointer"
> >         InputDevice    "Keyboard0" "CoreKeyboard"
> >         #Option "AllowEmptyInput" "false"
> >EndSection
>
> Ok so i have tried this and it only led me to getting a xorg error, 
> and i got no graphical output.
> Here i leave the xorg log: https://pastebin.com/7pAKUJXz
>
> On Mon, Jul 14, 2025 at 1:13 PM Jin Guojun[VFF] <jguojun@gmail.com> wrote:
>
>     It can be in there or many following places. Please refer to the
>     man xorg.conf.
>
>                /etc/X11/<cmdline>
>                /usr/local/etc/X11/<cmdline>
>                /etc/X11/$XORGCONFIG
>                /usr/local/etc/X11/$XORGCONFIG
>                /etc/X11/xorg.conf
>                /etc/xorg.conf
>                /usr/local/etc/X11/xorg.conf.<hostname>
>                /usr/local/etc/X11/xorg.conf
>                /usr/local/lib/X11/xorg.conf.<hostname>
>                /usr/local/lib/X11/xorg.conf
>
>     AllowEmptyInput was an old problem, but just in case it reoccurs.
>     In this case, Ctrl+Alt+DEL should be able to reboot the laptop.
>     You may try to confirm if it is the case.
>
>     I also see the similar issue on some laptops, the mainly is
>     related to the display driver -- xf86-video-xxx-#.#.#_#
>     Since your laptop is not using a xorg.conf file, it uses the
>     default driver, which usually works.
>     You may try to load video card specific driver, like
>     xf86-video-ati-19.1.0_7,1 if the laptop has an ATI video card.
>
>     On 7/14/25 09:22, Mauricio wrote:
>>     >I had similar issue on an old HP laptop, but not sure if it is
>>     the same
>>     >cause as yours.
>>     >
>>     >Please try to set Option "AllowEmptyInput" "false" in
>>     /etc/X11/xorg.conf
>>     >(uncomment the line in Section Serverlayout)
>>
>>     >Section "ServerLayout"
>>     >        Identifier     "X.org Configured"
>>     >         Screen      0  "Screen0" 0 0
>>     >         InputDevice    "Mouse0" "CorePointer"
>>     >         InputDevice    "Keyboard0" "CoreKeyboard"
>>     >         #Option "AllowEmptyInput" "false"
>>     >EndSection
>>
>>     I just did as you say. I will keep y'all informed about the results.
>>     Let it be noted that this file was not in that directory before.
>>     Also, should not this file be in /usr/local/etc/X11/ ?
>>     I'm asking that as a newbie. As far as i know, that's the place
>>     where
>>     we usually modify these kinds of files...
>>
>>     On Mon, Jul 14, 2025 at 12:05 PM Jin Guojun[VFF]
>>     <jguojun@gmail.com> wrote:
>>
>>         On 7/14/25 04:57, infoomatic wrote:
>>         > Sorry I cannot help with your problem, however, I just want
>>         to comment
>>         > on the hardware: we ordered a few HP 255-G5 @dayjob back
>>         then, and
>>         > after a while we gave up on them because they were
>>         constantly having
>>         > Microsoft Windows Bluescreens. I then decided to throw
>>         FreeBSD on them
>>         > without GUI and use it for our build farm - have worked
>>         flawlessly in
>>         > that configuration now for years. It may be that there is
>>         something
>>         > odd with the 255 series from HP.
>>         >
>>         > On 14.07.25 03:43, Mauricio wrote:
>>         >> I have an HP 255-G7 Laptop running FreeBSD 14.3 RELEASE
>>         which every
>>         >> now and then freezes entirely while using Xorg. When the
>>         laptop
>>         >> freezes, the only thing that gives me a response is mouse
>>         and graphic
>>         >> tablet movement.
>>         >>
>>         >> At that point, I can't jump to a virtual console with
>>         >> CTRL+ALT+FUNCTIONKEY.
>>         >> I can't even shut the computer down by pressing the
>>         shutdown button
>>         >> for less than a second as I usually do.
>>         >> But trying to do both things makes the disk activity light
>>         indicator
>>         >> start blinking a lot for a moment.
>>         >>
>>         >> The laptop doesn't seem to get back to work even after
>>         half an hour
>>         >> of waiting or more.
>>         >> Something that i have been noticing is that the freeze
>>         seems to be
>>         >> triggered by an increase of resources use. I noticed that
>>         because the
>>         >> freezing starts usually after opening a program like a
>>         terminal
>>         >> emulator while there are already some programs running in
>>         other
>>         >> windows. It also happened one time while trying to use my
>>         laptop
>>         >> while copying 23GBs of data in a virtual console.
>>         >>
>>         >> I leave some routine files here for you to check up if you
>>         feel the
>>         >> need of it:
>>         >>
>>         >> dmesg output: https://pastebin.com/C27M5K0F
>>         >> <https://pastebin.com/C27M5K0F>
>>         >> rc.conf: https://pastebin.com/9wX0sKsa
>>         <https://pastebin.com/9wX0sKsa>
>>         >> loader.conf: https://pastebin.com/wBrdL8NL
>>         >> <https://pastebin.com/wBrdL8NL>
>>         >>
>>         >> As always, thanks to whoever that takes the time to help
>>         me with this
>>
>>         I had similar issue on an old HP laptop, but not sure if it
>>         is the same
>>         cause as yours.
>>
>>         Please try to set Option "AllowEmptyInput" "false" in
>>         /etc/X11/xorg.conf
>>         (uncomment the line in Section Serverlayout)
>>
>>         Section "ServerLayout"
>>                  Identifier     "X.org Configured"
>>                  Screen      0  "Screen0" 0 0
>>                  InputDevice    "Mouse0" "CorePointer"
>>                  InputDevice    "Keyboard0" "CoreKeyboard"
>>                  #Option "AllowEmptyInput" "false"
>>         EndSection
>>
>>
>