LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-29-2022, 05:20 AM   #1
slackmund
LQ Newbie
 
Registered: Feb 2021
Posts: 10

Rep: Reputation: 0
Laptop acting strange after hard-shutdown


Code:
user@hawkeye:~:>$uname -a
Linux hawkeye.LINUX 5.15.19 #1 SMP PREEMPT Wed Feb 2 01:50:51 CST 2022 x86_64 Intel(R) Core(TM) i5-8365U CPU @ 1.60GHz GenuineIntel GNU/Linux

user@hawkeye:user:>$distro
Name: Slackware 15.0 x86_64
My laptop ran out of power (power cord not properly connected) and I experienced an hard shutdown.

When I booted up, things was strange.

1st - nvim open files in readonly mode. That was not the case before the "crash" I did have several terminals open with files in nvim when it "crashed"

I can for nvim do :set noreadonly and then I can write the file, but I'm curious to how :set readonly clearly must have been set somehow somewhere when the laptop did the hard shutdown. I've checked all my .lua files for nvim to see if :set readonly have been set anywhere but it seems not

2nd - I have some scripts in .local/bin that before the crash I could run without the full path. Now I need to add the full path to run them. Even if 'echo $PATH' do show that .local/bin are in 'export PATH="$HOME.local/bin:$PATH" in .bash_profile

I've tried to do 'source .bash_profile' to see if the file was not sourced when I log in, but that change nothing. Also all my aliases in .bash_profile works fine.

If there are more strange things going on, I don't know as of yet. Also doing a proper reboot did not change things.

I have no clue to what is going on. Please advice.

EDIT::
I did some more testing by creating a new user "test". The nvim problem are related to my main user only, as nvim open files normal on the test user.

The $PATH issue is also a problem on the newly created test user. I can still not run scripts in .local/bin with out the full path from the test user after adding .local/bin to that users $PATH

Last edited by slackmund; 05-29-2022 at 05:53 AM.
 
Old 05-29-2022, 06:27 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
I would run fsck.<filesystem> on the partition that hosts /home. The file system on this partition could have suffer from the lack of sync.
 
1 members found this post helpful.
Old 05-29-2022, 08:39 AM   #3
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
slackmund --

The nvim issue is probably due to recovery files laying about due to the crash.

I run plain-ole vi or vim which both have a -r commandline flag to list or recover your edit data in the event that you lose your session.

maybe `man nvim` and search for a -r flag ?

HTH

-- kjh

p.s. whenever I edit a particular file, vim creates a corresponding .swp file.

Example:

Code:
$ vim /tmp/foo       # edit /tmp/foo and then ...
:sh                  # to shell out
$ ls -lart /tmp/     # at the bash prompt
<<snip>>
-rw-r--r--   1 root     root         12288 May 29 08:40 .foo.swp
$ exit               # back to the editor
If you don't care about unsaved edits made when the system crashed, simply remove the .swp files.

p.p.s.
Quote:
2nd - I have some scripts in .local/bin that before the crash I could run without the full path. Now I need to add the full path to run them. Even if 'echo $PATH' do show that .local/bin are in 'export PATH="$HOME.local/bin:$PATH" in .bash_profile
the red PATH= setting doesn't look correct. Should it not be:
Code:
PATH="$HOME/.local/bin:$PATH"
( note the / after $HOME )

Last edited by kjhambrick; 05-29-2022 at 08:52 AM. Reason: ps ; add quote
 
1 members found this post helpful.
Old 05-29-2022, 09:27 AM   #4
slackmund
LQ Newbie
 
Registered: Feb 2021
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kjhambrick View Post
slackmund --

The nvim issue is probably due to recovery files laying about due to the crash.
Thank you for taking the time to respond. I don't use backup or swap files. I configure my vim/nvim to not use that. But just in case i did a "find / -name *.swp" as root and the only swp file on my system is one /etc/X11/.xorg.conf-vesa.swp

Quote:
Originally Posted by kjhambrick View Post
the red PATH= setting doesn't look correct. Should it not be:
Code:
PATH="$HOME/.local/bin:$PATH"
( note the / after $HOME )
EDIT:
You are absolutely right sir! (I misread you before this edit) Adding that / did the path thing. Make me wounder why it worked before the crash.. Thank you

Last edited by slackmund; 05-29-2022 at 09:33 AM.
 
Old 05-29-2022, 09:48 AM   #5
slackmund
LQ Newbie
 
Registered: Feb 2021
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Didier Spaier View Post
I would run fsck.<filesystem> on the partition that hosts /home. The file system on this partition could have suffer from the lack of sync.
Thank you. I did as you said but fsck did not return any error. But with the point kjhambrick made and that nvim can be fixed with just adding :set noreadonly I think I will have to say that somehow it must all be my error somewhere and set this topic solved... I'm none the wiser but the system work :Thanks =)

Last edited by slackmund; 05-29-2022 at 09:50 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the default powerstate (e.g. S3,S4,S5) for the command 'shutdown -hP' or 'shutdown -hH' or 'shutdown -h' badbetty Slackware 6 11-12-2017 12:18 AM
Dell laptop acting strange ??? memo007 Linux - Hardware 4 04-04-2007 04:52 PM
Lilo error and KPP acting strange - please help! bmuseful Mandriva 6 10-02-2003 10:14 AM
Floppy drive acting strange (I'm trying to transfer files from linux to windows) jolly_good2000 Linux - General 10 11-19-2002 09:32 AM
My Suse box is acting strange, hack or just traffic? skarlet Linux - Security 3 01-17-2002 03:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration