The officially official Devuan Forum!

You are not logged in.

#1 2021-09-28 20:06:37

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

incorrect screen size and keyboard not working after lid closure

When my laptop has not been used for a while it goes into hibernate (is that the right word?)

When I wake it up, the cursor is confined to a small rectangle in the centre. I
The keyboard isn't working. At least I haven't found any keystrokes that work.

All I can do is power off and back on.

Any ideas?

Last edited by Élisabeth (2021-10-05 19:21:59)

Offline

#2 2021-09-29 09:15:09

PedroReina
Member
From: Madrid, Spain
Registered: 2019-01-13
Posts: 270  
Website

Re: incorrect screen size and keyboard not working after lid closure

Élisabeth wrote:

Any ideas?

Please check the size of your swap partition. It should be as big as your RAM o bigger.

Offline

#3 2021-09-29 12:22:38

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: incorrect screen size and keyboard not working after lid closure

PedroReina wrote:
Élisabeth wrote:

Any ideas?

Please check the size of your swap partition. It should be as big as your RAM o bigger.

I have 16GB RAM and a 16GB swap partition.

Offline

#4 2021-09-29 16:59:41

Camtaf
Member
Registered: 2019-11-19
Posts: 436  

Re: incorrect screen size and keyboard not working after lid closure

Ctrl+L might redraw the screen for you.

Offline

#5 2021-09-29 19:13:48

Kelsoo
Member
Registered: 2016-12-09
Posts: 56  

Re: incorrect screen size and keyboard not working after lid closure

Élisabeth wrote:
PedroReina wrote:
Élisabeth wrote:

Any ideas?

Please check the size of your swap partition. It should be as big as your RAM o bigger.

I have 16GB RAM and a 16GB swap partition.

Stone the bleedin crows :-) I have 3GB RAM and 1GB swap     

16GB swap seems mightily excessive considering many people will large amounts of RAM like yourself don't use any swap. I've read it's good to have some even if you have plenty RAM.  Anyway I doubt very much it's a swap issue.

Offline

#6 2021-09-29 20:41:10

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: incorrect screen size and keyboard not working after lid closure

Kelsoo wrote:

16GB swap seems mightily excessive considering many people will large amounts of RAM like yourself don't use any swap.

I'm not using any at the moment.
If I ever run out of disk space, maybe I can downsize the swap partition.

Offline

#7 2021-09-29 23:00:16

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: incorrect screen size and keyboard not working after lid closure

Camtaf wrote:

Ctrl+L might redraw the screen for you.

Neither keyboard nor trackpad clicks work.

Only the trackpad moves the curser within a little rectangle in the centre of the screen.

This happens after I close the lid.

Offline

#8 2021-09-29 23:17:25

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,254  

Re: incorrect screen size and keyboard not working after lid closure

Is there anything spectacular in /var/log/syslog or /var/log/Xorg.0.log ? or perhaps som /var/log/pm-* log file?

Generally the issue is likely to be that some module fails to reset/restart properly on resume. if that is the case and you can isolate which one, adding that module to the SUSPEND_MODULES list (see man pm-suspend) for unloading and re-loading might solve the issue.

Offline

#9 2021-09-30 20:31:54

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: incorrect screen size and keyboard not working after lid closure

ralph.ronnquist wrote:

Is there anything spectacular in /var/log/syslog or /var/log/Xorg.0.log ? or perhaps som /var/log/pm-* log file?

Nothing in /var/log/Xorg.0.log  or /var/log/pm-*

Nothing on wake-p in  /var/log/syslog, just while booting.

I don't know whether this is related:

EXT4 (sda2) errors=remount-ro

That's the / root partition.

Offline

#10 2021-10-01 00:08:23

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,254  

Re: incorrect screen size and keyboard not working after lid closure

As you probably know, web searching this issue gives a fair bit of near misses but no distinctive solutions.

If it is due to the device end losing its configuration, then it might be possible to use synclient for persisting a good configuration. With synclient you would capture the working configuration to a file, and then make it restore from that file upon resume.

