Ryzen 7 4800, Ubuntu 20.04.02: Display and/or USB problems - ubuntu-20.04

Installed Ubuntu Studio 20.04 on an ASUS PN50 mini-PC with Ryzen 7 4800. Upgraded to 20.04.2, kernel 5.8.0-44-lowlatency. Memory 32 GB 3200 MHz. Installation itself was smooth. The box only runs Radeon graphics. There is no NVIDIA. The desktop is Xfce 4.14.
I may be mixing apples and oranges, but since I can't tell (I'm not a hw freak) I'll report more than one issue. They may or may not be related, please bear with me.
Prelude: After installation the system didn't seem to boot. Stuck with Ubuntu splash screen.
On closer look lightdm wouldn't start. This fact kept the system waiting indefinitely.
I modified /etc/default/grub, deleted "quiet splash", added "nomodeset". The system now boots to text. After logging in I do a manual "startx" and the box generally seems to behave well. Graphics look good, snappy response.
Later I added "amdgpu.exp_hw_support=1" to grub, but I haven't noticed any difference. The gpumanager log ends with "Nothing to do".
I'm not sure what lightdm does, but it is the default display manager:
/etc/X11/default-display-manager: /usr/sbin/lightdm
Here is systemctl status lightdm.service output. I'm not sure what it's telling me.
lightdm.service - Light Display Manager
Loaded: loaded (/lib/systemd/system/lightdm.service; indirect; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2021-03-15 10:08:48 CET; 4h 12min ago
Docs: man:lightdm(1)
Process: 1519 ExecStartPre=/bin/sh -c [ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ] (code=exited, status=0/SUCCESS)
Process: 1522 ExecStart=/usr/sbin/lightdm (code=exited, status=1/FAILURE)
Main PID: 1522 (code=exited, status=1/FAILURE)
mar 15 10:08:48 blizzard systemd[1]: lightdm.service: Scheduled restart job, restart counter is at 5.
mar 15 10:08:48 blizzard systemd[1]: Stopped Light Display Manager.
mar 15 10:08:48 blizzard systemd[1]: lightdm.service: Start request repeated too quickly.
mar 15 10:08:48 blizzard systemd[1]: lightdm.service: Failed with result 'exit-code'.
mar 15 10:08:48 blizzard systemd[1]: Failed to start Light Display Manager.
I have disabled everything in the Xfce Power Manager so it should never interfere.
Issue 1: What about lightdm? Is it a problem?
Issue 2: If I leave the box for more than a couple of minutes there is no more keyboard response. The mouse pointer moves, but clicks have no effect. (All USB.) First I thought the screen had frozen, but it hasn't. I can ssh into the box and, for instance, kill a task and it disappears from the screen. Over a ssh connection the box appears completely alive, including "ssh -X". -- Same thing happens on waking up after suspend.
This keeps me hacking away. As long as I do the box stays responsive, alive and kicking.
Issue 3: I cannot set up more than one physical screen. Connecting a HDMI screen works well. So does a USB DisplayPort screen. If both are plugged in the USB DisplayPort gets priority. In either case only one screen is visible in the Display settings (or ARandR) and it has to be plugged in at boot time. If I unplug the USB DisplayPort screen it's lost and cannot be connected again.
(In contrast, this works well on a somewhat older Ubuntu box where DisplayLink is installed.)
[SIDE NOTE: Can't find a Stackoverflow tag for Ryzen.]

After two days of lightdm crash course, here is the answer, and it has nothing to do with Ryzen.
One file was missing from the lightdm configuration. This is an installation from scratch, so either it's missing from the Ubuntu Studio distribution, or maybe I unwittingly deleted it myself somehow.
The file is: /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf:
[Seat:*]
greeter-session=lightdm-gtk-greeter
The omission made lightdm complain (in lightdm.log)
Seat seat0: Failed to find session configuration default
Seat seat0: Failed to create greeter session
Adding the file solved all 3 issues, confirming they were related. The unresponsiveness ("Issue 2") was the result of screenlock setting in without a proper screen configuration.
For those who, like me, dive into lightdm without previous experience, I recommend running lightdm --show-config to compare the output with that obtained from a working system. By all means, also install Xephyr (package name xserver-xephyr) to be able to run lightdm --debug --test-mode. Wonderful.

Related

Diagnosing Windows program that hangs on startup

I have a new Win10 laptop. I've installed lots of software, including a 25-year-old Codewright editor that I've customized up the wazoo, and that I've been installing on all my machines for, well, 25 years. After working for a few days, it suddenly stopped, and reinstalling it didn't fix it. On startup, it puts up a small splash window, and normally opens the main window a half a second later (that took more than 5 seconds 25 years ago). It's not using any CPU, and there's nothing I can do but kill the process.
In the past, I've occasionally got my system into a state where Codewright would hang on loading, due to some other program that hadn't terminated correctly, and it was unfrozen by killing off that other process. So that's reason to believe that Codewright is waiting at some global lock which some other malfunctioning software is holding. So I have two questions:
Does this ring a bell? Is there some known failure mode where a program putting up a splash window then switching to another window can be prevented by something else going on the system?
Is there a way to diagnose this, perhaps by finding out what system call it's hanging inside? I tried dtrace.exe, started Codewright, and then stopped tracing, and it produced a 3GB XML file, which is quite a haystack. There's a way to filter it by PID, but since this is a startup problem, I have no idea what the PID will be. Is there a better tool for doing this, or some more appropriate dtrace feature that I missed?
The comment about using the Task Manager to create a dump file actually led me to notice that there is an Analyze Wait Chain function there that I had never seen before, since I haven't used Task Manager much since I switched from Win7. This gave me exactly the answer I wanted. My editor was waiting for something that was being held by some NVIDIA GeForce Experience module. Since I don't use that, I uninstalled it, and I'm back up and running. Thanks for the tip.

lenovo system ignoring SetThreadExecutionState() and was missing "Allow wake timers"?

I have come across a Lenovo IdeaCentre A540-24ICB system with a scheduled task that wakes the computer to start my application and it seems to start but the system goes back to sleep right away. Sometimes it appears to not start (or goes to sleep so fast nothing is logged yet) so I checked the Windows power sleep options to ensure "Allow wake timers" was enabled but it didn't exist! Searching online I found a registry entry to add to have it show up in the power options and then ensured it's was enabled. However, didn't make a difference.
I have to use the mouse/keyboard for the computer to wake long enough to run the application (it will start where it left off). The application has been used for years and waking and running has worked. It already tells the system to not go to sleep through the api call in the main processing thread (which could take a fraction of a second to get to):
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED);
I thought that API was enough to prevent system from going to sleep? As mentioned, it has worked for years. It's just this new Lenovo system or the Win10 installed with it doesn't seem to honor it? Is there some other API call that needs to be called? or any checks / fix the app should do to ensure the SetThreadExecutionState() will work?
TIA!!

Raspberry Pi 3 freezes - triggered by rsyslogd?

My Raspberry Pi keeps freezing after a few hours of activity. It often happens at exactly 17 minutes past the hour so I'm suspecting this might be related to a cron job. When I look into /var/log/syslog after rebooting, I see that each freeze comes right after a flurry of activity that always starts with this line (You can see the entire log output following that line, all the way to the point a freezing at https://pastebin.com/m1dmferU):
Aug 13 13:17:05 raspberrypi rsyslogd: [origin software="rsyslogd" swVersion="8.4.2" x-pid="486" x-info="http://www.rsyslog.com"] start
So I'm wondering if something related to rsyslogd might be causing this.
FYI: After the freeze the monitor is dark and unresponsive.
I'll be grateful for any help!
marc.

x11 gnome-shell display freezes every minute for 25 seconds

I use gnome shell in Fedora 18 x86_64 on an emachines E725 notebook. For the last month, every 60 seconds the display locks up for 25 seconds. Sometimes it does this for 10 minutes, and sometimes all day. The mouse cursor still moves, and sound still plays without skipping. Also, progress bars jump forward when it unfreezes as they never froze. I have stopped all cron tasks and restarted many times. The exact second the clock stops on varies each time I restart the system. I have also noticed a small increase in network use right before it freezes. It sometimes starts freezing before I open any apps, and it still freezes after I close all apps. Please let me know if there is any additional information I should post. I have done many convoluted google and stackoverflow searches over a long period of time and have found no similar problems posted. Thank you for any help or advice.
Probably off topic, but I'd suggest trying a CD/USB linux distribution (i.e. one that runs off the CD rather than having to install it).
If that has problems, you are probably looking at a hardware issue.
If a CD distribution works, then yep, it's something wrong with your installation.

Throttling respawn - Error message in Console.app

I'm getting this error message every 10 seconds.
2011-02-09 05.54.37 com.apple.launchd.peruser.501[153] (com.mysql.mysqld) Throttling respawn: Will start in 10 seconds
I'm running OS X 10.6.6.
Anyone knows what the problem may be and how do solve it?
This is a situation that's been around in Unices for donkey's years. Your program is exiting immediately as soon as it is invoked, leading to it be restarted over and over by launchd. launchd has noticed this and stopped respawning the program. The standard advice on this goes back many years, too: Find out why the daemon process is immediately exiting rather than running, and fix the cause of that. (It's usually a daemon misconfiguration of some kind.)
Yes, technically, in Mac OS 10 speak this is an "agent" rather than a "daemon", but that doesn't change either the nature of the problem or what you have to do to fix it.
http://web.archive.org/web/20101024201347/http://blog.sirkevi.com/files/Removing_MacOSX_software_that_are_constantly_relaunched.php
Quoting:
These following commands helped a lot
launchctl list -> shows a list of autostart services
launchctl remove com.webex.asassist
launchctl remove com.webex.taskwatcher

Resources