on arch linux, now again xorg went into sleep suspend, black screen,i i can switch console and log on in text mode, how do I get xorg to wake up again
ChatGPT said:
When Xorg (or your display) goes to sleep and you get a black screen, but can still switch to a text console (like Ctrl+Alt+F2), it usually means the display server is still running, but the screen is powered down due to DPMS (Display Power Management Signaling), screen locker, or a suspend glitch.
Here are some ways to wake it up or fix it without restarting X:
🟢 1. Try waking it with xset
If you’re able to log in from a TTY, try the following:
export DISPLAY=:0 export XAUTHORITY=/home/youruser/.Xauthority
xset dpms force on
Replace youruser with your actual username.
🟢 2. Kill the screen locker (if any)
Sometimes screen lockers freeze (e.g. xscreensaver, i3lock, slock, light-locker, etc.). From the TTY, find and kill it:
ps aux | grep -i lock
Then kill any relevant process, e.g.:
killall i3lock
🟢 3. Check and restart display manager (if using one)
If you’re using GDM, SDDM, LightDM, etc.:
systemctl restart sddm # or gdm, lightdm, etc.
⚠️ This will kill your session unless you’re using a nested X or Wayland session.
🟡 4. Try resuming with loginctl (if Wayland is involved)
If it’s a suspend state confusion:
loginctl unlock-session
List sessions:
loginctl list-sessions
Then:
loginctl unlock-session <ID>
🔴 5. Fallback: kill and restart X
If nothing works, switch to TTY and restart your window manager or X server:
If using .xinitrc / startx:
killall Xorg
startx
Or just reboot if needed:
reboot
⚙️ To prevent it in future
If it’s DPMS:
xset -dpms # disables Display Power Management
xset s off # disables screen blanking
To make it permanent, add that to your .xinitrc or X session startup script.
Let me know your desktop environment or WM (e.g. i3, KDE, GNOME) and I can give a more tailored fix.
You said:
this is the start command (from ps) can you give me a shell script that turns it on again /usr/lib/Xorg -nolisten tcp -background none -seat seat0 vt1 -auth /run/sddm/xauth_vhqVwR -noreset -displayfd 17
ChatGPT said:
Thanks — since you’re using SDDM, it’s a display manager and is managing the X session. The Xorg is started by SDDM with that command. You likely don’t want to mess with that directly, but rather trigger the display to turn back on (not restart it, unless really needed).
Here’s a shell script that will attempt to wake up the display by using xset, assuming SDDM is running a session on :0.
✅ wake-x.sh
#!/bin/bash # Find the user running the X session
user=$(loginctl list-sessions --no-legend | awk '$4=="seat0"{print $2}') if [ -z "$user" ]; then echo"No user session found on seat0" exit 1 fi # Get DISPLAY and XAUTHORITY for the user export DISPLAY=:0 export XAUTHORITY="/home/$user/.Xauthority"
# Run as that user
sudo -u "$user" xset dpms force on
sudo -u "$user" xset s off
sudo -u "$user" xset -dpms
echo"Attempted to wake up display for user $user"
🛠 How to Use
Save it as wake-x.sh
Make it executable:
chmod +x wake-x.sh
Run it from a TTY:
./wake-x.sh
✅ Tip: You might need to run it with root privileges (sudo ./wake-x.sh), depending on your user’s permissions.
Let me know if you want a version that also checks for i3lock, slock, or other screen lockers.
You said:
user is always current user, you casn remove the sudo -u user, display is 0.0
ChatGPT said:
Perfect — here’s the simplified version tailored to your setup:
No sudo, no user detection — just assumes you’re the X session owner. Let me know if you want it to auto-run on VT switch or sleep resume.
You said:
from previous conversations I know xauthority is not in that place. ./wake-x.sh Invalid MIT-MAGIC-COOKIE-1 key xset: unable to open display “:0.0” Invalid MIT-MAGIC-COOKIE-1 key xset: unable to open display “:0.0” Invalid MIT-MAGIC-COOKIE-1 key xset: unable to open display “:0.0” Display wake-up triggered. elitedesk:~$ echo $DISPLAY :0.0
ChatGPT said:
Thanks — good catch. If $DISPLAY is :0.0, but xset fails with Invalid MIT-MAGIC-COOKIE-1 key, that means your shell can’t authenticate to the X server due to a bad or missing XAUTHORITY.
Since you’re using SDDM, and your ps output had:
-auth /run/sddm/xauth_vhqVwR
…that means X is using/run/sddm/xauth_vhqVwR as its auth file, not $HOME/.Xauthority.
if [ ! -f "$XAUTHORITY" ]; then echo"XAUTHORITY file not found: $XAUTHORITY" exit 1 fi
xset dpms force on
xset s off
xset -dpms
echo"Display wake-up triggered using $XAUTHORITY"
Let me know if you want this triggered automatically on VT switch or resume.
You said:
xauth_vhqVwR looks like a random filename or is it that every time?
ChatGPT said:
You’re absolutely right — that filename is randomly generated by SDDM every time it starts X.
So:
/run/sddm/xauth_* will change on each login or restart of the display manager.
You can’t hardcode it reliably — you need to detect it dynamically.
✅ Best practice: auto-detect it at runtime
Here’s the revised script again — it will:
Look for the Xorg process
Extract the -auth parameter
🔁 Final auto-detecting wake-x.sh
#!/bin/bash export DISPLAY=:0.0
# Get the current Xorg -auth file
XAUTHORITY=$(ps -eo args | grep '[X]org' | grep -oP '(?<=-auth )/[^ ]+')
if [ ! -f "$XAUTHORITY" ]; then echo"XAUTHORITY file not found: $XAUTHORITY" exit 1 fi export XAUTHORITY
xset dpms force on
xset s off
xset -dpms
echo"Display wake-up triggered using $XAUTHORITY"
You can make this script executable and call it anytime from a TTY to wake up X. Let me know if you want this to work even after suspend/resume automatically (via udev or systemd).
You said:
now it says ./wake-x.sh Authorization required, but no authorization protocol specified xset: unable to open display “:0.0” Authorization required, but no authorization protocol specified xset: unable to open display “:0.0” Authorization required, but no authorization protocol specified xset: unable to open display “:0.0” Display wake-up triggered using /run/sddm/xauth_vhqVwR
ChatGPT said:
Got it — this means the script found the right XAUTHORITY file, but your current shell user doesn’t have permission to access the X session, even with that file.
Since the X server was started by SDDM as root, and your shell is not root, your process can’t read the cookie from /run/sddm/xauth_*.
✅ Fix: run the script as root
sudo ./wake-x.sh
This is required because:
/run/sddm/xauth_* is root-owned and only readable by root
Only root (or the session user) can access that socket using that cookie
🔒 Optional: allow read access for your user (less safe)
If you want to avoid sudo, you could do:
sudo cp /run/sddm/xauth_* ~/.Xauthority
And then change the script to:
export XAUTHORITY="$HOME/.Xauthority"
But this only works if the cookie is valid for that display and session — not recommended unless you know what you’re doing, since it breaks if you log out or restart SDDM.
if [ ! -f "$XAUTHORITY" ]; then echo"XAUTHORITY file not found: $XAUTHORITY" exit 1 fi export XAUTHORITY
xset dpms force on
xset s off
xset -dpms
echo"Display wake-up triggered using $XAUTHORITY"
Let me know if you’d like it to auto-trigger on resume, VT switch, or some hardware input.
You said:
why does sddm not use .Xauthority?
ChatGPT said:
Great question.
🧵 Why SDDM doesn’t use ~/.Xauthority:
Short answer:
SDDM runs the X server before the user logs in, so it can’t write to the user’s ~/.Xauthority yet — the home directory isn’t even available (due to encryption, permissions, etc). Instead, it uses a temporary root-owned Xauthority file like:
/run/sddm/xauth_<random>
🔍 Technical breakdown:
SDDM starts as root (like all display managers).
It starts Xorg (or Wayland) before the user logs in, using:
Xorg -auth /run/sddm/xauth_<random>
It controls authentication with that temporary file.
Once the user logs in, SDDM launches the session (e.g. Plasma, i3, etc.) as that user, and may or may not copy the cookie to ~/.Xauthority, depending on:
Desktop environment
PAM modules (e.g. pam_xauth)
SDDM configuration
🧩 Can it use ~/.Xauthority?
Only if:
The home directory is available and writable (e.g. not encrypted or automounted)
The X session is started after login (e.g. via startx, not via display manager)
But SDDM’s job is to provide the GUI login screen before login — so it can’t assume a user’s $HOME exists or is accessible.
✅ Summary
Method
Used by
When
Who owns Xauthority
startx
You
After login
$HOME/.Xauthority
SDDM, GDM
Root (DM)
Before login
/run/sddm/xauth_*, etc.
If you want to switch to using ~/.Xauthority, you’d need to use startx instead of SDDM — or hack the SDDM config/scripts (not recommended).
Let me know if you want a .xinitrc / startx setup that avoids display managers entirely.
You said:
home directory is never encrypted, how do I make it work, or use something else than sddm
ChatGPT said:
Thanks — since your home isn’t encrypted, you can switch to a simpler setup that:
Uses your regular user’s ~/.Xauthority
Starts X after login (so $HOME is available)
Avoids SDDM entirely
✅ Option 1: Replace SDDM with startx and .xinitrc
This is the traditional, minimal Unix way to launch X.
[Seat:*] greeter-session=lightdm-gtk-greeter user-session=your-session-name # e.g. plasma, i3, xfce
You can find available session names in /usr/share/xsessions/.
4. Reboot
reboot
🧪 Test: After login
From a TTY or terminal:
echo$XAUTHORITY
It should be:
/home/youruser/.Xauthority
Then your xset, xrandr, and wake-x.sh will work without root.
⚙️ Bonus: To verify LightDM uses .Xauthority
After logging in via LightDM:
ps -ef | grep Xorg
It should not show -auth /run/..., and xauth list should show the correct cookie in ~/.Xauthority.
Let me know your window manager / DE, and I can help configure LightDM to start it correctly.
You said:
when i restart system as part of our conversation, the last part of our dialog always disappears, so now you don’t know what we were discussing before, grr. we were discussing autologin with lightdm, and it still does not work
ChatGPT said:
Got it, let’s pick up on the LightDM autologin setup. I’ll help you get autologin working properly with LightDM on Arch Linux.
Quick recap: You want LightDM to automatically log in your user and start the desktop session.
How to enable autologin in LightDM
Edit LightDM config
Open /etc/lightdm/lightdm.conf (create if missing):
In your home, create .xinitrc if it doesn’t exist:
echo'exec i3' > ~/.xinitrc # or your WM/DE start command chmod +x ~/.xinitrc
Change LightDM config to:
autologin-session=custom
This makes sure LightDM just runs your .xinitrc.
Let me know what error messages or behavior you see after rebooting with these settings!
You said:
i have it, but it still does not work autologin-user=pdd autologin-user-timeout=0 autologin-in-background=false autologin-session=xfce #exit-on-failure=false greeter-session=lightdm-gtk-greeter user-session=xfce
ChatGPT said:
Alright, since you have that config but autologin still fails, let’s troubleshoot step-by-step.
1. Check if LightDM service is enabled and running
systemctl status lightdm
You should see it’s active and running without errors.
2. Confirm the session name is correct
Run:
ls /usr/share/xsessions/
Make sure there’s a xfce.desktop file (case-sensitive).
Sometimes it’s named xfce.desktop or xfce4.desktop. Use the exact name without .desktop in autologin-session.
For example:
If file is xfce.desktop → autologin-session=xfce
If file is xfce4.desktop → autologin-session=xfce4
3. Inspect LightDM logs
sudo journalctl -u lightdm -b
Look for errors related to autologin or session start.
4. Check permissions and user shell
Make sure user pdd:
Has a valid shell (e.g., /bin/bash or /bin/zsh)
getent passwd pdd
Has proper home directory permissions.
5. Try disabling autologin-in-background
Since you have autologin-in-background=false, try commenting it out or setting it to true, as some versions of LightDM behave differently.
Remove autologin-user-timeout and autologin-in-background to test.
7. Test manual login
Try logging in as pdd manually from LightDM first — this ensures the session itself works.
8. Check if you have PAM issues
Look at /etc/pam.d/lightdm-autologin and /etc/pam.d/lightdm files — make sure no weird restrictions block autologin.
9. Double-check Xauthority
Since autologin runs as your user, .Xauthority should be created automatically in $HOME. After boot, check if .Xauthority exists:
ls -l /home/pdd/.Xauthority
If none of this helps, send me the relevant LightDM logs or errors from journalctl, and we can dig deeper!
You said:
it says jul 18 00:24:45 elitedesk lightdm[5932]: pam_succeed_if(lightdm-autologin:auth): requirement “user ingroup autologin” n> jul 18 00:24:45 elitedesk lightdm[5932]: pam_unix(lightdm-autologin:auth): conversation failed jul 18 00:24:45 elitedesk lightdm[5932]: Stopping PAM conversation, interaction requested but not supported jul 18 00:24:45 elitedesk lightdm[5932]: pam_unix(lightdm-autologin:auth): auth could not identify password for [pdd] jul 18 00:24:45 elitedesk lightdm[5932]: gkr-pam: no password is available for user jul 18 00:24:48 elitedesk lightdm[5933]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=939) by> jul 18 00:24:57 elitedesk lightdm[5994]: gkr-pam: unable to locate daemon control file jul 18 00:24:57 elitedesk lightdm[5994]: gkr-pam: stashed password to try later in open session jul 18 00:24:57 elitedesk lightdm[5994]: pam_unix(lightdm:session): session opened for user pdd(uid=1000) by pdd(uid=0) jul 18 00:24:57 elitedesk lightdm[5994]: gkr-pam: unlocked login keyring
ChatGPT said:
The key error is:
pam_succeed_if(lightdm-autologin:auth): requirement "user ingroup autologin" not met pam_unix(lightdm-autologin:auth): auth could not identify password for [pdd]
Explanation:
Your user pdd needs to be in the autologin group to pass PAM checks for autologin.
LightDM’s PAM config for autologin requires the user to be in a group called autologin as a security measure.
How to fix:
Add your user to the autologin group:
sudo groupadd autologin # create group if it doesn't exist
sudo usermod -aG autologin pdd
Then reboot and see if autologin works.
Why this happens:
PAM uses pam_succeed_if.so to check if user is in autologin group (default LightDM config).
If user is not in that group, PAM denies autologin.
Alternative: Disable that PAM check (less secure)
You can edit /etc/pam.d/lightdm-autologin and comment out the line like:
auth required pam_succeed_if.so user ingroup autologin
we again lost our conversation at restart. never the less, this file /lib/systemd/system-sleep/screen-off contains: #!/bin/bash USER=pdd DISPLAY=:0 XAUTHORITY=/home/$USER/.Xauthority case “$1/$2” in pre/*) export DISPLAY export XAUTHORITY /usr/bin/xset dpms force off sleep 2 ;; post/*) export DISPLAY export XAUTHORITY /usr/bin/xset dpms force on ;; esac now it turns off the display, but nothing can start it again
ChatGPT said:
Thanks for sharing your /lib/systemd/system-sleep/screen-off script. The issue is that xset dpms force on doesn’t reliably wake up the display from suspend or screen blanking in many setups.
Why your script turns the display off but not on:
xset dpms force off actively tells X to turn off the monitor’s power.
xset dpms force onoften doesn’t wake the screen because the monitor might be physically in a low power state and needs input events or VT switching to wake.
How to fix or improve wakeup from suspend/blank:
1. Switch to the X virtual terminal (VT) to trigger wake
Add a command to switch away from and back to your X VT (usually vt1 or vt7):
chvt 1 sleep 1
chvt 7
This sends the console away from X and back, which often wakes the display.
2. Use xset dpms force onafter VT switch
Update your post/* section like this:
post/*) export DISPLAY export XAUTHORITY
/usr/bin/chvt 1 sleep 1
/usr/bin/chvt 7
/usr/bin/xset dpms force on
;;
3. Make sure the script runs as your user
systemd runs these scripts as root, but xset needs to run as your user with access to the X server.
Modify your script to use sudo -u pdd or runuser -l pdd -c to run xset and chvt commands as user pdd, for example:
Try this, reboot, suspend/resume, and see if the display wakes up.
If this still doesn’t work, let me know your exact hardware (GPU, monitor) and logs after resume — some GPUs need extra tricks.
You said:
we previously give the following file, but now not even that one run from another vt can wake op xorg, even though the display is on in text mode on another vt: #!/bin/bash export DISPLAY=:0.0 # Get the current Xorg -auth file XAUTHORITY=/home/pdd/.Xauthority if [ ! -f “$XAUTHORITY” ]; then echo “XAUTHORITY file not found: $XAUTHORITY” exit 1 fi export XAUTHORITY xset dpms force on xset s off xset -dpms echo “Display wake-up triggered using $XAUTHORITY”
ChatGPT said:
Thanks for the update. Since even manually running that script from another VT doesn’t wake the Xorg display, but text mode VTs work fine, it suggests the problem is deeper than just xset dpms force on. Some things to consider and try:
1. Check if the X server itself is actually running and active on :0
Run:
ps aux | grep Xorg
Confirm it runs on :0 and vtX (usually vt1 or vt7).
2. Check the actual VT Xorg is on (important!)
fgconsole
This shows which VT you are on now.
Xorg typically runs on vt1 or vt7.
If you’re on another VT (e.g., tty2), try switching to Xorg’s VT with:
chvt 7
or
chvt 1
Try toggling VTs back and forth to force wake:
chvt 1 sleep 1
chvt 7
3. Try sending a fake input event to wake the screen
If DPMS commands don’t wake the screen, sometimes a fake input event works:
# Switch VTs to force wake
sudo chvt 1 sleep 1
sudo chvt 7 sleep 1
# DPMS on
sudo -u $USER xset dpms force on
sudo -u $USER xset s off
sudo -u $USER xset -dpms
# Fake input event to wake
sudo -u $USER xdotool key Shift
echo"Wake sequence executed"
Summary
Confirm VT and Xorg running VT
Try VT switching
Try fake input events (xdotool)
Confirm permissions on .Xauthority
Check Xorg logs
Check GPU and driver
If you want, share:
Your GPU model and driver info
Xorg log errors (/var/log/Xorg.0.log)
Exact VT for Xorg (ps aux | grep Xorg and fgconsole output)
I’ll help diagnose more precisely.
You said:
I have amdgpu, got no xorg errors, vt fro xorg is 1
ChatGPT said:
Thanks for the info — AMDGPU on vt1 with no Xorg errors.
Since Xorg runs on vt1 but you’re probably on another VT when trying to wake, and simple xset dpms force on doesn’t help, here’s a focused checklist for AMDGPU wake issues:
1. Always switch to vt1 to wake Xorg
Because your X server is on vt1, the display hardware will only react if you switch back to vt1:
Run script as root (for chvt) but run xset/xdotool as user with correct XAUTHORITY
Disable conflicting power management in DE temporarily to rule out conflicts
If you want, I can help write a complete systemd resume service with that script included. Would that help?
You said:
if i try it, you will loose all memory of this conversation, so we finish fault finding before i try sudo dmesg | grep -i amdgpu [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-linux-lts root=UUID=87eb82bf-80d9-4825-8176-44eac06dbd64 rw mem_sleep=deep quiet loglevel=3 amdgpu.aspm=0 amdgpu.runpm=0 [ 0.045531] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux-lts root=UUID=87eb82bf-80d9-4825-8176-44eac06dbd64 rw mem_sleep=deep quiet loglevel=3 amdgpu.aspm=0 amdgpu.runpm=0 [ 3.721398] [drm] amdgpu kernel modesetting enabled. [ 3.731795] amdgpu: Virtual CRAT table created for CPU [ 3.731812] amdgpu: Topology: Add CPU node [ 3.740706] amdgpu 0000:03:00.0: amdgpu: Fetched VBIOS from ROM BAR [ 3.740708] amdgpu: ATOM BIOS: 13-CEZANNE-019 [ 3.815232] amdgpu 0000:03:00.0: vgaarb: deactivate vga console [ 3.815239] amdgpu 0000:03:00.0: amdgpu: Trusted Memory Zone (TMZ) feature enabled [ 3.815245] amdgpu 0000:03:00.0: amdgpu: MODE2 reset [ 3.816099] amdgpu 0000:03:00.0: amdgpu: VRAM: 2048M 0x000000F400000000 – 0x000000F47FFFFFFF (2048M used) [ 3.816102] amdgpu 0000:03:00.0: amdgpu: GART: 1024M 0x0000000000000000 – 0x000000003FFFFFFF [ 3.816265] [drm] amdgpu: 2048M of VRAM memory ready [ 3.816267] [drm] amdgpu: 14970M of GTT memory ready. [ 4.531527] amdgpu 0000:03:00.0: amdgpu: reserve 0x400000 from 0xf47f800000 for PSP TMR [ 4.620013] amdgpu 0000:03:00.0: amdgpu: RAS: optional ras ta ucode is not available [ 4.630919] amdgpu 0000:03:00.0: amdgpu: RAP: optional rap ta ucode is not available [ 4.630923] amdgpu 0000:03:00.0: amdgpu: SECUREDISPLAY: securedisplay ta ucode is not available [ 4.631712] amdgpu 0000:03:00.0: amdgpu: SMU is initialized successfully! [ 4.899240] kfd kfd: amdgpu: Allocated 3969056 bytes on gart [ 4.899251] kfd kfd: amdgpu: Total number of KFD nodes to be created: 1 [ 4.899371] amdgpu: Virtual CRAT table created for GPU [ 4.899979] amdgpu: Topology: Add dGPU node [0x1638:0x1002] [ 4.899982] kfd kfd: amdgpu: added device 1002:1638 [ 4.900049] amdgpu 0000:03:00.0: amdgpu: SE 1, SH per SE 1, CU per SH 8, active_cu_number 8 [ 4.900054] amdgpu 0000:03:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0 [ 4.900058] amdgpu 0000:03:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0 [ 4.900061] amdgpu 0000:03:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0 [ 4.900064] amdgpu 0000:03:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0 [ 4.900066] amdgpu 0000:03:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0 [ 4.900069] amdgpu 0000:03:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0 [ 4.900072] amdgpu 0000:03:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0 [ 4.900075] amdgpu 0000:03:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0 [ 4.900078] amdgpu 0000:03:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0 [ 4.900081] amdgpu 0000:03:00.0: amdgpu: ring kiq_0.2.1.0 uses VM inv eng 11 on hub 0 [ 4.900084] amdgpu 0000:03:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 8 [ 4.900087] amdgpu 0000:03:00.0: amdgpu: ring vcn_dec uses VM inv eng 1 on hub 8 [ 4.900089] amdgpu 0000:03:00.0: amdgpu: ring vcn_enc0 uses VM inv eng 4 on hub 8 [ 4.900092] amdgpu 0000:03:00.0: amdgpu: ring vcn_enc1 uses VM inv eng 5 on hub 8 [ 4.900095] amdgpu 0000:03:00.0: amdgpu: ring jpeg_dec uses VM inv eng 6 on hub 8 [ 4.901038] amdgpu 0000:03:00.0: amdgpu: runtime pm is manually disabled [ 4.901040] amdgpu 0000:03:00.0: amdgpu: Runtime PM not available [ 4.901388] [drm] Initialized amdgpu 3.61.0 for 0000:03:00.0 on minor 1 [ 4.906982] fbcon: amdgpudrmfb (fb0) is primary device [ 4.906986] amdgpu 0000:03:00.0: [drm] fb0: amdgpudrmfb frame buffer device [ 7.643449] snd_hda_intel 0000:03:00.1: bound 0000:03:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu]) [ 3474.106154] amdgpu 0000:03:00.0: amdgpu: Power consumption will be higher as BIOS has not been configured for suspend-to-idle.
ChatGPT said:
Thanks for the detailed dmesg output and clarifications. A few things stand out:
Kernel modesetting is enabled for amdgpu (amdgpu kernel modesetting enabled.).
You have disabled runtime power management (amdgpu: runtime pm is manually disabled).
Kernel command line disables ASPM and runpm (amdgpu.aspm=0 amdgpu.runpm=0).
The Xorg server is on vt1.
What this means for your display wake problem:
Power management is mostly off for amdgpu. That reduces some complexity but means the GPU and display won’t do aggressive power saving.
Since Xorg runs on VT1, you must switch back to VT1 (via chvt 1) to “wake” the display hardware from the terminal.
Simple xset dpms force on commands often don’t wake the hardware by themselves if you’re not on the correct VT.
Your system has no BIOS support for suspend-to-idle (last message), which may complicate deeper suspend/resume cycles but is less relevant if the display just black-screens.
Practical next step before trying big changes:
When the screen goes black, switch to another VT (e.g., vt2) by chvt 2, then back to VT1 with chvt 1. This usually triggers the GPU/display to re-initialize.
If you want an automated script to run from another VT or after resume, it needs to do:
# Switch back to VT1 (where Xorg runs)
chvt 1 sleep 1
# Wake Xorg display
sudo -u $USER xset dpms force on
sudo -u $USER xdotool key Shift
echo"Wake sequence completed"
Run as root (because chvt requires root) but make sure xset and xdotool run as the logged-in user with proper Xauthority.
Why this matters:
The chvt switch physically tells the GPU/display pipeline to re-activate the console on VT1.
The xset dpms force on and xdotool key Shift commands tell Xorg to disable DPMS power saving and simulate user input, waking screensaver or blank screen.
About the XAUTHORITY file:
You said previously .Xauthority was missing or not in default place. Since you use SDDM or LightDM, the Xauthority file could be somewhere like /run/sddm/xauth_XXXX or in /home/pdd/.Xauthority.
Verify with:
ps aux | grep Xorg
Look for the -auth parameter, which tells you which authority file Xorg uses. Export that as XAUTHORITY in your script.
Summary
Your kernel and driver seem fine, with modesetting active and power management off.
To wake the display, you must switch VT away and back to vt1.
You must run the wake commands as your logged-in user with the correct XAUTHORITY file.
Use xdotool to fake input if needed.
Automate this in a script run as root or via systemd after resume.
If you want, I can write a complete tested script or systemd unit to do this on resume. Would that help?
You said:
i think runtime pm got disabled as few hours ago, when we tried to fix this another way. I can turn it on again, if you think it may make it work
ChatGPT said:
Thanks — yes, re-enabling runtime power management for the AMDGPU driver may help restore proper wake behavior, especially since AMD’s driver often relies on runtime PM to power the display back up from low-power states.
🔧 What you should try:
1. Remove these kernel parameters:
In your bootloader (e.g. GRUB or systemd-boot), remove:
amdgpu.aspm=0 amdgpu.runpm=0
These explicitly disable:
ASPM: Active State Power Management
runpm: Runtime Power Management
Edit /etc/default/grub (if using GRUB), change this:
Vill du, så uppdaterar jag skriptet med det också.
You said:
av något skäl fungerar chvt 1; sleep 2; xrandr –auto från en annan vt, men inte det automatiserade med systemctrl
ChatGPT said:
Det är ganska vanligt — orsaken är att systemd-tjänster (även i system-sleep/) körs utan aktiv VT eller användarsession, vilket gör att kommandon som xrandr (som kräver X-sessionens miljö) inte vet vilken display de ska påverka, eller saknar rättigheter.
Men eftersom du såg att chvt 1; sleep 2; xrandr --auto fungerar manuellt från en annan VT, så kan vi ändå automatisera det — men vi måste säkerställa att skriptet körs i rätt miljö.
💡 Körs nu med din användarmiljö efter boot/resume — vilket system-sleep/ saknar.
Vill du göra det ännu säkrare kan du lägga till detta i wake-x.sh för att se till att X kör:
pgrep Xorg > /dev/null || exit 0
Vill du hellre ha en system-sleep-variant ändå, kan jag försöka skapa en workaround som su till din användare och använder chvt korrekt — men systemd --user är i regel säkrare och enklare att felsöka.
You said:
går det inte att istället haka på en script när skärmen initialiseras där den kommer tillbaka från resume?
ChatGPT said:
Jo, absolut — det finns faktiskt flera sätt att hålla sig nära hårdvarunivån, t.ex. genom udev-regler, drm event hooks, eller genom att koppla in sig på systemd-händelser som resume.target. Men det du föreslår – att haka på när skärmen eller GPU:n vaknar – är knepigt eftersom X11 och kernel-GPU-drivers inte alltid exponerar ett tydligt event just då. Men här är några vägar att prova:
✅ 1. Hook via systemd suspend/resume med grafikkort-target
En mer exakt variant än system-sleep:
/etc/systemd/system/wake-screen.service
[Unit] Description=Wake screen on resume After=suspend.target Requires=graphical.target ConditionUser=pdd
Men: udev kör utan X11 eller användarmiljö, så ditt skript måste su in i rätt miljö.
Exempel:
#!/bin/bash
su - pdd -c "DISPLAY=:0 XAUTHORITY=/home/pdd/.Xauthority xrandr --auto"
Men detta är känsligt för timing, och udev hinner ofta köra före X är redo — så du kan behöva en sleep 2 innan xrandr.
🚫 Vad inte funkar bra
~/.xprofile, ~/.xinitrc – de körs bara vid login/start av X.
screen-off-skript i /lib/systemd/system-sleep/ – körs som root utan användarmiljö, så xrandr fungerar sällan utan tricks.
xset fungerar inte tillförlitligt om DPMS är avstängt av xorg.conf.
💡 Slutsats
Den mest robusta lösningen är en user-level systemd-tjänst som triggar efter resume, som i metod 1 ovan. Det:
körs med rätt användarmiljö,
kan vänta in X (med sleep 2 om det behövs),
fungerar även efter VT-skifte.
Vill du testa något av detta direkt så hjälper jag dig justera detaljer.
You said:
vänta ett ögonblick. den förra lösningen fungerart om jag går tillbaka från “suspend” direkt, men om jag väntar en minut så går det inte längre. går jag däremot till en annan vt så fungerar scripten wake-x.sh
ChatGPT said:
Tack, det är en viktig ledtråd.
Det tyder på att skärmen eller GPU:n är i ett djupare viloläge efter en stund — troligen ett DisplayCore (DC)-läge eller D3cold där GPU:n inte längre svarar på X-kommandon från resume-tjänsten, såvida du inte först väcker den med VT-skifte.
Det finns tre troliga förklaringar:
🔹 1. X-sessionen är inte aktiv efter resume
Efter en lång suspend är X kanske inte aktiv VT längre. I så fall väcker xrandr ingenting, men chvt 1 gör det.
✅ Lösning: Lägg till chvt 1 före xrandr i ditt wake-x.sh:
Och ev. ett chvt 7 tillbaka om det behövs (eller vilken VT X kör på – oftast 1 i ditt fall).
🔹 2. amdgpu går i för djup sleep (D3cold eller ASPM)
Du har:
amdgpu.aspm=0 amdgpu.runpm=0
…vilket stänger av några power saving-funktioner — men ibland går kortet ändå in i D3cold-läge om BIOS tillåter det.
🛠 Testlösning: försök istället låsa GPU i D0 (aktivt läge), efter resume.
Skapa ett skript:
/lib/systemd/system-sleep/amdgpu-wake
#!/bin/bash case"$1" in
post) echo on > /sys/bus/pci/devices/0000:03:00.0/power/control
;; esac
Kolla att PCI-adressen 0000:03:00.0 stämmer med lspci | grep VGA.
🔹 3. Din X-session är inte redo när resume-skriptet körs
Om wake-x.sh körs för tidigt efter resume, så kan X-sessionen ännu inte ta emot xrandr.
✅ Lösning: Lägg till en vänteslinga i wake-x.sh:
# Wait until X is responsive for i in {1..10}; do
xrandr --auto && break sleep 1 done
Vill du att jag kombinerar allt detta till ett komplett fungerande exempel (systemd-tjänst eller system-sleep)?
You said:
ingen skillnad. men jag upptäckte något konstigt. när jag försöker väcka skärmen genom ctrl-alt-f4 så verkar det först inte fungera, men om jsg först går till vt5 sedan tillbaka till vt4, kanske lite fram och tillbaka dä vaknar skärmen, men långsamt sedan kan jag göra wake-x.sh och vt1 och xorg vaknar
ChatGPT said:
Det du beskriver – att skärmen bara vaknar efter växling mellan flera VTs – tyder starkt på att GPU:n eller skärmutgången inte vaknar korrekt automatiskt från djupsömn (suspend-to-RAM), och att endast manuell VT-växling tillräckligt mycket “skakar liv” i hela GPU-pathen.
Detta mönster stämmer mycket med:
🧠 Känt problem med AMDGPU och DisplayCore (DC) under suspend/resume
När amdgpu används i DC-läge (vilket det numera alltid gör), händer ibland:
Resume sker
Men display encoder (DC) förblir i fel läge (t.ex. tom bild, svart, eller låg klocka)
VT-växling forcerar en modeswitch, som återställer signalen till skärmen
X xrandr --auto fungerar endast om modeswitch redan har hänt
Det är alltså inte xrandr som väcker skärmen, utan att VT-byte triggar omkoppling i DC display pipeline.
✅ Lösningsförslag: Automatisera VT-växling på resume
Eftersom VT-byte är det som funkar — gör vi det i ett systemd-sleep-skript. T.ex.:
Lägg till loggning i skriptet för att se om det körs:
echo"Ran resume VT fix at $(date)" >> /tmp/vt-fix.log
Vill du hellre använda en systemd-tjänst istället för system-sleep? Den kan vara mer robust, och triggas bara när systemet faktiskt är redo.
You said:
nej. men jag märker att det är snabb vt-växling för hand som väcker skärmen
ChatGPT said:
Tack, det bekräftar hypotesen:
det är själva snabba VT-växlingen som triggar igång display pipeline hos amdgpu efter resume – inte xrandr, inte xset, utan något internt i amdgpu/DC som reagerar på VT-byte.
✅ Låt oss då efterlikna detta i ett skript med snabba VT-växlingar
Skapa eller redigera:
/lib/systemd/system-sleep/vt-wiggle.sh
#!/bin/bash # Denna sekvens efterliknar den manuella "wiggling" du gör case"$1" in
post)
( sleep 1
chvt 2 sleep 0.5
chvt 3 sleep 0.5
chvt 1 sleep 0.5
sudo -u pdd DISPLAY=:0 XAUTHORITY=/home/pdd/.Xauthority xrandr --auto
) &
;; esac
Kör:
chmod +x /lib/systemd/system-sleep/vt-wiggle.sh
💡 Tips
Om chvt 2 inte fungerar för att den är “upptagen” med login prompt, välj chvt 4 eller 5 – du behöver två fria VT:er att växla mellan.
Du kan också testa med bara:
chvt 2; sleep 0.5; chvt 1
Vill du logga att det kördes?
Lägg till t.ex.:
echo"VT-wiggle ran at $(date)" >> /tmp/vt-wiggle.log
Vill du att jag gör en systemd-timer-tjänst istället (mer stabil och isolerad)?
You said:
min display är 0.0 inte 0 det där verkade inte fungera heller jag märker att när jag gör manuell wiggle, väcker en vt gör wake-x.sh, så behöver ändå x väckas med exempelvis musrörelser
ChatGPT said:
Okej, tack för info!
Att manuell VT-växling och musrörelse krävs tyder på att:
VT-wiggle triggar grafikkortet att “vakna”
Men X-servern (Xorg) behöver ett input-event (mus/keyboard) för att faktiskt “teckna ut” skärmen igen.
Testa följande i ditt wake-x.sh
Lägg till en xdotool-musrörelse som simulerar input:
if [ ! -f "$XAUTHORITY" ]; then echo"XAUTHORITY file not found: $XAUTHORITY" exit 1 fi # Waka wake-up signals
xset dpms force on
xset s off
xset -dpms
# Simulera musrörelse (1 pixel höger och tillbaka)
xdotool mousemove_relative -- 1 0
xdotool mousemove_relative -- -1 0
echo"Display wake-up triggered with simulated mouse movement"
Om du inte har xdotool:
Installera det med:
sudo pacman -S xdotool
Varför detta?
xset dpms force on och VT-wiggle kan väcka grafikhårdvaran men Xorg vill ofta ha input-event för att redra skärmen.
xdotool simulerar ett musrörelseevent som får Xorg att “rita om” och därmed visa skärmen.
Automatisera hela kedjan
System resume triggar VT-wiggle (som väcker GPU:n)
Kör wake-x.sh som också simulerar input för att väcka Xorg.
Vill du kan jag hjälpa dig med ett komplett systemd-sleep-script som kör båda i rätt ordning. Vill du?
You said:
det verkade inte heller fungera, men nåja, jag kan väcka skärmen för hand i alla fall
ChatGPT said:
Okej, ibland är det tyvärr så med grafik och DPMS att hårdvara och mjukvara samarbetar lite krångligt — men skönt att du åtminstone kan väcka skärmen manuellt när det behövs.
Om du vill så kan vi alltid dyka djupare och felsöka grafikkortets power management, kernelmoduler, eller prova med andra display managers eller Wayland istället för Xorg.
Vill du ta det vidare eller lämna det såhär för nu?
You said:
jag hittade med google att någon person upptäcke att S3 helt enkelt var noll i bios-tabellen på arock deskmini x300, så han gjorde en dynamisk patch och enablade s3, då fungerade S3. varför fabrikanten lämnar S3 oenablad förstår jag inte, eller kanske det inte alltid fungerar eller något
ChatGPT said:
Ja, det stämmer — många moderna moderkort, särskilt från mindre vanliga eller kostnadsoptimerade tillverkare, har BIOS/UEFI där S3-suspend (deep sleep) är helt avaktiverat eller inte korrekt implementerat. Det kan bero på flera saker:
Stabilitet: S3 är en äldre suspendmetod som kan vara buggig på vissa hårdvarukombinationer, så tillverkaren kan ha valt att stänga av den för att undvika problem.
Power management strategi: Många system har gått över till modernare lösningar som S0ix (modern standby) istället för S3, och därför är S3 nedprioriterat eller borttaget.
Brist på tid/resurser: Ofta skär tillverkare ner på avancerade power management-funktioner om de inte prioriteras, för att slippa QA-kostnader.
Krav på certifieringar: Vissa certifieringar kräver strikt kontroll på energihantering och systemets återhämtning, och om S3 inte är tillräckligt pålitligt kan den tas bort.
Det är därför det ibland krävs att patcha BIOS eller göra workaround i OS/drivrutiner för att få S3 att funka på exempelvis Arock DeskMini X300.
Vill du ha hjälp att hitta eller bygga en patch för din maskin, eller kolla om det finns community-patchar?
You said:
har inte moderna datorer suspend?
ChatGPT said:
Jo, moderna datorer har suspend, men ofta inte just S3 (deep sleep) i traditionell mening. Istället används ofta:
Modern Standby (S0ix): En nyare form av “suspend” där datorn är i ett mycket lågströmsläge men fortfarande i S0 (systemet är tekniskt “på”), vilket gör att den kan vakna snabbare och hantera bakgrundsaktiviteter — vanligen på bärbara datorer och nyare plattformar.
S2 Idle: Ett mellanting, mindre djupt än S3 men ändå strömsnålt.
S3 finns fortfarande på många stationära datorer och vissa bärbara, men vissa tillverkare har börjat fasa ut eller inaktivera det i BIOS eftersom det kan vara buggigt eller svårt att stödja stabilt på nyare hårdvara.
Så ja, suspend finns, men “suspend to RAM” som vi kallade S3 är inte alltid standard längre, särskilt på moderna laptops och plattformar som satsar på Modern Standby. På stationära är S3 ofta kvar och används om BIOS/UEFI tillåter.
Vill du kolla vilka sleep states ditt system stöder kan du köra:
cat /sys/power/mem_sleep
Och för att se vad BIOS/UEFI tillåter:
dmesg | grep -i sleep
Det kan ge en hint om vilka sleep modes som är aktiva eller tillgängliga på din maskin.
You said:
it is strange, the mb manual speeks about S3 sleep “Warning: S3 is not supported on systems where SMT is disabled.”
ChatGPT said:
Ah, that’s an interesting detail! The motherboard manual’s note:
“Warning: S3 is not supported on systems where SMT is disabled.”
means the S3 suspend mode depends on SMT (Simultaneous Multi-Threading) being enabled in BIOS/UEFI for that platform.
So if you have disabled SMT (sometimes called Hyper-Threading on Intel CPUs), the motherboard won’t allow S3 suspend.
Why might that be?
Firmware/BIOS dependency: Some BIOS/UEFI implementations tie advanced power management features to certain CPU features being enabled, like SMT. Possibly because some microcode or power management routines expect SMT active for stable suspend/resume.
Stability reasons: Disabling SMT could cause unexpected CPU states or scheduling changes that interfere with power state transitions, so the firmware disables S3 to avoid issues.
Platform design: This is likely a vendor-specific design choice—Arock or the CPU platform’s power management stack may enforce this.
What to do?
If you want S3 suspend, try enabling SMT in BIOS/UEFI and test if S3 sleep becomes available.
You can check SMT status on Linux with:
lscpu | grep Thread
or
grep -i 'smth' /proc/cpuinfo
If SMT is off, try turning it on in BIOS, reboot, and see if your S3 suspend works.
Bottom line: The motherboard and CPU firmware might require SMT enabled to support the S3 power state properly. That’s why the manual warns about it.
You said:
lscpu | grep Thread Thread(s) per core: 2 elitedesk:~$
ChatGPT said:
Ok, so SMT is enabled (2 threads per core).
That means the hardware should support S3 (suspend to RAM) if BIOS/firmware allows it.
Since your manual says S3 depends on SMT enabled, and SMT is on, but you still have problems, it might be:
BIOS has S3 disabled explicitly (sometimes a BIOS option to enable/disable S3 sleep state)
The firmware might have bugs or incomplete ACPI tables that confuse Linux power management
Or some kernel parameters or configs affect suspend mode choice
You can check current supported suspend states on your system with:
cat /sys/power/mem_sleep
It usually shows something like:
[s2idle] deep
where the bracket indicates the default suspend mode.
deep means S3 suspend (standby to RAM)
s2idle is a lighter suspend (modern but less power saving)
If you want to try forcing deep mode (S3), you can:
echo deep | sudo tee /sys/power/mem_sleep
and then test suspend.
If it’s not listed or not working, check your BIOS power management settings and update BIOS if possible.
If you want me to guide you through testing or interpreting your system’s power states, just ask!
You said:
the mb also have an option: Deep Sleep Configure deep sleep mode for power saving when the computer is shut down.
ChatGPT said:
That Deep Sleep BIOS option usually refers to the power state used when the computer is shut down, not during suspend. It controls how much power the motherboard and components draw when off — typically related to S4 (hibernation) or even deeper hardware states like S5 with some extra power savings.
For S3 suspend (standby to RAM) behavior, that’s usually controlled by a different BIOS option often called something like “Suspend Mode,” “ACPI Sleep State,” or “Sleep State after Suspend.”
A few tips:
Check the BIOS for options explicitly mentioning S3, Suspend Mode, or ACPI Sleep States and set them to enable S3 if possible.
The “Deep Sleep” option can sometimes interfere with suspend/resume if it aggressively cuts power.
If you want reliable suspend/resume (S3), try toggling this “Deep Sleep” option off and test suspend behavior again.
If you want I can help you interpret the BIOS settings or suggest test steps!
You said:
others have reported this mb does not do S3, but the manual says otherwise….confusing
ChatGPT said:
Yeah, that’s a pretty common confusion with some modern boards—especially small form factors like the ASRock DeskMini X300.
Why this happens:
The manual may list S3 support because the CPU and chipset technically support it.
But the firmware (BIOS/UEFI) disables or doesn’t fully implement S3, either due to stability concerns, power design choices, or testing.
Some vendors prefer using s2idle (modern standby) instead of classic S3 because it’s “faster” to resume but less power-efficient.
Bottom line:
Even if the manual says S3 is supported, if the BIOS or firmware doesn’t enable it or the ACPI tables don’t expose it properly, Linux will fallback to s2idle or not suspend fully.
If you want to check exactly what your system offers, run:
cat /sys/power/mem_sleep
If you see only [s2idle] or no deep option, your system is not exposing S3.
If you want to dig deeper, you can:
Look for BIOS updates that mention better suspend support.
Check kernel boot logs (dmesg) for suspend-related ACPI messages.
See if any Linux kernel patches or workarounds exist for this model.
Let me know if you want me to help with those steps!
You said:
i read on “https://lorenz.brun.one/enabling-s3-sleep-on-x300/” that someone did “patch which replaced the XS3 resource name with _S3 which is the proper one and recompiled the DSDT”
ChatGPT said:
Exactly — that’s a classic way to fix incomplete or incorrect ACPI tables!
What happens is:
The motherboard’s DSDT (part of the ACPI firmware) defines sleep states like S3.
Sometimes the ACPI tables have wrong or non-standard names for those states (like XS3 instead of _S3).
Linux and other OSes look specifically for _S3 to know if S3 sleep is supported.
If the name is wrong, the OS won’t detect S3 properly and fallback to s2idle or no suspend.
By extracting the DSDT, patching the ACPI AML code to rename the sleep state from XS3 to _S3, and recompiling it, you “teach” Linux that the board supports S3 properly.
This is quite an advanced fix, requires:
Extracting ACPI tables (acpidump)
Decompiling (iasl -d)
Editing the AML source (the .dsl file)
Recompiling (iasl -tc)
Loading the patched table at boot (via kernel parameters or initramfs)
If you want, I can help you with detailed steps for this process on your system. It’s doable but careful — a wrong ACPI patch can break suspend or even boot!
Want me to guide you through it?
You said:
i have done it before a very long time ago for another mb and cpu
ChatGPT said:
Great, then you’re already familiar with the process! Since you’ve patched ACPI tables before, here’s a quick refresher and some tips for your current X300 situation:
Dump current ACPI tables:
sudo acpidump > acpidump.dat
Extract and decompile DSDT:
iasl -d acpidump.dat
This creates dsdt.dsl.
Edit dsdt.dsl:
Look for the problematic sleep state definition—search for XS3. Replace all instances of XS3 with _S3.
Also check other sleep states to be sure the standard names _S0, _S1, _S2, _S3, _S4, _S5 are correct.
Recompile patched DSDT:
iasl -tc dsdt.dsl
Make sure no errors.
Test loading patched DSDT:
Copy the compiled AML (dsdt.aml) somewhere like /boot/ or /lib/firmware/.
Add a kernel parameter in your bootloader (GRUB example):
acpi_override=dsdt.aml
Or (more commonly):
acpi_override=/lib/firmware/dsdt.aml
Or use initrd to load the custom DSDT.
Reboot and check:
Verify with dmesg | grep -i acpi or cat /sys/power/mem_sleep if S3 is recognized.
Test suspend/resume.
Since you know the process, the main difference is identifying and replacing the wrong sleep state name in the DSDT source. The X300-specific patch you found (changing XS3 to _S3) is exactly the kind of fix to enable proper S3 sleep.
If you want, I can help you with exact commands or scripts for each step or help check your DSDT.dsl file for the relevant parts. Just say!
Skip to content Chat history You said: what do you say about this, do you have anything to clearify or scriptural references? I have found new insight about diksa: Diksa is initiation with a mantra that gives your ista-devata to worship. In this lineage, the main diksa mantra…
Skip to content Chat history You said: vilken cl är minne lexar LD4AS016G-B3200ASST ChatGPT said: Minnet Lexar LD4AS016G‑B3200ASST (med modellnummer LD4AS016G‑B3200GSST, 16 GB DDR4‑3200 SO‑DIMM) har CAS‑latens CL22 vid 3200 MHz americas.lexar.com+15americas.lexar.com+15lambda-tek.com+15. Det innebär att det är en standard‑JEDEC‑modul med fördröjning 22 klockcykler – inget special‑XMP‑tweakat, utan typisk “plug‑and‑play”‑latens….
Chat history You said: vad säger jiva gosvami är den individuella jivans ursprung när den för första gången inkarnerar sig i en materiell livsform ChatGPT said: Jīva Gosvāmī behandlar frågan om jīvans ursprung i flera av sina verk, särskilt i Paramātma-sandarbha. Frågan om när och hur den individuella…
Skip to content Chat history You said: en man står framför en nymålad vägg, där färgen fortfarande är våt, pekar på väggen med sitt pekfinger och säger sedan till sitt finger—gör det inge, nej, nej, du får absolut inte göra det. Förmanar sitt fibger att den absolut inte…