That would still be a second best (at best) with a module reload/restart/reset being a better solution, but I'm not sure how you work out which module(s) are involved.

It is also possible, if less likely, that the problem is due to the display end losing some configuration. In that case I suppose some clever automated xrandr incantation would do the job.

Offline

#11 2021-10-01 19:33:21

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: incorrect screen size and keyboard not working after lid closure

ralph.ronnquist wrote:

Generally the issue is likely to be that some module fails to reset/restart properly on resume. if that is the case and you can isolate which one, adding that module to the SUSPEND_MODULES list (see man pm-suspend) for unloading and re-loading might solve the issue.

pm-utils are not installed, hence no log files.

I found this on Debian : A very common issue found after the computer resumes is corrupted video ... Fixing corrupted video on resume

And I found a hack to restore the resolution Screen resolution wrong after suspend, which I presume requires pm-utils.

Offline

#12 2021-10-02 01:05:56

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,254  

Re: incorrect screen size and keyboard not working after lid closure

Fortunately I haven't had your problem, but also therefore I haven't had reason to dig into it, and now I stand without distinct knowledge. You may well be right to focus on the screen and display side of things, then the X configuration for the input devices, and then the device adapters themselves... but I'd do the opposite order.

As I understood it, the display shows up fine but the mouse and keyboard play up. That suggests to me that the suspend/resume implementation of the Desktop Environment that you are using doesn't juggle all the device handling modules enough; something that "used to" be handled by pm-utils ("power management utilities").  In other words, that the device adapters modules that interact with the input hardware (not the display) don't get reset properly upon resume.

If you'd know which modules, you'd then go to the suspend/resume implementation used by your desktop environment and make those modules reset/reload upon resume (assuming that implementation of the suspend/resume function provides the required hooks).

There is no harm in installing xrandr and synclient as ways of getting more insight; xrandr is the command used for inspecting and controlling the display setup for X, and synclient is the command for inspecting and configuring the touchpad handling for X (which also partly concerns the mouse). Both of those interact with the X server.

At the module level, I think it concerns the hid (human interface device) modules and the hcd (host controller driver) modules; namely that one or some of those lose their configuration upon suspend+resume. I remember for example that the xhci_hcd module at some time had difficulty with suspend+resume which typically got resolved by reloading.

But not all computers are the same, so it might be a different module for your problem, and of course, maybe the problem sits elsewhere.

Offline

#13 2021-10-02 13:01:39

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: incorrect screen size and keyboard not working after lid closure

ralph.ronnquist wrote:

You may well be right to focus on the screen and display side of things, then the X configuration for the input devices, and then the device adapters themselves... but I'd do the opposite order.

As I understood it, the display shows up fine but the mouse and keyboard play up.

You are absolutely right! The screen is displayed correctly at 1920x1080.
But the mouse moves within a (I guess) 320x180 or rectangle and the keyboard is dead.

I haven't given up yet, I'm not one to throw the towel quickly.

But if I fail to solve this problem, I wonder whether I could set up the PC to shut down on closure of the lid. It's a bit severe.
At the moment I do a manual shutdown.

Offline

#14 2021-10-02 19:17:35

devadmin
Member
Registered: 2021-09-26
Posts: 30  

Re: incorrect screen size and keyboard not working after lid closure

Do you really need to hibernate? It writes down quite a lot to ssd or hard drive. May be you can disable hibernate and use suspend?
I had other problem with touchpad. Installed synclient added one command line " synclient..." in rc.local and it works. Probaly it"s not the best solution but it works.

Offline

#15 2021-10-03 09:30:21

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: incorrect screen size and keyboard not working after lid closure

devadmin wrote:

Do you really need to hibernate? It writes down quite a lot to ssd or hard drive. May be you can disable hibernate and use suspend?
I had other problem with touchpad. Installed synclient added one command line " synclient..." in rc.local and it works. Probaly it"s not the best solution but it works.

When I wrote the original post I didn't know the terminology.
I presume the laptop suspends when I close the lid.

When I run synclient I get:

Couldn't find synaptics properties. No synaptics driver loaded? 

Offline

#16 2021-10-03 09:32:49

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: incorrect screen size and keyboard not working after lid closure

Élisabeth wrote:

When I run synclient I get:

Couldn't find synaptics properties. No synaptics driver loaded? 

The synaptic Xorg driver in being superseded by the newer libinput driver in Debian 9 "Stretch".

Offline

#17 2021-10-03 10:19:24

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: incorrect screen size and keyboard not working after lid closure

I found someone on the Ubuntu forum with  the same symptoms:

He changed GRUB_CMD_LINUX_DEFAULT in /etc/default/grub, adding i8042.reset i8042.nomux i8042.nopnp i8042.noloop to the options.

Following this post, I tried to update-grub, but it fails:

/usr/sbin/update-grub: 3: exec: grub-mkconfig: not found

Last edited by Élisabeth (2021-10-03 10:30:00)

Offline

#18 2021-10-03 15:46:56

Marjorie
Member
From: Teignmouth, UK
Registered: 2019-06-09
Posts: 221  

Re: incorrect screen size and keyboard not working after lid closure

Did you do this as root / using sudo (which depends on whether you have set up a root password) or as yourself as user?

grub-mkconfig won't be found is you run /usr/sbin/update-grub as a regular user. This in on my machine (I use sudo):

marjorie@grendel:~$ which grub-mkconfig
marjorie@grendel:~$ sudo which grub-mkconfig
[sudo] password for marjorie: 
/usr/sbin/grub-mkconfig

Last edited by Marjorie (2021-10-03 15:48:05)

Offline

#19 2021-10-03 19:11:07

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: incorrect screen size and keyboard not working after lid closure

Marjorie wrote:

Did you do this as root / using sudo (...) or as yourself as user?

grub-mkconfig won't be found is you run /usr/sbin/update-grub as a regular user.

As root.

Offline

#20 2021-10-03 20:07:32

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: incorrect screen size and keyboard not working after lid closure

Élisabeth wrote:
Marjorie wrote:

Did you do this as root / using sudo (...) or as yourself as user?

grub-mkconfig won't be found is you run /usr/sbin/update-grub as a regular user.

As root.

Sorry.
PATH wasn't set because I didn't use su -

Offline

#21 2021-10-03 20:17:57

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: incorrect screen size and keyboard not working after lid closure

Success !

Log in  as root using su - to make sure that /usr/sbin is in the PATH.

I changed  GRUB_CMD_LINUX_DEFAULT in /etc/default/grub:

GRUB_CMD_LINUX_DEFAULT="i8042.reset i8042.nomux i8042.nopnp i8042.noloop"

Then I ran the following command:

update-grub

Offline

#22 2021-10-04 18:48:15

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: incorrect screen size and keyboard not working after lid closure

Élisabeth wrote:

Success !

No. It doesn't work everytime.

Offline

#23 2021-10-05 19:30:30

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: incorrect screen size and keyboard not working after lid closure

I went down  the wrong trail trying to solve a keyboard issue, which it is not.

I changed the subject of this thread to make the thread more relevant for posterity.
I had previously referred to it as  hibernation, which my system doesn't even support. The problem occurs after lid closure.

Offline

#24 2021-10-05 19:41:47

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: incorrect screen size and keyboard not working after lid closure

The XFCE Power Manager default settings were:

  • System Power Saving Never

  • When Laptop Lid is Closed Lock Screen

  • Security Lock screen when System is going to sleep

When re-opening the lid I am presented with the Desktop, the keyboard  does not appear to be working, and the trackpad moves the cursor within a small rectangle in the centre of the screen.

With the above settings I should be presented with the XScreenSaver login dialog.
And that is what happens, only the dialog is invisible.
The cursor is in the invisible dialog's password field. I can unlock the screen by  blind typing the password.

Offline

#25 2021-10-05 19:43:37

Élisabeth
Member
From: France
Registered: 2021-09-06
Posts: 117  

Re: incorrect screen size and keyboard not working after lid closure

I later found this XFCE issue reported here.

Offline

Board footer